fix: use increaseAllowance for token approving (#565)

This commit is contained in:
Adam Uhlíř 2023-10-16 13:09:54 +02:00 committed by GitHub
parent 040434aa19
commit 5f4218ba1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ proc approveFunds(market: OnChainMarket, amount: UInt256) {.async.} =
let tokenAddress = await market.contract.token() let tokenAddress = await market.contract.token()
let token = Erc20Token.new(tokenAddress, market.signer) 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.} = method getSigner*(market: OnChainMarket): Future[Address] {.async.} =
return await market.signer.getAddress() return await market.signer.getAddress()

2
vendor/nim-ethers vendored

@ -1 +1 @@
Subproject commit 8fff63102a3461ddec61714df80840740eaade1f Subproject commit 620b402a7d33385ae8e2cb5677e9f6dce9724acb