From 5dbb148136d143905958a97ef7eecb4e8ebe45e6 Mon Sep 17 00:00:00 2001 From: lauchaves Date: Tue, 30 Jul 2024 23:53:41 -0600 Subject: [PATCH 1/3] 1160: Fix msg with proper amount --- near-contract-standards/src/non_fungible_token/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/near-contract-standards/src/non_fungible_token/utils.rs b/near-contract-standards/src/non_fungible_token/utils.rs index bdee20b2e..ecc25de5c 100644 --- a/near-contract-standards/src/non_fungible_token/utils.rs +++ b/near-contract-standards/src/non_fungible_token/utils.rs @@ -33,7 +33,7 @@ pub fn refund_deposit_to_account(storage_used: u64, account_id: AccountId) { require!( required_cost <= attached_deposit, - format!("Must attach {} yoctoNEAR to cover storage", required_cost) + format!("Must attach {} yoctoNEAR to cover storage", required_cost.exact_amount_display()) ); let refund = attached_deposit.saturating_sub(required_cost); From 80a9a56703958152af927d90144c8b6a464e68e9 Mon Sep 17 00:00:00 2001 From: Vlad Frolov Date: Wed, 31 Jul 2024 08:53:31 +0200 Subject: [PATCH 2/3] Fixed the formatted message --- near-contract-standards/src/non_fungible_token/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/near-contract-standards/src/non_fungible_token/utils.rs b/near-contract-standards/src/non_fungible_token/utils.rs index ecc25de5c..797ab71b5 100644 --- a/near-contract-standards/src/non_fungible_token/utils.rs +++ b/near-contract-standards/src/non_fungible_token/utils.rs @@ -33,7 +33,7 @@ pub fn refund_deposit_to_account(storage_used: u64, account_id: AccountId) { require!( required_cost <= attached_deposit, - format!("Must attach {} yoctoNEAR to cover storage", required_cost.exact_amount_display()) + format!("Must attach {} to cover storage", required_cost.exact_amount_display()) ); let refund = attached_deposit.saturating_sub(required_cost); From 1b09abb5b0d9bb3787a92a2f16b7bbc514c6492a Mon Sep 17 00:00:00 2001 From: lauchaves Date: Wed, 31 Jul 2024 09:08:01 -0600 Subject: [PATCH 3/3] 1160: bump near-token crate version to latest --- near-sdk/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/near-sdk/Cargo.toml b/near-sdk/Cargo.toml index e2e4393c4..c94aa12e1 100644 --- a/near-sdk/Cargo.toml +++ b/near-sdk/Cargo.toml @@ -32,7 +32,7 @@ once_cell = { version = "1.17", default-features = false } near-account-id = { version = "1.0.0", features = ["serde", "borsh"] } near-gas = { version = "0.2.3", features = ["serde", "borsh"] } -near-token = { version = "0.2.0", features = ["serde", "borsh"] } +near-token = { version = "0.2.1", features = ["serde", "borsh"] } [target.'cfg(target_arch = "wasm32")'.dependencies] wee_alloc = { version = "0.4.5", default-features = false, optional = true }