From c8969e17623e2eff5d6c54454774a6c9ee4e737f Mon Sep 17 00:00:00 2001 From: Joshy Orndorff Date: Mon, 28 Jun 2021 16:13:19 -0400 Subject: [PATCH] Add public accessor for tip amount (#9219) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add public accessor for tip amount. * Update frame/transaction-payment/src/lib.rs Co-authored-by: Bastian Köcher Co-authored-by: Bastian Köcher --- substrate/frame/transaction-payment/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/substrate/frame/transaction-payment/src/lib.rs b/substrate/frame/transaction-payment/src/lib.rs index af1fcc5bfe..416439e7f2 100644 --- a/substrate/frame/transaction-payment/src/lib.rs +++ b/substrate/frame/transaction-payment/src/lib.rs @@ -525,6 +525,11 @@ impl ChargeTransactionPayment where Self(fee) } + /// Returns the tip as being choosen by the transaction sender. + pub fn tip(&self) -> BalanceOf { + self.0 + } + fn withdraw_fee( &self, who: &T::AccountId,