Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(setup-wallet): titles and hw wallet prod #3192

Merged
merged 2 commits into from
Apr 16, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,25 @@ export const AddWalletNavigator = () => {
<Stack.Screen
name="setup-wallet-choose-setup-type"
component={ChooseSetupTypeScreen}
options={{title: strings.addWalletTitle}}
options={{title: strings.addNewWalletTitle}}
/>

<Stack.Screen
name="setup-wallet-choose-network"
name="setup-wallet-create-choose-network"
component={ChooseNetworkScreen}
options={{title: strings.addWalletTitle}}
options={{title: strings.createWalletTitle}}
/>

<Stack.Screen
name="setup-wallet-choose-mnemonic-type"
name="setup-wallet-restore-choose-network"
component={ChooseNetworkScreen}
options={{title: strings.restoreWalletTitle}}
/>

<Stack.Screen
name="setup-wallet-restore-choose-mnemonic-type"
component={ChooseMnemonicTypeScreen}
options={{title: strings.addWalletTitle}}
options={{title: strings.restoreWalletTitle}}
/>

<Stack.Screen
Expand Down Expand Up @@ -108,19 +114,19 @@ export const AddWalletNavigator = () => {
<Stack.Screen //
name="setup-wallet-about-recovery-phase"
component={AboutRecoveryPhraseScreen}
options={{title: strings.mnemonicShowTitle}}
options={{title: strings.createWalletTitle}}
/>

<Stack.Screen
name="setup-wallet-recovery-phrase-mnemonic"
component={RecoveryPhraseScreen}
options={{title: strings.mnemonicShowTitle}}
options={{title: strings.createWalletTitle}}
/>

<Stack.Screen
name="setup-wallet-verify-recovery-phrase-mnemonic"
component={VerifyRecoveryPhraseScreen}
options={{title: strings.mnemonicCheckTitle}}
options={{title: strings.createWalletTitle}}
/>
</Stack.Navigator>
)
Expand All @@ -129,13 +135,13 @@ export const AddWalletNavigator = () => {
const ConnectNanoXScreenWrapper = () => <ConnectNanoXScreen />

const messages = defineMessages({
addWalletTitle: {
addNewWalletTitle: {
id: 'components.walletinit.walletinitscreen.title',
defaultMessage: '!!!Add wallet',
defaultMessage: '!!!Add new wallet',
},
createWalletTitle: {
id: 'components.walletinit.createwallet.createwalletscreen.title',
defaultMessage: '!!!Create a new wallet',
defaultMessage: '!!!Create wallet',
},
restoreWalletTitle: {
id: 'components.walletinit.restorewallet.restorewalletscreen.title',
Expand Down Expand Up @@ -183,7 +189,7 @@ const useStrings = () => {
const intl = useIntl()

return {
addWalletTitle: intl.formatMessage(messages.addWalletTitle),
addNewWalletTitle: intl.formatMessage(messages.addNewWalletTitle),
createWalletTitle: intl.formatMessage(messages.createWalletTitle),
restoreWalletTitle: intl.formatMessage(messages.restoreWalletTitle),
importReadOnlyTitle: intl.formatMessage(messages.importReadOnlyTitle),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const useNavigateTo = () => {
return React.useRef({
create: () => navigation.navigate('setup-wallet-about-recovery-phase'),
restore: () => navigation.navigate('setup-wallet-restore-form'),
mnemonicType: () => navigation.navigate('setup-wallet-choose-mnemonic-type'),
mnemonicType: () => navigation.navigate('setup-wallet-restore-choose-mnemonic-type'),
hw: () => navigation.navigate('setup-wallet-check-nano-x'),
}).current
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ export const ChooseSetupTypeScreen = () => {
return
}

navigation.navigate('setup-wallet-choose-network')
// On production the step of network is skipped
navigation.navigate('setup-wallet-create-choose-network')
}

const handleRestore = () => {
setUpTypeChanged('restore')

if (isProduction()) {
banklesss marked this conversation as resolved.
Show resolved Hide resolved
networkIdChanged(HASKELL_SHELLEY.NETWORK_ID)
navigation.navigate('setup-wallet-choose-mnemonic-type')
navigation.navigate('setup-wallet-restore-choose-mnemonic-type')
return
}

navigation.navigate('setup-wallet-choose-network')
// On production the step of network is skipped
navigation.navigate('setup-wallet-restore-choose-network')
}

const handleHw = () => {
Expand All @@ -71,7 +73,8 @@ export const ChooseSetupTypeScreen = () => {
return
}

navigation.navigate('setup-wallet-choose-network')
// On production the step of network is skipped
navigation.navigate('setup-wallet-restore-choose-network')
}

return (
Expand Down
4 changes: 2 additions & 2 deletions apps/wallet-mobile/src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@
"components.walletinit.createwallet.createwalletscreen.passwordLengthRequirement": "Minimum {requiredPasswordLength} characters",
"components.walletinit.createwallet.createwalletscreen.notFound": "Not found",
"components.walletinit.createwallet.createwalletscreen.clearAll": "Clear all",
"components.walletinit.createwallet.createwalletscreen.title": "Create a new wallet",
"components.walletinit.createwallet.createwalletscreen.title": "Create wallet",
"components.walletinit.createwallet.mnemonicbackupimportancemodal.confirmationButton": "I understand",
"components.walletinit.createwallet.mnemonicbackupimportancemodal.keysStorageCheckbox": "I understand that my secret keys are held securely on this device only, not on the company`s servers",
"components.walletinit.createwallet.mnemonicbackupimportancemodal.newDeviceRecoveryCheckbox": "I understand that if this application is moved to another device or deleted, my funds can be only recovered with the backup phrase that I have written down and saved in a secure place.",
Expand Down Expand Up @@ -635,7 +635,7 @@
"components.walletinit.walletinitscreen.restoreNWordWalletExplanation": "If you have a recovery phrase consisting of {mnemonicLength} words, choose this option to restore your wallet.",
"components.walletinit.walletinitscreen.restoreShelleyWalletButton": "Restore wallet (Shelley Testnet)",
"components.walletinit.walletinitscreen.restoreWalletButton": "Restore wallet",
"components.walletinit.walletinitscreen.title": "Add wallet",
"components.walletinit.walletinitscreen.title": "Add new wallet",
"components.walletselection.walletselectionscreen.addWalletButton": "Add wallet",
"components.walletselection.walletselectionscreen.addWalletOnShelleyButton": "Add wallet (Jormungandr ITN)",
"components.walletselection.walletselectionscreen.header": "My wallets",
Expand Down
5 changes: 3 additions & 2 deletions apps/wallet-mobile/src/navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,9 @@ export type WalletStackRouteNavigation = StackNavigationProp<WalletStackRoutes>

export type WalletInitRoutes = {
'setup-wallet-choose-setup-type': undefined
'setup-wallet-choose-network': undefined
'setup-wallet-choose-mnemonic-type': undefined
'setup-wallet-create-choose-network': undefined
'setup-wallet-restore-choose-network': undefined
'setup-wallet-restore-choose-mnemonic-type': undefined
'initial-setup-wallet-choose-setup-type': undefined
'setup-wallet-details-form': undefined
'setup-wallet-restore-form': undefined
Expand Down
80 changes: 40 additions & 40 deletions apps/wallet-mobile/translations/messages/src/WalletNavigator.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,149 +4,149 @@
"defaultMessage": "!!!Transactions",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 227,
"line": 230,
"column": 22,
"index": 8024
"index": 8180
},
"end": {
"line": 230,
"line": 233,
"column": 3,
"index": 8127
"index": 8283
}
},
{
"id": "components.txhistory.txnavigationbuttons.sendButton",
"defaultMessage": "!!!Send",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 231,
"line": 234,
"column": 14,
"index": 8143
"index": 8299
},
"end": {
"line": 234,
"line": 237,
"column": 3,
"index": 8242
"index": 8398
}
},
{
"id": "components.txhistory.txnavigationbuttons.receiveButton",
"defaultMessage": "!!!Receive",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 235,
"line": 238,
"column": 17,
"index": 8261
"index": 8417
},
"end": {
"line": 238,
"line": 241,
"column": 3,
"index": 8366
"index": 8522
}
},
{
"id": "components.common.navigation.dashboardButton",
"defaultMessage": "!!!Dashboard",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 239,
"line": 242,
"column": 19,
"index": 8387
"index": 8543
},
"end": {
"line": 242,
"line": 245,
"column": 3,
"index": 8484
"index": 8640
}
},
{
"id": "components.common.navigation.delegateButton",
"defaultMessage": "!!!Delegate",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 243,
"line": 246,
"column": 18,
"index": 8504
"index": 8660
},
"end": {
"line": 246,
"line": 249,
"column": 3,
"index": 8599
"index": 8755
}
},
{
"id": "components.settings.walletsettingscreen.tabTitle",
"defaultMessage": "!!!Wallet",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 247,
"line": 250,
"column": 16,
"index": 8617
"index": 8773
},
"end": {
"line": 250,
"line": 253,
"column": 3,
"index": 8715
"index": 8871
}
},
{
"id": "global.staking",
"defaultMessage": "!!!Staking",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 251,
"line": 254,
"column": 17,
"index": 8734
"index": 8890
},
"end": {
"line": 254,
"line": 257,
"column": 3,
"index": 8799
"index": 8955
}
},
{
"id": "components.common.navigation.nftGallery",
"defaultMessage": "!!!NFT Gallery",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 255,
"line": 258,
"column": 14,
"index": 8815
"index": 8971
},
"end": {
"line": 258,
"line": 261,
"column": 3,
"index": 8909
"index": 9065
}
},
{
"id": "menu",
"defaultMessage": "!!!Menu",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 259,
"line": 262,
"column": 14,
"index": 8925
"index": 9081
},
"end": {
"line": 262,
"line": 265,
"column": 3,
"index": 8977
"index": 9133
}
},
{
"id": "components.walletselection.walletselectionscreen.header",
"defaultMessage": "!!!My wallets",
"file": "src/WalletNavigator.tsx",
"start": {
"line": 263,
"line": 266,
"column": 31,
"index": 9010
"index": 9166
},
"end": {
"line": 266,
"line": 269,
"column": 3,
"index": 9119
"index": 9275
}
}
]
Loading
Loading