Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/cheqd-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
CHEQD_IMAGE_TAG: 4.1.5
CHEQD_IMAGE_TAG: 4.1.7
CHEQD_NETWORK: "testnet"
steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
CHEQD_IMAGE_TAG: 4.1.5
CHEQD_IMAGE_TAG: 4.1.7
CHEQD_NETWORK: "mainnet"
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/cheqd-modules-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
CHEQD_IMAGE_TAG: 4.1.5
CHEQD_IMAGE_TAG: 4.1.7
CHEQD_NETWORK: "testnet"
steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
CHEQD_IMAGE_TAG: 4.1.5
CHEQD_IMAGE_TAG: 4.1.7
CHEQD_NETWORK: "mainnet"
steps:
- uses: actions/checkout@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
CHEQD_IMAGE_TAG: 4.1.5
CHEQD_IMAGE_TAG: 4.1.7
CHEQD_NETWORK: "testnet"
steps:
- uses: actions/checkout@v2
Expand All @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
env:
CHEQD_MNEMONIC: "steak come surprise obvious remain black trouble measure design volume retreat float coach amused match album moment radio stuff crack orphan ranch dose endorse"
CHEQD_IMAGE_TAG: 4.1.5
CHEQD_IMAGE_TAG: 4.1.7
CHEQD_NETWORK: "mainnet"
steps:
- uses: actions/checkout@v2
Expand Down
3 changes: 2 additions & 1 deletion packages/cheqd-blockchain-api/src/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,8 @@ export class CheqdAPI extends AbstractApiProvider {
* @returns {BigInt}
*/
async calculateFee(txOrTxs, signerAddress, estimatedGas = null, multiplier = 1.3, memo = '') {
const gasEstimation = estimatedGas ?? (await this.simulate(signerAddress, Array.isArray(txOrTxs) ? txOrTxs : [txOrTxs], memo));
const txs = this.constructor.txToJSON(txOrTxs);
const gasEstimation = estimatedGas ?? (await this.sdk.signer.simulate(signerAddress, txs, memo));
const usedFee = calculateDidFee(Math.round(gasEstimation * multiplier), this.gasPrice);
return usedFee.amount[0];
}
Expand Down
Loading