Skip to content

Commit 1c8aba8

Browse files
committed
infinite approval on deposit
1 parent 4dab831 commit 1c8aba8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/utils/common.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export async function ensure_allowance(amounts, plain = false) {
6767
if (cBN(allowances[i]).isLessThan(currentContract.max_allowance.div(cBN(2)))) {
6868
if (allowances[i] > 0)
6969
await approve(coins[i], 0, default_account, swap);
70-
await approve(coins[i], max_allowance, default_account, swap);
70+
await approve(coins[i], currentContract.max_allowance, default_account, swap);
7171
}
7272
}
7373
}

0 commit comments

Comments
 (0)