Skip to content

Commit 40666b1

Browse files
committed
fix sub-prefix
1 parent 0e4093b commit 40666b1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

apps/src/lib/client/tx.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use namada::types::governance::{
2323
};
2424
use namada::types::key::*;
2525
use namada::types::nft::{self, Nft, NftToken};
26-
use namada::types::storage::Epoch;
26+
use namada::types::storage::{Epoch, RESERVED_ADDRESS_PREFIX};
2727
use namada::types::time::DateTimeUtc;
2828
use namada::types::transaction::governance::{
2929
InitProposalData, VoteProposalData,
@@ -538,7 +538,8 @@ pub async fn submit_ibc_transfer(ctx: Context, args: args::TxIbcTransfer) {
538538
let tx_code = ctx.read_wasm(TX_IBC_WASM);
539539

540540
let denom = match sub_prefix {
541-
Some(sp) => format!("{}/{}", sp, token),
541+
// To parse IbcToken address, remove the address prefix
542+
Some(sp) => sp.to_string().replace(RESERVED_ADDRESS_PREFIX, ""),
542543
None => token.to_string(),
543544
};
544545
let token = Some(Coin {

0 commit comments

Comments
 (0)