SIGN IN SIGN UP

fix: Stale ticker reuse mislabels later entries in multi-value TOKEN fields

format_param_token() declared `ticker` and `token_def` outside the
collection loop. When an iteration matched the native-currency
branch, only `ticker` was overwritten while `token_def` kept the
value left over from a previous ERC-20 match. The stale `token_def`
was then handed to add_to_field_table(), so a generic-parser descriptor
that mixes native and unknown ERC-20 addresses could mislabel later
entries with the previous token's metadata.

Move `ticker` and `token_def` into the per-iteration scope so they
always start at NULL, and force the matching branch to repopulate them
from scratch (the native branch keeps `token_def == NULL` intentionally).

(cherry picked from commit b05035cb309800984b3a708acd61d9c03678076d)
C
Charles-Edouard de la Vergne committed
ab6c7d707fbc17e8c9a239f35018cdef17c540fc
Parent: 4c3ab09
Committed by Alexandre Paillier <alexandre.paillier@ledger.fr> on 8/25/2026, 3:03:56 PM