Contracts: seal0::balance should return the free balance (#1254)

This commit is contained in:
Cyrill Leutwiler authored and GitHub committed 2023-09-01 15:33:15 +03:00
1 parent e165eacd58
commit 24c41f10bb
4 files changed
+128 -7

No files matched your search

+6 -2
View File
@@ -30,7 +30,7 @@ use frame_support::{
storage::{with_transaction, TransactionOutcome},
traits::{
fungible::{Inspect, Mutate},
tokens::Preservation,
tokens::{Fortitude, Preservation},
Contains, OriginTrait, Randomness, Time,
},
weights::Weight,
@@ -1368,7 +1368,11 @@ where
}
fn balance(&self) -> BalanceOf<T> {
T::Currency::balance(&self.top_frame().account_id)
T::Currency::reducible_balance(
&self.top_frame().account_id,
Preservation::Preserve,
Fortitude::Polite,
)
}
fn value_transferred(&self) -> BalanceOf<T> {