refactor: move the calldata decoder to src/shared/calldataDecoder.js (closes #759)
check / check (push) Successful in 10m16s
e2e / e2e-chrome (push) Successful in 16m8s
e2e / e2e-firefox (push) In progress

decodeCalldata() and tokenAmountText() move out of the TxApproval view into
src/shared/calldataDecoder.js. TxApproval, TransactionDetail and the decoder
tests import them from there.

tokenSourcesByChainId() moves from the popup view helpers to
src/shared/state.js, beside currentNetwork(), so the decoder requires nothing
under src/popup/. It reads only the state singleton and the network table.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-10 20:15:46 +00:00
1 parent c150b83322
commit 7c7d44509c
14 files changed
+219 -185

No files matched your search

+1 -1
View File
@@ -47,7 +47,7 @@ globalThis.chrome = {
const { state } = require("../src/shared/state");
const { fetchRecentTransactions } = require("../src/shared/transactions");
const approval = require("../src/popup/views/approval");
const { decodeCalldata } = approval;
const { decodeCalldata } = require("../src/shared/calldataDecoder");
const transactionDetail = require("../src/popup/views/transactionDetail");
const MAINNET = "0x1";