mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-02-18 07:46:33 +00:00
fix: use increaseAllowance for token approving (#565)
This commit is contained in:
parent
040434aa19
commit
5f4218ba1c
@ -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
2
vendor/nim-ethers
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8fff63102a3461ddec61714df80840740eaade1f
|
Subproject commit 620b402a7d33385ae8e2cb5677e9f6dce9724acb
|
Loading…
x
Reference in New Issue
Block a user