mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Tip payment is a different withdraw reason. (#3937)
* Tip payment is a different withdraw reason. * Bump runtime version. * Test fix. * Fix lock type
This commit is contained in:
@@ -642,7 +642,7 @@ fn transfer<'a, T: Trait, V: Vm<T>, L: Loader<T>>(
|
||||
if would_create && value < ctx.config.existential_deposit {
|
||||
return Err("value too low to create account");
|
||||
}
|
||||
T::Currency::ensure_can_withdraw(transactor, value, WithdrawReason::Transfer, new_from_balance)?;
|
||||
T::Currency::ensure_can_withdraw(transactor, value, WithdrawReason::Transfer.into(), new_from_balance)?;
|
||||
|
||||
let new_to_balance = match to_balance.checked_add(&value) {
|
||||
Some(b) => b,
|
||||
|
||||
@@ -215,7 +215,7 @@ pub fn buy_gas<T: Trait>(
|
||||
let imbalance = T::Currency::withdraw(
|
||||
transactor,
|
||||
cost,
|
||||
WithdrawReason::Fee,
|
||||
WithdrawReason::Fee.into(),
|
||||
ExistenceRequirement::KeepAlive
|
||||
)?;
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ fn try_evict_or_and_pay_rent<T: Trait>(
|
||||
let can_withdraw_rent = T::Currency::ensure_can_withdraw(
|
||||
account,
|
||||
dues_limited,
|
||||
WithdrawReason::Fee,
|
||||
WithdrawReason::Fee.into(),
|
||||
balance.saturating_sub(dues_limited),
|
||||
)
|
||||
.is_ok();
|
||||
@@ -129,7 +129,7 @@ fn try_evict_or_and_pay_rent<T: Trait>(
|
||||
let imbalance = T::Currency::withdraw(
|
||||
account,
|
||||
dues_limited,
|
||||
WithdrawReason::Fee,
|
||||
WithdrawReason::Fee.into(),
|
||||
ExistenceRequirement::KeepAlive,
|
||||
)
|
||||
.expect(
|
||||
|
||||
Reference in New Issue
Block a user