Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Commit

Permalink
fix: estimateGas full signature syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Sep 19, 2022
1 parent 224f6a8 commit 61f8257
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/investor-foxy/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,10 @@ export class FoxyApi {

try {
const estimatedGas = isDelayed
? await stakingContract.estimateGas.unstake(this.normalizeAmount(amountDesired), true)
? await stakingContract.estimateGas['unstake(uint256,bool)'](
this.normalizeAmount(amountDesired),
true,
)
: await stakingContract.estimateGas.instantUnstake(true)
return estimatedGas.toString()
} catch (e) {
Expand Down Expand Up @@ -354,7 +357,7 @@ export class FoxyApi {
const stakingContract = this.getStakingContract(contractAddress)

try {
const estimatedGas = await stakingContract.estimateGas.stake(
const estimatedGas = await stakingContract.estimateGas['stake(uint256)'](
this.normalizeAmount(amountDesired),
userAddress,
)
Expand Down

0 comments on commit 61f8257

Please sign in to comment.