Skip to content

Commit

Permalink
pink: Remove system requirements for balance_of
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Mar 28, 2024
1 parent 021a8c1 commit a756b54
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion crates/pink/runtime/src/runtime/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ impl PinkExtBackend for CallInQuery {
&self,
account: ext::AccountId,
) -> Result<(pink::Balance, pink::Balance), Self::Error> {
self.ensure_system()?;
let account: AccountId32 = account.convert_to();
let total = crate::runtime::Balances::total_balance(&account);
let free = crate::runtime::Balances::free_balance(&account);
Expand Down
2 changes: 1 addition & 1 deletion crates/pink/runtime/tests/test_pink_contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ fn test_get_balance() {
.call()
.direct_balance_of(TEST_ADDRESS.convert_to())
.query(&mut cluster);
assert!(result.is_err());
assert_eq!(result.unwrap().0, balance);

let result = checker
.call()
Expand Down

0 comments on commit a756b54

Please sign in to comment.