mirror of
https://gitlab.com/pezkuwichain/pezkuwi-sdk.git
synced 2026-10-21 03:06:29 +00:00
listen_deposits/listen_withdrawals matched the bridge address by checking whether a Debug-formatted string of the decoded dynamic Value contained a 10-char slice of the address's SS58 text - flagged earlier this session as unverified and provably broken (that same Debug string was also fed into convert_ss58_prefix, which only parses real SS58 text and could never have succeeded on it). Added account_id_from_dynamic(), which decodes an AccountId32's actual 32 bytes out of the event field (peeling the single-item composite wrapper subxt's dynamic API adds, same nesting seen in Tiki storage this session) and account_bytes_to_ss58() to re-encode them properly. Both listeners now compare raw bytes against the target address instead of matching strings, and derive the sender's real SS58 address for logging and convert_ss58_prefix() instead of a Debug string. Verified against a live event, not just read: sent a real 1 wUSDT transfer from Treasury_1 to the multisig and confirmed the decoder correctly extracted and matched the multisig's AccountId32 bytes from the resulting Assets.Transferred event.