mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-25 00:05:46 +00:00
Tweak test to look at holds, not locks after polkadot-sdk@f5673cf (#1896)
This commit is contained in:
@@ -306,23 +306,19 @@ async fn storage_balance_lock() -> Result<(), subxt::Error> {
|
|||||||
.find_first::<system::events::ExtrinsicSuccess>()?
|
.find_first::<system::events::ExtrinsicSuccess>()?
|
||||||
.expect("No ExtrinsicSuccess Event found");
|
.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()
|
.storage()
|
||||||
.at_latest()
|
.at_latest()
|
||||||
.await?
|
.await?
|
||||||
.fetch_or_default(&locks_addr)
|
.fetch_or_default(&holds_addr)
|
||||||
.await?;
|
.await?
|
||||||
|
.0;
|
||||||
|
|
||||||
assert_eq!(
|
// There is now a hold on the balance being staked
|
||||||
locks.0,
|
assert_eq!(holds.len(), 1);
|
||||||
vec![runtime_types::pallet_balances::types::BalanceLock {
|
assert_eq!(holds[0].amount, 100_000_000_000_000);
|
||||||
id: *b"staking ",
|
|
||||||
amount: 100_000_000_000_000,
|
|
||||||
reasons: runtime_types::pallet_balances::types::Reasons::All,
|
|
||||||
}]
|
|
||||||
);
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user