Skip to content

Commit

Permalink
fix: ICRC-1 transaction kind is expected to be transfer not xfer
Browse files Browse the repository at this point in the history
  • Loading branch information
yanliu38 committed Jan 31, 2025
1 parent 8937c55 commit 8a49a75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/src/account_transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ impl From<FundsTransfer> for Transaction {
}
} else {
Transaction {
kind: "xfer".into(),
kind: "transfer".into(),
mint: None,
burn: None,
transfer: Some(Transfer {
Expand Down
5 changes: 4 additions & 1 deletion ic-canister/tests/test_icrc1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ fn test_multiple_transfers() {
assert_eq!(get_tx_response1.log_length, 10u8);

assert_eq!(get_tx_response1.transactions.len(), 1);
assert_eq!(get_tx_response1.transactions[0].kind, "xfer".to_string());
assert_eq!(
get_tx_response1.transactions[0].kind,
"transfer".to_string()
);

ctx.ffwd_to_next_block(ts_ns);

Expand Down

0 comments on commit 8a49a75

Please sign in to comment.