File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use std::time::Duration as StdDuration;
99use either:: Either ;
1010use masp_primitives:: transaction:: components:: sapling:: builder:: BuildParams ;
1111use masp_primitives:: zip32:: PseudoExtendedKey ;
12- use namada_core:: address:: Address ;
12+ use namada_core:: address:: { Address , MASP } ;
1313use namada_core:: chain:: { BlockHeight , ChainId , Epoch } ;
1414use namada_core:: collections:: HashMap ;
1515use namada_core:: dec:: Dec ;
@@ -677,7 +677,18 @@ impl TxOsmosisSwap<SdkTypes> {
677677 break ' frontend_sus_fee None ;
678678 }
679679
680- let fee_receiver = target. effective_address ( ) ;
680+ let fee_receiver = match target {
681+ crate :: TransferTarget :: Address ( MASP )
682+ | crate :: TransferTarget :: PaymentAddress ( _)
683+ | crate :: TransferTarget :: Ibc ( _) => {
684+ return Err ( Error :: Other (
685+ "Only transparent sus fee receivers are supported in \
686+ Osmosis shielded swaps"
687+ . to_owned ( ) ,
688+ ) ) ;
689+ }
690+ crate :: TransferTarget :: Address ( addr) => addr. clone ( ) ,
691+ } ;
681692 let fee_amount = tx:: compute_raw_masp_frontend_sus_fee (
682693 & trade_min_output_amount,
683694 percentage,
You can’t perform that action at this time.
0 commit comments