From a9935eca8daba945e1376a7814ae31ec0b4780e3 Mon Sep 17 00:00:00 2001 From: sneak Date: Fri, 27 Feb 2026 12:33:09 +0700 Subject: [PATCH] Decode ERC-20 calldata in transaction approval popup The tx approval screen now decodes known ERC-20 function calls (approve, transfer) and shows them in plain language instead of raw hex. For the Uniswap approve example, the user now sees: Action: Token Approval Approve spending of your USDT Token: USDT (with full contract address + etherscan link) Spender: (full address + etherscan link) Amount: Unlimited Known tokens from the built-in list show their symbol. Unknown tokens show the contract address. Max uint256 approvals are labeled "Unlimited". The raw data is still shown below in a scrollable area for verification. Also labels the "To" field as "Contract" since dApp transactions are always contract calls, and shows the token symbol above the contract address when recognized. --- src/popup/index.html | 32 ++++++-- src/popup/views/approval.js | 159 ++++++++++++++++++++++++++++++++++-- 2 files changed, 177 insertions(+), 14 deletions(-) diff --git a/src/popup/index.html b/src/popup/index.html index 0e05b95..534881f 100644 --- a/src/popup/index.html +++ b/src/popup/index.html @@ -858,21 +858,39 @@ wants to send a transaction.

-
+ + + + +
From
-
-
To
+
+
Contract
-
+
Value
-