Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arthera fix issues #439

Merged
merged 3 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions middleware/walletValidator.middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ const schemas = {
'polygon',
'tron',
'bttc',
'arthera',
]),
}),

Expand Down
21 changes: 13 additions & 8 deletions web3/campaigns.js
Original file line number Diff line number Diff line change
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
Loading