Skip to content

Commit

Permalink
conditionally select between ephemeral and transparent bech32 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
TalDerei committed Dec 22, 2024
1 parent 44c64b0 commit ba1ca15
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', {
Expand Down Expand Up @@ -38,9 +39,11 @@ export const Ics20WithdrawalComponent = ({ value }: { value: Ics20Withdrawal })
{value.returnAddress && (
<ActionDetails.Row label='Return Address'>
<span className='truncate max-w-[125px]'>
{bech32TransparentAddress({
inner: getTransmissionKeyByAddress(value.returnAddress),
})}
{value.useTransparentAddress
? bech32TransparentAddress({

Check failure on line 43 in packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unsafe call of a(n) `error` type typed value
inner: getTransmissionKeyByAddress(value.returnAddress),

Check failure on line 44 in packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unsafe assignment of an error typed value

Check failure on line 44 in packages/ui/components/ui/tx/actions-views/isc20-withdrawal.tsx

View workflow job for this annotation

GitHub Actions / Lint

Unsafe call of a(n) `error` type typed value
})
: bech32mAddress(value.returnAddress)}
</span>
</ActionDetails.Row>
)}
Expand Down

0 comments on commit ba1ca15

Please sign in to comment.