Closed CyberWake closed 3 months ago
Hello @CyberWake! EtherAmountExtension
is part of web3dart package, which is a thirty party package, so any issue with that should be rose up in their repo.
Furthermore, on the example dapp/wallet this is used just to construct the Transaction to then pass as a json object to the request:
return await web3App.request(
topic: topic,
chainId: chainId,
request: SessionRequestParams(
method: methods[EIP155Methods.ethSendTransaction]!,
params: [transaction.toJson()], // <= Transaction data as Map<String, dynamic>
),
);
So you can construct your transaction object as you please and pass it into params.
However, I will take a look at your report anyway ASAP.
Oh wait I see what you meant! Thanks for the PR! I'll check it soon!
It's merged! Will be deployed soon!
It's deployed in beta https://pub.dev/packages/walletconnect_flutter_v2/versions/2.3.1-beta02
Describe the bug Extension
EtheraAmountExtension
fails to parse when the actual transaction includes a hex value which on decoding is higher radix value to BigInt.To Reproduce Steps to reproduce the behavior:
example/dapp/lib/utils/crypto/eip155.dart:94
update the value to be more than 10.0 ETH example replace 11->11111.{id: 1723111024688480, jsonrpc: 2.0, error: {code: -32602, message: FormatException: Positive input exceeds the limit of integer 9a3233a1a35d8000}}
Expected behavior Large values should also parse properly
Reproducible code Replace line 94 in
example/dapp/lib/utils/crypto/eip155.dart
with value: EtherAmount.fromInt(EtherUnit.finney, 11111),Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context Instead of parsing the hex to int with radix 16 and then to BigInt. We can directly parse hex to BigInt with radix as 16. I'd like to fix this one.