Skip to content

Commit f4a2b32

Browse files
authored
fix byte fee for send_note (#1722)
* fix byte fee for send_note * fmt
1 parent 6809b0f commit f4a2b32

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app-libs/stf/src/trusted_call.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,9 @@ fn get_fee_for(tc: &TrustedCallSigned, fee_asset: Option<AssetId>) -> Fee {
985985
TrustedCall::assets_transfer(_, _, _asset_id, ..) => one / STF_TX_FEE_UNIT_DIVIDER,
986986
TrustedCall::force_unshield_all(..) => 0, // root call, will be charged on affected account
987987
TrustedCall::add_session_proxy(..) => one / STF_TX_FEE_UNIT_DIVIDER,
988-
TrustedCall::send_note(..) => one / STF_TX_FEE_UNIT_DIVIDER,
988+
TrustedCall::send_note(_, _, note) =>
989+
one / STF_TX_FEE_UNIT_DIVIDER
990+
+ (one.saturating_mul(Balance::from(note.len() as u32))) / STF_BYTE_FEE_UNIT_DIVIDER,
989991
#[cfg(feature = "evm")]
990992
TrustedCall::evm_call(..) => one / STF_TX_FEE_UNIT_DIVIDER,
991993
#[cfg(feature = "evm")]

0 commit comments

Comments
 (0)