-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Hi,
Currently when approving the tokens for a EVM transaction, it attempts to approve the max uint 256 amount of tokens. It should approve the amount specified in the transaction itself, to avoid giving permission to extra tokens than needed for the transaction.
Here is the diff that solved my problem:
diff --git a/node_modules/@skip-go/core/dist/index.js b/node_modules/@skip-go/core/dist/index.js
index 1ae6767..a06491a 100644
--- a/node_modules/@skip-go/core/dist/index.js
+++ b/node_modules/@skip-go/core/dist/index.js
@@ -1310,7 +1310,7 @@ var SkipRouter = class {
address: requiredApproval.tokenContract,
abi: erc20ABI,
functionName: "approve",
- args: [requiredApproval.spender, viem.maxUint256],
+ args: [requiredApproval.spender, requiredApproval.amount],
chain: signer.chain
});
const receipt2 = yield extendedSigner.waitForTransactionReceipt({This issue body was partially generated by patch-package.
Thanks,
Jeffy
VorobevSA
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request