Skip to content

Commit 575d68f

Browse files
bogwarclaude
andcommitted
fix(ic-icrc1-index-ng): handle AuthorizedMint and AuthorizedBurn in match arms
- process_balance_changes: credit to/debit from (no fee involved) - get_accounts: return affected account (to for mint, from for burn) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f26b151 commit 575d68f

File tree

1 file changed

+8
-0
lines changed
  • rs/ledger_suite/icrc1/index-ng/src

1 file changed

+8
-0
lines changed

rs/ledger_suite/icrc1/index-ng/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,12 @@ fn process_balance_changes(block_index: BlockIndex64, block: &Block<Tokens>) {
985985
} => {
986986
// Does not affect the balance
987987
}
988+
Operation::AuthorizedMint { to, amount, .. } => {
989+
credit(block_index, to, amount);
990+
}
991+
Operation::AuthorizedBurn { from, amount, .. } => {
992+
debit(block_index, from, amount);
993+
}
988994
},
989995
);
990996
}
@@ -1028,6 +1034,8 @@ fn get_accounts(block: &Block<Tokens>) -> Vec<Account> {
10281034
}
10291035
Operation::Approve { from, .. } => vec![from],
10301036
Operation::FeeCollector { .. } => vec![],
1037+
Operation::AuthorizedMint { to, .. } => vec![to],
1038+
Operation::AuthorizedBurn { from, .. } => vec![from],
10311039
}
10321040
}
10331041

0 commit comments

Comments
 (0)