Skip to content

Commit

Permalink
Arthera fix issues (#439)
Browse files Browse the repository at this point in the history
  • Loading branch information
hichri-louay committed Apr 22, 2024
2 parents 78547e9 + f48cd78 commit 7fc4fca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions middleware/walletValidator.middleware.js
Expand Up @@ -84,6 +84,7 @@ const schemas = {
'polygon',
'tron',
'bttc',
'arthera',
]),
}),

Expand Down
21 changes: 13 additions & 8 deletions web3/campaigns.js
Expand Up @@ -101,17 +101,16 @@ exports.unlockArthera = async (req, res) => {
[account.walletV2?.keystore],
pass
)

return {
address: '0x' + account.walletV2?.keystore.address,
Web3ARTHERA,
}
} catch (err) {
if (!!res && res.length > 0) {
res.status(500).send({
code: 500,
error: err.message ? err.message : err.error,
})
}
res.status(500).send({
code: 500,
error: err.message ? err.message : err.error,
})
}
}
//unlock networks
Expand Down Expand Up @@ -512,7 +511,10 @@ exports.createPerformanceCampaign = async (
: await contract.getGasPrice()

/** GET GAS LIMIT FROM .env */
const gas = process.env.GAS_LIMIT
const gas =
network === 'ARTHERA'
? process.env.GAS_LIMIT_ARTHERA
: process.env.GAS_LIMIT

/** CALL METHOD CREATE PRICE FUND ALL FROM CONTRACT*/
const transactionReceipt = await contract.methods
Expand Down Expand Up @@ -637,7 +639,10 @@ exports.createBountiesCampaign = async (
? await credentials.Web3ARTHERA.eth.getGasPrice()
: await ctr.getGasPrice()
/** GET GAS LIMIT FROM .env */
var gas = process.env.GAS_LIMIT
var gas =
network === 'ARTHERA'
? process.env.GAS_LIMIT_ARTHERA
: process.env.GAS_LIMIT

try {
var receipt = await ctr.methods
Expand Down

0 comments on commit 7fc4fca

Please sign in to comment.