Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
check is altBech32m in address
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim committed Jul 13, 2023
1 parent 2000e47 commit c5b4ca3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 0 additions & 1 deletion src/components/BalanceAction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const BalanceAction: React.FC<IBalanceAction> = () => {
</div>

}
disabled
className='rounded-[50%] w-[51px] ext:pt-[14px] tablet:pt-[14px] ext:pb-[14px] tablet:pb-[14px]'
/>
<p className='text_button pt-[8px]'>Receive</p>
Expand Down
9 changes: 4 additions & 5 deletions src/components/penumbra/Address.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ export const AddressComponent: React.FC<{
show_full?: boolean
}> = ({ address, show_full }) => {
const prefix = 'penumbrav2t'
const address_str = bech32m.encode(
prefix,
bech32m.toWords(address.inner),
160
)
//TODO: delete address.altBech32m
const address_str = address.altBech32m
? address.altBech32m
: bech32m.encode(prefix, bech32m.toWords(address.inner), 160)
const address_str_short = address_str.slice(0, prefix.length + 1 + 24) + '…'
const display_address = show_full ? address_str : address_str_short

Expand Down

0 comments on commit c5b4ca3

Please sign in to comment.