Skip to content

Commit

Permalink
implementing relayer estimate querying with optional getNextNonce
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdex18 committed Jan 31, 2022
1 parent 8b7b9d4 commit 46f4685
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/Bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ Bundle.prototype.getNonce = async function(provider) {
return this.nonce
}

Bundle.prototype.estimate = async function({ fetch, relayerURL, replacing }) {
Bundle.prototype.estimate = async function({ fetch, relayerURL, replacing, getNextNonce }) {
const res = await fetchPost(
fetch,
`${relayerURL}/identity/${this.identity}/${this.network}/estimate`,
`${relayerURL}/identity/${this.identity}/${this.network}/estimate${getNextNonce ? '?getNextNonce=true' : ''}`,
{ txns: this.txns, signer: this.signer, replacing }
)
this.gasLimit = res.gasLimit
Expand Down

0 comments on commit 46f4685

Please sign in to comment.