token-geyser icon indicating copy to clipboard operation
token-geyser copied to clipboard

Cannot generate transaction if amount is too large

Open temet-nosce opened this issue 5 years ago • 3 comments

Hi,

I haven't tried with other pools, but on the AMPL-YCRV Geyser, am unable to generate a transaction if the amount is larger than 999

The geyser page throws an error before metamask gets any transaction "Error withdrawing: Transaction error" (screenshot below)

Also noticed the following errors in the debug console

Withdrawing 1e+21

faucet.3db746d1d5c991a3e484.bundle.js:136 Error: invalid number value (arg="amount", coderType="uint256", value="1e+21")
    at Object.o [as throwError] (faucet.3db746d1d5c991a3e484.bundle.js:28)
    at t.encode (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at faucet.3db746d1d5c991a3e484.bundle.js:127
    at Array.forEach (<anonymous>)
    at I (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at t.encode (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at e.encode (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at s.encodeParameters (faucet.3db746d1d5c991a3e484.bundle.js:49)
    at faucet.3db746d1d5c991a3e484.bundle.js:127
    at Array.map (<anonymous>)
    at Object.h._encodeMethodABI (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at Object.h._processExecuteArguments (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at Object.h._executeMethod (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at r (faucet.3db746d1d5c991a3e484.bundle.js:136)
    at r.next (<anonymous>)
    at By (faucet.3db746d1d5c991a3e484.bundle.js:136)
    at a (faucet.3db746d1d5c991a3e484.bundle.js:136)

faucet.3db746d1d5c991a3e484.bundle.js:136 Error: invalid number value (arg="amount", coderType="uint256", value="1e+21")
    at Object.o [as throwError] (faucet.3db746d1d5c991a3e484.bundle.js:28)
    at t.encode (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at faucet.3db746d1d5c991a3e484.bundle.js:127
    at Array.forEach (<anonymous>)
    at I (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at t.encode (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at e.encode (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at s.encodeParameters (faucet.3db746d1d5c991a3e484.bundle.js:49)
    at faucet.3db746d1d5c991a3e484.bundle.js:127
    at Array.map (<anonymous>)
    at Object.h._encodeMethodABI (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at Object.h._processExecuteArguments (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at Object.h._executeMethod (faucet.3db746d1d5c991a3e484.bundle.js:127)
    at r (faucet.3db746d1d5c991a3e484.bundle.js:136)
    at r.next (<anonymous>)
    at By (faucet.3db746d1d5c991a3e484.bundle.js:136)
    at a (faucet.3db746d1d5c991a3e484.bundle.js:136)

Capture

temet-nosce avatar Sep 13 '20 23:09 temet-nosce

Hey, @temet-nosce there' s UI precision bug (due to the number input box), which shows up in certain geysers.

So If you're looking to withdraw say 55623.32787325445353, type 55623.32787, just remove the numbers after the 5th decimal place.

You should be able to withdraw mostly everything except some dust.

We should deploy a fix soon

aalavandhan avatar Sep 18 '20 14:09 aalavandhan

Hi @nithinkrishna I actually had noticed that with another one of the geysers and made sure to try it without varying precisions.

The value I had used for this case though when generating the above tracebacks was exactly 1000 with no extra precision.

Thanks for the support!

temet-nosce avatar Sep 18 '20 20:09 temet-nosce

Hi, I noticed the same issue in BZRX/AMPL pool when trying to deposit into geyser. If the amount is higher than 999 LP tokens, it gives transaction error. I tried to remove the precision to a full number, still didn't work.

999 (and lower) works. So if it is done in several transactions, it will go through, but with multiple gas fees paid :/

chippo122 avatar Sep 20 '20 08:09 chippo122