This commit is contained in:
Armani Ferrante 2021-02-23 18:49:40 +08:00
parent ffd79bcf02
commit 3177abeceb
No known key found for this signature in database
GPG Key ID: D597A80BCF8E12B7
1 changed files with 1 additions and 2 deletions

View File

@ -64,7 +64,6 @@ export async function swapErc20ToSpl({
let gasLimit = await erc20.methods
.approve(swapAddress, encodedAmount)
.estimateGas({ from: ethAccount });
const approveTx = erc20.methods
.approve(swapAddress, encodedAmount)
.send({ from: ethAccount, gasLimit });
@ -165,7 +164,7 @@ export async function withdrawEth(from, withdrawal, callAsync) {
return;
}
pendingNonces.add(nonce);
const gasLimit = await method.send({ from });
const gasLimit = await method.estimateGas({ from });
await callAsync(method.send({ from, gasLimit }), {
progressMessage: `Completing ${withdrawal.coin.ticker} transfer...`,
});