Skip to content

Commit 75f3433

Browse files
committed
Show recipient name above address in send tile
1 parent 915ff81 commit 75f3433

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

src/components/scenes/SendScene2.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,8 @@ const SendComponent = (props: Props): React.ReactElement => {
543543
if (coreWallet != null && hiddenFeaturesMap.address !== true) {
544544
// TODO: Change API of AddressTile to access undefined recipientAddress
545545
const { publicAddress = '', otherParams = {} } = spendTarget
546-
const { fioAddress } = otherParams
546+
const { fioAddress, zanoAlias, znsName } = otherParams
547+
const recipientName = fioAddress ?? znsName ?? zanoAlias
547548
const title =
548549
lstrings.send_scene_send_to_address +
549550
(spendInfo.spendTargets.length > 1 ? ` ${(index + 1).toString()}` : '')
@@ -562,7 +563,7 @@ const SendComponent = (props: Props): React.ReactElement => {
562563
resetSendTransaction={handleResetSendTransaction(spendTarget)}
563564
lockInputs={lockTilesMap.address}
564565
isCameraOpen={doOpenCamera}
565-
fioToAddress={fioAddress}
566+
recipientName={recipientName}
566567
navigation={navigation as NavigationBase}
567568
/>
568569
)

src/components/tiles/AddressTile2.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ interface Props {
6464
resetSendTransaction: () => void
6565
lockInputs?: boolean
6666
isCameraOpen: boolean
67-
fioToAddress?: string
67+
/**
68+
* Friendly recipient name to render above the public address — e.g. a FIO
69+
* handle, Zano alias, or ZNS (.zcash) name. Display-only.
70+
*/
71+
recipientName?: string
6872
navigation: NavigationBase
6973
}
7074

@@ -73,7 +77,7 @@ export const AddressTile2 = React.forwardRef(
7377
const {
7478
coreWallet,
7579
tokenId,
76-
fioToAddress,
80+
recipientName,
7781
isCameraOpen,
7882
lockInputs,
7983
navigation,
@@ -511,8 +515,8 @@ export const AddressTile2 = React.forwardRef(
511515
enter={{ type: 'stretchInY' }}
512516
exit={{ type: 'stretchOutY' }}
513517
>
514-
{fioToAddress == null ? null : (
515-
<EdgeText>{fioToAddress + '\n'}</EdgeText>
518+
{recipientName == null ? null : (
519+
<EdgeText>{recipientName + '\n'}</EdgeText>
516520
)}
517521
<EdgeText
518522
numberOfLines={6}

0 commit comments

Comments
 (0)