From ba1ca15ec45ecb91ac70d085775fe903ec9707dc Mon Sep 17 00:00:00 2001 From: Tal Derei Date: Sat, 21 Dec 2024 22:50:56 -0800 Subject: [PATCH] conditionally select between ephemeral and transparent bech32 encoding --- .../components/ui/tx/actions-views/isc20-withdrawal.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx b/packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx index cbc382a7..e110f7de 100644 --- a/packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx +++ b/packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx @@ -4,6 +4,7 @@ import { ActionDetails } from './action-details'; import { joinLoHiAmount } from '@penumbra-zone/types/amount'; import { getTransmissionKeyByAddress } from '@penumbra-zone/wasm/keys'; import { bech32TransparentAddress } from '@penumbra-zone/bech32m/tpenumbra'; +import { bech32mAddress } from '@penumbra-zone/bech32m/penumbra'; const getUtcTime = (time: bigint) => { const formatter = new Intl.DateTimeFormat('en-US', { @@ -38,9 +39,11 @@ export const Ics20WithdrawalComponent = ({ value }: { value: Ics20Withdrawal }) {value.returnAddress && ( - {bech32TransparentAddress({ - inner: getTransmissionKeyByAddress(value.returnAddress), - })} + {value.useTransparentAddress + ? bech32TransparentAddress({ + inner: getTransmissionKeyByAddress(value.returnAddress), + }) + : bech32mAddress(value.returnAddress)} )}