tahowallet / dapp

Subscape dApp

Home Page:https://app.taho.xyz/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Wallet proposes wrong spend limit during unstaking

michalinacienciala opened this issue · comments

When I have 100 TAHO staked and I try to unstake 3 TAHO, the wallet sets the spent limit to 3 veTAHO (OK).
When I have 100 TAHO staked and I try to unstake 100 TAHO, the wallet sets the spent limit to 10 veTAHO (NOOK).
When I have 90 TAHO staked and I try to unstake 90 TAHO, the wallet sets the spent limit to 9 veTAHO (NOOK).

Screen.Recording.2023-11-23.at.15.43.46.mov

Tested on prod env, wallet version 0.51.02922c34

Also, when I had 81 TAHO staked and tried to unstake 81, the wallet proposed 8 veTAHO spend limit. I manually changed it to 81 and the transaction failed when I proceeded:

transaction.ts:129 Failed to send transaction Error: transaction failed [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (transactionHash="0xc40b8e2764da4c562962cb48e0fd14940d1033b8ae291e500080eaddafb719bd", transaction={"hash":"0xc40b8e2764da4c562962cb48e0fd14940d1033b8ae291e500080eaddafb719bd","type":0,"accessList":null,"blockHash":"0x2d407f0b1e7b5e010ca73459ae88538491a260920179c017881fde27cf04cd51","blockNumber":1428585,"transactionIndex":1,"confirmations":1,"from":"0x2D215e6911AD32d2bb5a6240c97540Ae4c7eE3E8","gasPrice":{"type":"BigNumber","hex":"0x068e7780"},"gasLimit":{"type":"BigNumber","hex":"0xb587"},"to":"0xeae5797ba706691630A979a8f3840D01C9e9c7a4","value":{"type":"BigNumber","hex":"0x00"},"nonce":36,"data":"0x095ea7b30000000000000000000000006a3d1d9a7eb615be82b5c50bba8c6ecc7606afe60000000000000000000000000000000000000000000000046419ced7f6a40000","r":"0x57bab1a84387bf91fec6ddfb3937bb69cf694f3cd9a6982b2c71ae077e80fede","s":"0x6aa5fba357a670f86d1588bdefebb13fa596e8230d2d1dadbf28c2a3af849153","v":843263,"creates":null,"chainId":421614}, receipt={"to":"0xeae5797ba706691630A979a8f3840D01C9e9c7a4","from":"0x2D215e6911AD32d2bb5a6240c97540Ae4c7eE3E8","contractAddress":null,"transactionIndex":1,"gasUsed":{"type":"BigNumber","hex":"0xb587"},"logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","blockHash":"0x2d407f0b1e7b5e010ca73459ae88538491a260920179c017881fde27cf04cd51","transactionHash":"0xc40b8e2764da4c562962cb48e0fd14940d1033b8ae291e500080eaddafb719bd","logs":[],"blockNumber":1428585,"confirmations":1,"cumulativeGasUsed":{"type":"BigNumber","hex":"0xb587"},"effectiveGasPrice":{"type":"BigNumber","hex":"0x05f5e100"},"status":0,"type":0,"byzantium":true}, code=CALL_EXCEPTION, version=providers/5.7.2)
    at l.makeError (index.js:224:23)
    at l.throwError (index.js:233:20)
    at ge.<anonymous> (base-provider.js:1365:24)
    at Generator.next (<anonymous>)
    at i (base-provider.js:5:58)

Some more data:
When I have 73 TAHO staked and I try to unstake 73 TAHO, the wallet sets the spent limit to 7 veTAHO (NOOK).
When I have 73 TAHO staked and I try to unstake 72 TAHO, the wallet sets the spent limit to 72 veTAHO (OK).

More I think about it, then more I am trying to convince myself that this a wallet error, but do not have any data to confirm it 100% yet

More I think about it, then more I am trying to convince myself that this a wallet error, but do not have any data to confirm it 100% yet

I was able to confirm it is not a wallet issue. In #788 we add possibility to connect to dapp with MM and when I tried to unstake 73 veTAHO from the account connected using MM, MM proposed the spending cap of 7 veTAHO.