Skip to content

Commit 886c527

Browse files
authored
Fix fee withdrawal validation (#139)
* Fix fee withdrawal validation * Add TODO
1 parent c633842 commit 886c527

File tree

1 file changed

+8
-0
lines changed
  • runtimes/shared-configuration/src

1 file changed

+8
-0
lines changed

runtimes/shared-configuration/src/fee.rs

+8
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,14 @@ where
141141
return Ok(None)
142142
}
143143

144+
// TODO: This is a temporary workaround.
145+
// As soon the linked PR is merged, the fungible trait will be updated and this can be safely removed.
146+
// This will probably be included in v1.6 or 1.7.
147+
// src: https://github.com/paritytech/polkadot-sdk/pull/2823
148+
if F::can_withdraw(who, fee) != frame_support::traits::tokens::WithdrawConsequence::Success {
149+
return Err(InvalidTransaction::Payment.into())
150+
};
151+
144152
match F::withdraw(
145153
who,
146154
fee,

0 commit comments

Comments
 (0)