Skip to content

Commit

Permalink
Merge pull request #166 from CityOfZion/CU-86duf5a56
Browse files Browse the repository at this point in the history
CU-86duf5a56 - NEON3 - Onboarding - UX Improvements
  • Loading branch information
raulduartep authored Aug 29, 2024
2 parents 2363735 + 140a05e commit ae57f9f
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/renderer/src/locales/en/pages.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,10 @@
"importEncryptedSubtitle": "Your encrypted key has been recognised, please complete the below fields to continue.",
"invalidAddress": "Invalid address",
"unexpectedError": "Unexpected error",
"locateFileButtonLabel": "Locate file..."
"locateFileButtonLabel": "Locate file...",
"neon2Warning": "This file is created during the migration process in your Neon 2 wallet. Start the process in Neon 2 to create the file.",
"importSuccess": "Compatible file identified!",
"importError": "Compatible file not recognised"
},
"step4": {
"title": "Please be patient, we are now setting up your wallet"
Expand Down
11 changes: 11 additions & 0 deletions src/renderer/src/routes/pages/Welcome/ImportWallet/Step3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Fragment, useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import { TbFileImport } from 'react-icons/tb'
import { Location, useLocation, useNavigate } from 'react-router-dom'
import { Banner } from '@renderer/components/Banner'
import { Button } from '@renderer/components/Button'
import { Textarea } from '@renderer/components/Textarea'
import { UtilsHelper } from '@renderer/helpers/UtilsHelper'
Expand Down Expand Up @@ -206,6 +207,16 @@ export const WelcomeImportWalletStep3Page = () => {
onClick={fileActions.handleBrowse}
/>

{!fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="warning" message={t('neon2Warning')} className="my-3" />
)}

{fileActions.actionState.errors.path && <Banner type="warning" message={t('importError')} className="my-3" />}

{fileActions.actionData.path && !fileActions.actionState.errors.path && (
<Banner type="success" message={t('importSuccess')} className="my-3" />
)}

<Button
label={commonT('general.next')}
className="w-64 mt-auto"
Expand Down
3 changes: 3 additions & 0 deletions src/shared/@types/i18next-resources.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,9 @@ interface Resources {
invalidAddress: 'Invalid address'
unexpectedError: 'Unexpected error'
locateFileButtonLabel: 'Locate file...'
neon2Warning: 'This file is created during the migration process in your Neon 2 wallet. Start the process in Neon 2 to create the file.'
importSuccess: 'Compatible file identified!'
importError: 'Compatible file not recognised'
}
step4: {
title: 'Please be patient, we are now setting up your wallet'
Expand Down

0 comments on commit ae57f9f

Please sign in to comment.