diff --git a/test/functional/test_framework/wallet_rpc_controller.py b/test/functional/test_framework/wallet_rpc_controller.py index 136c4f410a..45bde52bc2 100644 --- a/test/functional/test_framework/wallet_rpc_controller.py +++ b/test/functional/test_framework/wallet_rpc_controller.py @@ -245,7 +245,7 @@ async def create_stake_pool(self, return "The transaction was submitted successfully" async def decommission_stake_pool(self, pool_id: str) -> str: - self._write_command("staking_decommission_pool", [self.account, pool_id, {'in_top_x_mb': 5}])['result'] + self._write_command("staking_decommission_pool", [self.account, pool_id, None, {'in_top_x_mb': 5}])['result'] return "The transaction was submitted successfully" async def list_pool_ids(self) -> List[PoolData]: diff --git a/wallet/src/wallet/tests.rs b/wallet/src/wallet/tests.rs index b95198fd98..c718442d68 100644 --- a/wallet/src/wallet/tests.rs +++ b/wallet/src/wallet/tests.rs @@ -3888,6 +3888,8 @@ fn sign_decommission_pool_request_between_accounts(#[case] seed: Seed) { 1, ); + assert_eq!(get_coin_balance(&wallet), Amount::ZERO); + let pool_ids = wallet.get_pool_ids(acc_0_index, WalletPoolsFilter::All).unwrap(); assert_eq!(pool_ids.len(), 1); @@ -3921,20 +3923,11 @@ fn sign_decommission_pool_request_between_accounts(#[case] seed: Seed) { .into_signed_tx() .unwrap(); - let _ = create_block(&chain_config, &mut wallet, vec![signed_tx], Amount::ZERO, 1); + let _ = create_block(&chain_config, &mut wallet, vec![signed_tx], Amount::ZERO, 2); - let currency_balances = wallet - .get_balance( - acc_1_index, - UtxoType::Transfer | UtxoType::LockThenTransfer | UtxoType::CreateStakePool, - UtxoState::Confirmed.into(), - WithLocked::Unlocked, - ) - .unwrap(); - assert_eq!( - currency_balances.get(&Currency::Coin).copied().unwrap_or(Amount::ZERO), - pool_amount, - ); + // the pool amount is back after decommission + assert_eq!(get_coin_balance(&wallet), pool_amount); + assert_eq!(get_coin_balance_for_acc(&wallet, acc_1_index), Amount::ZERO); } #[rstest] @@ -4020,7 +4013,7 @@ fn sign_decommission_pool_request_cold_wallet(#[case] seed: Seed) { &mut hot_wallet, vec![signed_tx], Amount::ZERO, - 1, + 2, ); let currency_balances = hot_wallet