From 02849504d0cf359b624f140cd2dd91cb933be821 Mon Sep 17 00:00:00 2001 From: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com> Date: Mon, 29 Apr 2024 19:42:42 +0200 Subject: [PATCH] Don't set with_minimum_amount for accounts when they have a staking feature (#2240) --- .../api/block_builder/transaction_builder/transition.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sdk/src/client/api/block_builder/transaction_builder/transition.rs b/sdk/src/client/api/block_builder/transaction_builder/transition.rs index f7cb4eef02..7cbcdcd690 100644 --- a/sdk/src/client/api/block_builder/transaction_builder/transition.rs +++ b/sdk/src/client/api/block_builder/transaction_builder/transition.rs @@ -172,7 +172,11 @@ impl TransactionBuilder { .with_features(features); match new_amount { Some(amount) => builder = builder.with_amount(amount), - None => builder = builder.with_minimum_amount(self.protocol_parameters.storage_score_parameters()), + None => { + if input.features().staking().is_none() { + builder = builder.with_minimum_amount(self.protocol_parameters.storage_score_parameters()); + } + } } // Block issuers cannot move their mana elsewhere.