refactor: move the calldata decoder to src/shared/calldataDecoder.js (closes #759)
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 was merged in pull request #765.
This commit is contained in:
1 parent
c150b83322
commit
6d158bf1b1
14 files changed
+219
-185
No files matched your search
@@ -10,9 +10,13 @@ const {
|
||||
renderAddressHtml,
|
||||
attachCopyHandlers,
|
||||
goBack,
|
||||
tokenSourcesByChainId,
|
||||
} = require("./helpers");
|
||||
const { state, currentAddress, currentNetwork } = require("../../shared/state");
|
||||
const {
|
||||
state,
|
||||
currentAddress,
|
||||
currentNetwork,
|
||||
tokenSourcesByChainId,
|
||||
} = require("../../shared/state");
|
||||
let ctx;
|
||||
const { getProvider } = require("../../shared/balances");
|
||||
const { resolveTokenDecimals } = require("../../shared/approvalAmount");
|
||||
|
||||
Reference in new issue
Block a user