fix: Zero ERC-20 plugin context and require both ABI fields before review
The ERC-20 internal plugin only cleared `extra_data` at ETH_PLUGIN_INIT_CONTRACT, leaving `destinationAddress`, `amount`, `ticker`, `decimals`, `contract_name`, and `selectorIndex` from the previous signing flow alive in the per-plugin global context that backs dataContext.tokenContext.pluginContext. A host that started a new transfer with selector-compatible but malformed calldata (wrong ABI offsets, truncated payload) could then reach ETH_PLUGIN_FINALIZE with neither the destination nor the amount parameter actually observed, and the trusted review screen would display the stale values from the previous flow as if they were the current ones. Zero the entire context at INIT and add `destination_parsed` / `amount_parsed` flags that the parameter handlers flip when the two mandatory ABI offsets fire. FINALIZE refuses the screen if either flag is missing, so non-conforming calldata is reported as ERROR instead of rendering stale state. (cherry picked from commit 816010e482302852b097a3089299c3f6705e00c3)
C
Charles-Edouard de la Vergne committed
74e9ba62e03518549c14f45dc6274e41f05d50a7
Parent: 1150dd5
Committed by Alexandre Paillier <alexandre.paillier@ledger.fr>
on 8/25/2026, 3:04:01 PM