diff --git a/backend/canisters/registry/impl/src/updates/add_token.rs b/backend/canisters/registry/impl/src/updates/add_token.rs index 63b1577d0f..b611e71254 100644 --- a/backend/canisters/registry/impl/src/updates/add_token.rs +++ b/backend/canisters/registry/impl/src/updates/add_token.rs @@ -131,7 +131,7 @@ async fn add_token_impl( } Err(message) => { error!(%user_id, ?message, "Error transferring listing fee"); - return PaymentFailed("message".to_string()); + return PaymentFailed(message.to_string()); } } } diff --git a/backend/integration_tests/src/client/user.rs b/backend/integration_tests/src/client/user.rs index 5f5c022560..857960d92b 100644 --- a/backend/integration_tests/src/client/user.rs +++ b/backend/integration_tests/src/client/user.rs @@ -508,6 +508,9 @@ pub mod happy_path { pub fn approve_transfer(env: &mut PocketIc, user: &User, args: &user_canister::approve_transfer::Args) { let response = super::approve_transfer(env, user.principal, user.canister(), args); - assert!(matches!(response, user_canister::approve_transfer::Response::Success)); + match response { + user_canister::approve_transfer::Response::Success => (), + response => panic!("'approve_transfer' error: {response:?}"), + }; } } diff --git a/backend/integration_tests/src/registry_tests.rs b/backend/integration_tests/src/registry_tests.rs index 9ad20793fe..b672a9061b 100644 --- a/backend/integration_tests/src/registry_tests.rs +++ b/backend/integration_tests/src/registry_tests.rs @@ -10,7 +10,6 @@ use std::ops::Deref; use std::time::Duration; use testing::rng::{random_principal, random_string}; use types::{CanisterId, Cryptocurrency}; -use utils::consts::SNS_GOVERNANCE_CANISTER_ID; #[test] fn add_token_succeeds() { @@ -44,7 +43,10 @@ fn add_token_succeeds() { }, ); - assert!(matches!(add_token_response, registry_canister::add_token::Response::Success)); + match add_token_response { + registry_canister::add_token::Response::Success => (), + response => panic!("'add_token' error: {response:?}"), + }; env.tick(); @@ -197,9 +199,9 @@ fn init_test_data(env: &mut PocketIc, canister_ids: &CanisterIds, controller: Pr env, &user, &user_canister::approve_transfer::Args { - spender: SNS_GOVERNANCE_CANISTER_ID.into(), // CHAT BURN address + spender: canister_ids.registry.into(), ledger_canister_id: Cryptocurrency::CHAT.ledger_canister_id().unwrap(), - amount: 100_000_000, + amount: 100_000_000 + Cryptocurrency::CHAT.fee().unwrap(), expires_in: None, pin: None, },