Skip to content

fix: dev_token_lib supply/2 3 & user_supply/3 balances sum fix#835

Merged
charmful0x merged 4 commits intoaudit/tokenfrom
audit/token-lib
Apr 10, 2026
Merged

fix: dev_token_lib supply/2 3 & user_supply/3 balances sum fix#835
charmful0x merged 4 commits intoaudit/tokenfrom
audit/token-lib

Conversation

@charmful0x
Copy link
Copy Markdown

@charmful0x charmful0x commented Apr 10, 2026

this PR fixe inconsistency bugs in dev_token_lib.erl

  • supply/2 - supply/3 and user_supply/3 did lists:sum on mapped values where they could contained trie@1.0 KVs when using supply (or other fns) on dev_token (or whatever device that uses dev_trie for balances). fixed that bu filtering by is_numer/1 before sum, and added the post-fix repro test

  • unsubscribe/4 was incorrectly passing Action for <<"action">> instead of only to <<"subscribe-action">> - fixed that:

        #{
            <<"action">> => <<"unsubscribe">>,
            <<"subscribe-action">> => Action,
            <<"subscribe-target">> => Target
        },

@charmful0x charmful0x merged commit 92825a1 into audit/token Apr 10, 2026
@charmful0x charmful0x deleted the audit/token-lib branch April 10, 2026 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant