mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
minor fixing
This commit is contained in:
parent
7b3b5035e3
commit
fc0c7f7910
|
@ -36,8 +36,10 @@ contract Helpers is DSMath, Basic {
|
|||
IHopRouter router = IHopRouter(params.router);
|
||||
|
||||
uint256 nativeTokenAmt = isNative ? params.amount : 0;
|
||||
TokenInterface tokenContract = TokenInterface(params.token);
|
||||
approve(tokenContract, params.router, params.amount);
|
||||
if (!isNative) {
|
||||
TokenInterface tokenContract = TokenInterface(params.token);
|
||||
approve(tokenContract, params.router, params.amount);
|
||||
}
|
||||
|
||||
router.swapAndSend{ value: nativeTokenAmt }(
|
||||
params.targetChainId,
|
||||
|
|
Loading…
Reference in New Issue
Block a user