Skip to content

Commit

Permalink
added gasTank args for estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
stojnovsky committed Jun 21, 2022
1 parent 0515377 commit ef2f88f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/Bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ Bundle.prototype.getNonce = async function(provider) {
return this.nonce
}

Bundle.prototype.estimate = async function({ fetch, relayerURL, replacing, getNextNonce }) {
Bundle.prototype.estimate = async function({ fetch, relayerURL, replacing, getNextNonce, gasTank }) {
const queryParams = Object.fromEntries(Object.entries({getNextNonce, gasTank}).filter(([_, v]) => v))
const res = await fetchPost(
fetch,
`${relayerURL}/identity/${this.identity}/${this.network}/estimate${
getNextNonce ? '?getNextNonce=true' : ''
`${relayerURL}/identity/${this.identity}/${this.network}/estimate?${
(new URLSearchParams(queryParams)).toString()
}`,
{ txns: this.txns, signer: this.signer, replacing, minFeeInUSDPerGas: this.minFeeInUSDPerGas }
)
Expand Down

0 comments on commit ef2f88f

Please sign in to comment.