Closed ivanborisof closed 7 months ago
Hello @ivanborisof! Thanks for this! Could you extract the whole code for parsing data into its own private function? Like Uint8List? _parseTransationData() {}
For readability purposes. Thanks!
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
No data about Duplication
Description
Sample app wallet is not able to accept contract methods out of the box, for example it can be swap or approval methods. All this is due to incorrect parsing of the data parameter in the Transaction class.
The thing is that in the source code data tries to be parsed using the Uint8List.fromList method, but it does not take into account that data can start with "0x", because of this an error occurs.
Before:
After:
How Has This Been Tested?
This has been tested on several dapps, for example: 1inch, uniswap.
No swap or approval was possible before the code was modified.
Due Dilligence