Skip to content

Commit

Permalink
Tweak test to look at holds, not locks after polkadot-sdk@f5673cf (#1896
Browse files Browse the repository at this point in the history
)
  • Loading branch information
jsdw authored Jan 20, 2025
1 parent ba4727f commit dff4dab
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions testing/integration-tests/src/full_client/frame/balances.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,23 +306,19 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> {
.find_first::<system::events::ExtrinsicSuccess>()?
.expect("No ExtrinsicSuccess Event found");

let locks_addr = node_runtime::storage().balances().locks(bob);
let holds_addr = node_runtime::storage().balances().holds(bob);

let locks = api
let holds = api
.storage()
.at_latest()
.await?
.fetch_or_default(&locks_addr)
.await?;
.fetch_or_default(&holds_addr)
.await?
.0;

assert_eq!(
locks.0,
vec![runtime_types::pallet_balances::types::BalanceLock {
id: *b"staking ",
amount: 100_000_000_000_000,
reasons: runtime_types::pallet_balances::types::Reasons::All,
}]
);
// There is now a hold on the balance being staked
assert_eq!(holds.len(), 1);
assert_eq!(holds[0].amount, 100_000_000_000_000);

Ok(())
}
Expand Down

0 comments on commit dff4dab

Please sign in to comment.