AugurProject / augur

Augur v2 - Prediction Market Protocol and Client
MIT License
460 stars 143 forks source link

Can't withdraw funds on local testnet configuration #7978

Closed nuliknol closed 4 years ago

nuliknol commented 4 years ago

When trying to withdraw all funds from Wallet Contract by clicking "Withdraw" button on "ACCOUNT SUMMARY" page I get the error "gas required exceeds allowance".

This is using today's (morning) sources. Have you tested that withdrawal for local testnet is working?

Steps to reproduce:

  1. Install local testnet configuration:
    docker kill $(docker ps -a -q);
    docker system prune -af
    yarn clean
    yarn
    yarn build
    yarn docker:all
    yarn workspace @augurproject/ui dev
  2. Get DAI from Faucet (you will get 1,000 DAIs)
  3. Withdraw to any different address.

Screenshot of the error attached withdrawal_error

btw, it would be nice to have a popup dialog with the error text!

nuliknol commented 4 years ago

here is the call parameters eth_call_params

bthaile commented 4 years ago

withdraw all funds modal has 2 code paths.

If user's signing wallet has ETH withdrawAllFundsAsDai will be called. It will convert the Fee reserve (ETH) to DAI and send to the user's destination address from the modal.

If the user's signing walllet doesn't have ETH then DAI will be transferred to the destination address in the modal using the GSN relayer. I don't think this will work if the account hasn't been activated. I'll need to test this scenario.

One issue could be we under estimated the DAI needed to transfer the user's DAI.

@nuliknol did you activate your trading account? looks like a transfer was tried so I assume no. I also assume you don't have any ETH in your signing wallet since a transfer was tried.

One thing I'm confused on is DAI faucet, it will fail if user hasn't activated trading account or doesn't have any ETH in signing wallet.

nuliknol commented 4 years ago

@nuliknol did you activate your trading account? looks like a transfer was tried so I assume no. I also assume you don't have any ETH in your signing wallet since a transfer was tried.

I do have ETH (on the EOA, not the Wallet contract), and while I didn't execute account activation by pressing the button, it does gets activated (because the button disappears after that from the screen) when you get REP and DAI from the faucet, and that's what I did.

So, I suppose the account was activated with Faucet transfer and I had DAI tokens on the Wallet contract when I attempted to transfer the funds.

@bthaile

bthaile commented 4 years ago

First off, thanks for going through these hurdles, much appreciated.

We got in some changes in to withdraw all funds. There is one more coming in shortly but shouldn't affect your scenario. See if it works @nuliknol

nuliknol commented 4 years ago

@bthaile withdrawals are working fine! thank you!!