From de59da0a58994e7c3e77e9ee8a637e1b697b9a8d Mon Sep 17 00:00:00 2001 From: Jonathan Tzeng Date: Mon, 17 Aug 2026 12:06:20 -0700 Subject: [PATCH 1/2] Fix lint warnings in CreateWalletImportScene Convert the component to the React.FC form the lint rule expects. --- src/components/scenes/CreateWalletImportScene.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/scenes/CreateWalletImportScene.tsx b/src/components/scenes/CreateWalletImportScene.tsx index 5ee9f302db1..ebdb1c1f401 100644 --- a/src/components/scenes/CreateWalletImportScene.tsx +++ b/src/components/scenes/CreateWalletImportScene.tsx @@ -44,7 +44,7 @@ interface Props extends EdgeAppSceneProps<'createWalletImport'> {} const getOptionKey = (pluginId: string, opt: ImportKeyOption): string => `${pluginId}${opt.optionName}` -const CreateWalletImportComponent = (props: Props): React.JSX.Element => { +const CreateWalletImportComponent: React.FC = props => { const { navigation, route } = props const { createWalletList, walletNames, walletSettingValues } = route.params const theme = useTheme() From f5b6a1fa8ae17864efbb1c3820c77b1090e3a0d2 Mon Sep 17 00:00:00 2001 From: Jonathan Tzeng Date: Mon, 17 Aug 2026 12:08:11 -0700 Subject: [PATCH 2/2] Keep the Import Wallet Next button clear of the keyboard The scene rendered its content, including the Next button, inside a scroll view that did not react to the keyboard, so opening the keyboard to type a seed hid the button behind it. Shrink the scene to the space above the keyboard, keep the button pinned below the scrolling content, and let the key logo flex instead of holding a fixed 2 rem of margin. Drop the keyboard-dismiss steps the maestro import flows needed to reach the button. --- CHANGELOG.md | 1 + .../07-wallets/C000029a-migrate-wallets.yaml | 16 +- maestro/common/import-wallets.yaml | 23 +- .../CreateWalletImportScene.test.tsx.snap | 326 +++++++++++------- .../scenes/CreateWalletImportScene.tsx | 33 +- 5 files changed, 223 insertions(+), 176 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cfba92d8c57..98bda14dbd6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,7 @@ - fixed: Notification center cards no longer shrink their text to fit. Long titles and messages now truncate with an ellipsis so every card renders at the same size. - fixed: Sort the Privacy Settings Nym Mix Net asset list alphabetically by display name - fixed: Next button overlapping the wallet list on the Choose Wallets to Add scene +- fixed: Keyboard no longer covers the Next button on the Import Wallet scene. The scene now shrinks to the space above the keyboard, the content scrolls, and the key logo keeps at least 1 rem of space above and below it while still spreading out when the scene has room. - fixed: Wrap the fiat value in parentheses on the Stake/Unstake/Claim amount row, and remove the space between the fiat symbol and amount to match the network fee tile. - fixed: Staked "locked" balance in the wallet view no longer gets cut off. The crypto amount is truncated to an exchange-rate-appropriate number of decimals, and the text is no longer clamped to a fraction of the card width. - fixed: Improve the unstake error experience by replacing the popup alert and generic "unknown error occurred" with the real error in the scene's error field, and showing a clear message when the wallet lacks the balance to cover the unstaking network fee. diff --git a/maestro/07-wallets/C000029a-migrate-wallets.yaml b/maestro/07-wallets/C000029a-migrate-wallets.yaml index e166e442070..3c7047d98e8 100644 --- a/maestro/07-wallets/C000029a-migrate-wallets.yaml +++ b/maestro/07-wallets/C000029a-migrate-wallets.yaml @@ -96,20 +96,8 @@ tags: - tapOn: Private Key or Private Seed - inputText: ${IMPORT_SEED} -# Drop keyboard - Android -- runFlow: - when: - platform: Android - commands: - - hideKeyboard - # - tapOn: Next # odd additional tap required on android sometimes -# Drop keyboard - iOS -- runFlow: - when: - platform: iOS - commands: - - tapOn: "Private Key or Private Seed" - +# The Next button sits above the keyboard, so it is tappable without +# dismissing it first - tapOn: Next # Sometimes android requires additional tap diff --git a/maestro/common/import-wallets.yaml b/maestro/common/import-wallets.yaml index 0d6025a3f9a..48a5acd05fb 100644 --- a/maestro/common/import-wallets.yaml +++ b/maestro/common/import-wallets.yaml @@ -39,29 +39,10 @@ env: - tapOn: Private Key or Private Seed - inputText: ${SEED_PHRASE} -# Drop keyboard - Android -- runFlow: - when: - platform: Android - commands: - - hideKeyboard - - tapOn: "Enter your.*" -# Drop keyboard - iOS -- runFlow: - when: - platform: iOS - commands: - - tapOn: "Private Key or Private Seed" - +# The Next button sits above the keyboard, so it is tappable without +# dismissing it first - tapOn: Next -# # Sometimes android requires additional tap -# - runFlow: -# when: -# visible: Import Wallet -# commands: -# - tapOn: Next - # Add birthday height for Zcash and Pirate Chain # Index for targetting the correct "edit" icon - evalScript: ${var index = 0} diff --git a/src/__tests__/scenes/__snapshots__/CreateWalletImportScene.test.tsx.snap b/src/__tests__/scenes/__snapshots__/CreateWalletImportScene.test.tsx.snap index 14e26ace388..56e954049ba 100644 --- a/src/__tests__/scenes/__snapshots__/CreateWalletImportScene.test.tsx.snap +++ b/src/__tests__/scenes/__snapshots__/CreateWalletImportScene.test.tsx.snap @@ -2,6 +2,42 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` @@ -481,7 +531,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` }, ] } - nativeID="1" + nativeID="2" scale={0} style={ [ @@ -524,7 +574,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` }, ] } - nativeID="2" + nativeID="3" style={ [ { @@ -577,7 +627,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` }, ] } - nativeID="3" + nativeID="4" shift={0} style={ [ @@ -633,7 +683,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` }, ] } - nativeID="4" + nativeID="5" numberOfLines={1} scale={1} shift={0} @@ -706,7 +756,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` } keyboardType="email-address" multiline={true} - nativeID="5" + nativeID="6" numberOfLines={10} onBlur={[Function]} onChangeText={[Function]} @@ -802,7 +852,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` }, ] } - nativeID="6" + nativeID="7" scale={0} style={ [ @@ -837,7 +887,7 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` } } jestInlineStyle={{}} - nativeID="7" + nativeID="8" style={ [ { @@ -856,166 +906,174 @@ exports[`CreateWalletImportScene should render with loading props 1`] = ` + + + + - + - - - - Next - - + ], + null, + ] + } + > + Next + - + `; diff --git a/src/components/scenes/CreateWalletImportScene.tsx b/src/components/scenes/CreateWalletImportScene.tsx index ebdb1c1f401..80ff7191e2d 100644 --- a/src/components/scenes/CreateWalletImportScene.tsx +++ b/src/components/scenes/CreateWalletImportScene.tsx @@ -1,11 +1,11 @@ import type { JsonObject } from 'edge-core-js' import * as React from 'react' -import { Linking, Platform, View } from 'react-native' -import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view' +import { Linking, Platform, ScrollView, View } from 'react-native' import { sprintf } from 'sprintf-js' import { PLACEHOLDER_WALLET_ID } from '../../actions/CreateWalletActions' import ImportKeySvg from '../../assets/images/import-key-icon.svg' +import { SCROLL_INDICATOR_INSET_FIX } from '../../constants/constantSettings' import { type ImportKeyOption, SPECIAL_CURRENCY_INFO @@ -244,7 +244,7 @@ const CreateWalletImportComponent: React.FC = props => { ) return ( - + {/* We have to use the SceneHeaderUi4 component here because the SceneContainer component does not implement the specific flex @@ -252,7 +252,11 @@ const CreateWalletImportComponent: React.FC = props => { one-off case which has not been codified into our design hierarchy and made it completely into our abstraction (SceneContainer). */} - + = props => { })} ))} + + {/* The buttons sit outside the scroll view, so the keyboard can never + cover them: the scene shrinks to the space above the keyboard and the + scroll view absorbs the difference. */} + = props => { onPress: handleNext }} /> - + ) @@ -368,13 +377,23 @@ const CreateWalletImportComponent: React.FC = props => { const getStyles = cacheStyles((theme: Theme) => ({ container: { - flexShrink: 1, + flex: 1, margin: theme.rem(0.5) }, + scroll: { + // Take the space the header and buttons leave, and give it back as the + // keyboard opens, so the content scrolls instead of pushing the buttons off + // the bottom of the scene: + flex: 1 + }, icon: { flexDirection: 'row', + alignItems: 'center', justifyContent: 'center', - marginVertical: theme.rem(2) + marginVertical: theme.rem(1) + }, + buttons: { + flexShrink: 0 }, optionsHeading: { fontSize: theme.rem(1),