修正计算erc20转账gas计算错误的bug
This commit is contained in:
parent
c55860b023
commit
fd860f6dad
@ -148,8 +148,8 @@ export class ERC20Reactor {
|
|||||||
}
|
}
|
||||||
let gasEstimate =
|
let gasEstimate =
|
||||||
from === this.account.address
|
from === this.account.address
|
||||||
? await contract.methods.transfer(to, 0).estimateGas()
|
? await contract.methods.transfer(to, amountBN).estimateGas()
|
||||||
: await contract.methods.transferFrom(from, to, 0).estimateGas()
|
: await contract.methods.transferFrom(from, to, amountBN).estimateGas()
|
||||||
if (estimate) {
|
if (estimate) {
|
||||||
return gasEstimate
|
return gasEstimate
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user