From 8a49a75d74e3e8cc747870f00118d92ab38724f0 Mon Sep 17 00:00:00 2001 From: Yan Liu Date: Fri, 31 Jan 2025 20:57:26 +0100 Subject: [PATCH] fix: ICRC-1 transaction kind is expected to be transfer not xfer --- common/src/account_transfers.rs | 2 +- ic-canister/tests/test_icrc1.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/src/account_transfers.rs b/common/src/account_transfers.rs index 262ed9c..a7a6d5e 100644 --- a/common/src/account_transfers.rs +++ b/common/src/account_transfers.rs @@ -530,7 +530,7 @@ impl From for Transaction { } } else { Transaction { - kind: "xfer".into(), + kind: "transfer".into(), mint: None, burn: None, transfer: Some(Transfer { diff --git a/ic-canister/tests/test_icrc1.rs b/ic-canister/tests/test_icrc1.rs index fd29ef8..18b8c7e 100644 --- a/ic-canister/tests/test_icrc1.rs +++ b/ic-canister/tests/test_icrc1.rs @@ -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);