diff --git a/js/Bundle.js b/js/Bundle.js index 4ec967c7..195d4216 100644 --- a/js/Bundle.js +++ b/js/Bundle.js @@ -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