Skip to content

Commit

Permalink
fix: use increaseAllowance for token approving (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
AuHau authored Oct 16, 2023
1 parent 040434a commit 5f4218b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion codex/contracts/market.nim
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ proc approveFunds(market: OnChainMarket, amount: UInt256) {.async.} =
let tokenAddress = await market.contract.token()
let token = Erc20Token.new(tokenAddress, market.signer)

discard await token.approve(market.contract.address(), amount).confirm(1)
discard await token.increaseAllowance(market.contract.address(), amount).confirm(1)

method getSigner*(market: OnChainMarket): Future[Address] {.async.} =
return await market.signer.getAddress()
Expand Down
2 changes: 1 addition & 1 deletion vendor/nim-ethers

0 comments on commit 5f4218b

Please sign in to comment.