File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ const queryParams = {
69
69
accountIn: connectedAccount,
70
70
accountOut: connectedAccount,
71
71
slippage: " 0.1" , // 0.1%
72
- deadline: String (Date .now () / 1000 + 10 * 60 ), // 10 minutes from now
72
+ deadline: String (Math . floor ( Date .now () / 1000 ) + 10 * 60 ) // 10 minutes from now
73
73
swapperMode: " 2" , // target debt mode
74
74
isRepay: " true" ,
75
75
}
@@ -82,7 +82,7 @@ const { data: response } = await axios.get(
82
82
)
83
83
84
84
// Encode EVC batch
85
- const batchItems =
85
+ const batchItems = [
86
86
// Withdraw collateral to the Swapper contract
87
87
{
88
88
targetContract: collateralVault,
@@ -92,7 +92,7 @@ const batchItems =
92
92
abi: EVAULT_ABI ,
93
93
functionName: " withdraw"
94
94
args: [response .data .amountInMax , response .data .swap .swapperAddress , connectedAccount]
95
- }
95
+ })
96
96
},
97
97
// execute Swapper payload from the API response
98
98
{
@@ -108,7 +108,7 @@ const batchItems =
108
108
value: 0 ,
109
109
data: response .data .verify .verifierData
110
110
},
111
- ))
111
+ ]
112
112
113
113
const evcBatch = encodeFunctionData ({
114
114
abi: EVC_ABI ,
You can’t perform that action at this time.
0 commit comments