Skip to content

Conversation

@cryptotavares
Copy link
Contributor

@cryptotavares cryptotavares commented Nov 14, 2025

Forget to remove hex amount leading zeros, which was causing the eth_estimateGas to fail on some amounts with the following error return from the rpc provider invalid argument 0: json: cannot unmarshal hex number with leading zero digits into Go struct field TransactionArgs.value of type *hexutil.Big.


Note

Ensure ETH amounts are hex-encoded without leading zeros when building swap transactions.

  • Transactions (src/components/transactions/swapComparison.js):
    • Add stripLeadingZeros helper to normalize hex strings.
    • Apply leading-zero stripping to parseEthAmount output and default ethAmountHex calculation.
    • No other logic changes to swap building or UI.

Written by Cursor Bugbot for commit 1f500ce. This will update automatically on new commits. Configure here.

@cryptotavares cryptotavares merged commit d35ea09 into main Nov 17, 2025
9 checks passed
@cryptotavares cryptotavares deleted the cryptotavares/fix-swap-comparison-amount-leading-zeros branch November 17, 2025 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants