Skip to content

Commit

Permalink
fix: #1957: ibc deposit form
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax committed Dec 23, 2024
1 parent 8bfaf65 commit b0f36d2
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions apps/minifront/src/state/ibc-in/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,18 +203,22 @@ async function execute(

const transferToken = fromDisplayAmount(assetMetadata, coin.displayDenom, amount);

const { address: t_addr, encoding: encoding } = await penumbra
.service(ViewService)
.transparentAddress(new TransparentAddressRequest({}));
if (!t_addr) {
throw new Error('Error with generating IBC transparent address');
}

// Temporary: detect USDC Noble inbound transfers, and use a transparent (t-addr) encoding
// to ensure Bech32 encoding compatibility.
if (transferToken.denom.includes('uusdc') && bech32ChainIds.includes(selectedChain.chainId)) {
// Set the reciever address to the t-addr encoding.
penumbraAddress = encoding;
// Set the receiver address to the t-addr encoding.
try {
const { address: t_addr, encoding: encoding } = await penumbra
.service(ViewService)
.transparentAddress(new TransparentAddressRequest({}));
if (!t_addr) {
throw new Error('Error with generating IBC transparent address');
}

penumbraAddress = encoding;
} catch (_) {
throw new Error('Error with generating IBC transparent address');
}
}

const params: MsgTransfer = {
Expand Down

0 comments on commit b0f36d2

Please sign in to comment.