I have a problem where value parameter in EVM transaction request is getting rounded. It behaves as if converted to js Number primitive therefor I suspect this line:
I'm using Aleph Zero EVM (Testnet) network, where native token has 18 decimals. I've connected to dApp with SubWallet Extension. I've submitted a transaction with value having 18 decimals. The transaction failed, because a value send was lower than expected. I've traced it back here :smile:
To Reproduce
Steps to reproduce the behavior:
Import account with private key: edc6526d959b4b3555ac8fe7d15f349103893cd603398d72086c34e518d29281
Describe the bug
I have a problem where
value
parameter in EVM transaction request is getting rounded. It behaves as if converted to jsNumber
primitive therefor I suspect this line:https://github.com/Koniverse/SubWallet-Extension/blob/a3c0a9cf92a9c55c9841595d4ddae31cd08a357c/packages/extension-base/src/services/request-service/handler/EvmRequestHandler.ts#L217
I'm using
Aleph Zero EVM (Testnet)
network, where native token has 18 decimals. I've connected to dApp with SubWallet Extension. I've submitted a transaction withvalue
having 18 decimals. The transaction failed, because avalue
send was lower than expected. I've traced it back here :smile:To Reproduce Steps to reproduce the behavior:
Import account with private key: edc6526d959b4b3555ac8fe7d15f349103893cd603398d72086c34e518d29281
Go to https://test.common.fi/bridge
Select
Aleph Zero EVM Testnet
on top andAleph Zero Testnet
on bottomConnect SubWallet on both ends of the bridge
The account has some funds (I've transfered a little there, if it's missing there is faucet here)
In input paste
1.169847813119247738
Click
Bridge
. Transfer will fail, becausevalue
send will be1.1698478131192478
Expected behavior Parameter
value
shouldn't be rounded.Desktop (please complete the following information):
Additional context SubWallet v1.2.28
It seems transferring precise amount with 18 decimals doesn't work as well, but it seems to be unrelated to the issue at hand.