AaveCodeExamples icon indicating copy to clipboard operation
AaveCodeExamples copied to clipboard

Repay issue in web3js-example

Open alrevuelta opened this issue 4 years ago • 0 comments

Hi, I'm playing around with this example and have successfully managed to run deposit and borrow, but I'm getting an error when running Repay.

Here is what I get:

Error repaying in the LendingPool contract: Transaction has been reverted by the EVM:
{
  "blockHash": "0xd706b46189e7b397a03d181a24b249d36827bfbd524cf482870b0c7f052c991d",
  "blockNumber": 20154744,
  "contractAddress": null,
  "cumulativeGasUsed": 327157,
  "from": "0x9f17837e809f6a74048f88fba193deb0be980d47",
  "gasUsed": 207360,
  "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
  "root": null,
  "status": false,
  "to": "0x580d4fdc4bf8f9b5ae2fb9225d584fed4ad5375c",
  "transactionHash": "0x037cd7b40c4a632cf99964b7c69b5a5448269c0f3617c27bb9a4c45b477a921d",
  "transactionIndex": 1,
  "events": {}
}

I'm using Kovan, replacing lpAddressProviderAddress and daiAddress variables with the following values respectively:

  • LendingPoolAddressesProvider: 0x506B0B2CF20FAA8f38a4E2B524EE43e1f4458Cc5
  • DAI: 0xFf795577d9AC8bD7D90Ee22b6C1703490b6512FD

Apart from that, I edited the amounts (1000 by default) to the following ones:

  • Deposit 20. After the deposit, I can see 20 aDAI in my account and -20 DAI.
  • Borrow 5. Then I can see +5 DAI.
  • Repay 5. But get the error abvove.

Even if I automatically repay with -1 I get the same error.

Am I doing something wrong? I haven't done any other modifications apart from the mentioned ones.

alrevuelta avatar Aug 10 '20 09:08 alrevuelta