Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased (develop)

- fixed: Say "edit name" instead of "edit settings" on the create/split wallet scene when the listed wallets have no settings to edit

## 4.51.0 (staging)

- added: Push info-server attestation tokens into edge-core-js via `setAttestationToken` so the login server can skip CAPTCHA for attested devices, and allow `LOGIN_SERVER` / `INFO_SERVER` env overrides for local E2E stacks.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ exports[`CreateWalletEditNameComponent should render with loading props 1`] = `
]
}
>
Tap on wallet to edit settings
Tap on wallet to edit name
</Text>
<RCTScrollView
automaticallyAdjustContentInsets={false}
Expand Down
19 changes: 18 additions & 1 deletion src/components/scenes/CreateWalletEditNameScene.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,21 @@ const CreateWalletEditNameComponent: React.FC<Props> = props => {
)
)

// Tapping a row opens the wallet settings modal, which only shows a name
// field unless the asset declares its own settings (Monero's backend picker).
// Promise settings in the instructions only when a listed wallet has some,
// otherwise the tap does nothing but rename. Splits never qualify, since no
// splittable asset declares wallet settings.
const hasWalletSettings = React.useMemo(
() =>
createWalletList.some(item => {
if (item.walletType == null) return false
const settings = SPECIAL_CURRENCY_INFO[item.pluginId]?.walletSettings
return settings != null && settings.length > 0
}),
[createWalletList]
)

const handleEditWalletName = useHandler(
async (key: string, currentName: string, pluginId: string) => {
const result = await Airship.show<WalletSettingsResult | undefined>(
Expand Down Expand Up @@ -427,7 +442,9 @@ const CreateWalletEditNameComponent: React.FC<Props> = props => {
</Paragraph>
)}
<EdgeText style={styles.instructionalText} numberOfLines={1}>
{lstrings.fragment_create_wallet_edit_settings_instructions}
{hasWalletSettings
? lstrings.fragment_create_wallet_edit_settings_instructions
: lstrings.fragment_create_wallet_instructions}
</EdgeText>
<FlatList
automaticallyAdjustContentInsets={false}
Expand Down
Loading