Skip to content

Commit c9bd040

Browse files
committed
fix: Readme example params
1 parent 1fea9aa commit c9bd040

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const queryParams = {
6969
accountIn: connectedAccount,
7070
accountOut: connectedAccount,
7171
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
7373
swapperMode: "2", // target debt mode
7474
isRepay: "true",
7575
}
@@ -82,7 +82,7 @@ const { data: response } = await axios.get(
8282
)
8383

8484
// Encode EVC batch
85-
const batchItems =
85+
const batchItems = [
8686
// Withdraw collateral to the Swapper contract
8787
{
8888
targetContract: collateralVault,
@@ -92,7 +92,7 @@ const batchItems =
9292
abi: EVAULT_ABI,
9393
functionName: "withdraw"
9494
args: [response.data.amountInMax, response.data.swap.swapperAddress, connectedAccount]
95-
}
95+
})
9696
},
9797
// execute Swapper payload from the API response
9898
{
@@ -108,7 +108,7 @@ const batchItems =
108108
value: 0,
109109
data: response.data.verify.verifierData
110110
},
111-
))
111+
]
112112

113113
const evcBatch = encodeFunctionData({
114114
abi: EVC_ABI,

0 commit comments

Comments
 (0)