From 0a19660fa7f9f2d1de7c7b3ee5565b48cf15ad3e Mon Sep 17 00:00:00 2001 From: DMY <147dmy@gmail.com> Date: Thu, 28 Nov 2024 13:33:02 +0800 Subject: [PATCH] fix --- src/ui/views/ApprovalManagePage/style.less | 4 ++-- src/ui/views/NewUserImport/BackupSeedPhrase.tsx | 6 +++++- src/ui/views/NewUserImport/CreateSeedPhrase.tsx | 6 +++++- src/ui/views/NewUserImport/ImportGnosisAddress.tsx | 6 +++++- src/ui/views/NewUserImport/ImportHardWare.tsx | 6 +++++- src/ui/views/NewUserImport/ImportList.tsx | 8 +++++++- src/ui/views/NewUserImport/ImportPrivateKey.tsx | 2 +- src/ui/views/NewUserImport/ImportSeedPhrase.tsx | 6 +++++- 8 files changed, 35 insertions(+), 9 deletions(-) diff --git a/src/ui/views/ApprovalManagePage/style.less b/src/ui/views/ApprovalManagePage/style.less index 0c866f59d00..8e1a397e108 100644 --- a/src/ui/views/ApprovalManagePage/style.less +++ b/src/ui/views/ApprovalManagePage/style.less @@ -540,10 +540,10 @@ } &.is-danger.tip-recent-revokes .ant-tooltip-inner { - min-width: 440px; + min-width: 460px; } &.is-warning.tip-recent-revokes .ant-tooltip-inner { - min-width: 440px; + min-width: 460px; } } diff --git a/src/ui/views/NewUserImport/BackupSeedPhrase.tsx b/src/ui/views/NewUserImport/BackupSeedPhrase.tsx index 8b9a93ee4b2..cc0341d6a92 100644 --- a/src/ui/views/NewUserImport/BackupSeedPhrase.tsx +++ b/src/ui/views/NewUserImport/BackupSeedPhrase.tsx @@ -48,7 +48,11 @@ export const BackupSeedPhrase = () => { seedPhrase: '', passphrase: '', }); - history.replace('/new-user/create-seed-phrase'); + if (history.length) { + history.goBack(); + } else { + history.replace('/new-user/create-seed-phrase'); + } }} step={1} > diff --git a/src/ui/views/NewUserImport/CreateSeedPhrase.tsx b/src/ui/views/NewUserImport/CreateSeedPhrase.tsx index 035cc306b88..b592768f4fb 100644 --- a/src/ui/views/NewUserImport/CreateSeedPhrase.tsx +++ b/src/ui/views/NewUserImport/CreateSeedPhrase.tsx @@ -42,7 +42,11 @@ export const CreateSeedPhrase = () => { return ( { - history.replace('/new-user/guide'); + if (history.length) { + history.goBack(); + } else { + history.replace('/new-user/guide'); + } }} title={t('page.newUserImport.createNewAddress.title')} > diff --git a/src/ui/views/NewUserImport/ImportGnosisAddress.tsx b/src/ui/views/NewUserImport/ImportGnosisAddress.tsx index 1ccf86e8e49..b1355fa73e5 100644 --- a/src/ui/views/NewUserImport/ImportGnosisAddress.tsx +++ b/src/ui/views/NewUserImport/ImportGnosisAddress.tsx @@ -118,7 +118,11 @@ export const NewUserImportGnosisAddress = () => { { - history.goBack(); + if (history.length) { + history.goBack(); + } else { + history.replace('/new-user/import-list'); + } clearStore(); }} step={1} diff --git a/src/ui/views/NewUserImport/ImportHardWare.tsx b/src/ui/views/NewUserImport/ImportHardWare.tsx index b54bfc427fb..dd50f57da66 100644 --- a/src/ui/views/NewUserImport/ImportHardWare.tsx +++ b/src/ui/views/NewUserImport/ImportHardWare.tsx @@ -113,7 +113,11 @@ export const NewUserImportHardware = () => { { - history.replace(`/new-user/import/${type}/set-password`); + if (history.length) { + history.goBack(); + } else { + history.replace(`/new-user/import/${type}/set-password`); + } }} className="flex flex-col justify-center" > diff --git a/src/ui/views/NewUserImport/ImportList.tsx b/src/ui/views/NewUserImport/ImportList.tsx index 0d15c084971..370edb0c763 100644 --- a/src/ui/views/NewUserImport/ImportList.tsx +++ b/src/ui/views/NewUserImport/ImportList.tsx @@ -86,7 +86,13 @@ export const ImportWalletList = () => { return ( { + if (history.length) { + history.goBack(); + } else { + history.replace('/new-user/guide'); + } + }} title={t('page.newUserImport.importList.title')} >
diff --git a/src/ui/views/NewUserImport/ImportPrivateKey.tsx b/src/ui/views/NewUserImport/ImportPrivateKey.tsx index 1e68385e9a4..8791e6507bb 100644 --- a/src/ui/views/NewUserImport/ImportPrivateKey.tsx +++ b/src/ui/views/NewUserImport/ImportPrivateKey.tsx @@ -92,7 +92,7 @@ export const NewUserImportPrivateKey = () => { type="password" autoFocus spellCheck={false} - placeholder="input private key" + placeholder="Input private key" onChange={(e) => { setValue(e.target.value); }} diff --git a/src/ui/views/NewUserImport/ImportSeedPhrase.tsx b/src/ui/views/NewUserImport/ImportSeedPhrase.tsx index 30890fcdd9f..3f5606456c0 100644 --- a/src/ui/views/NewUserImport/ImportSeedPhrase.tsx +++ b/src/ui/views/NewUserImport/ImportSeedPhrase.tsx @@ -177,7 +177,11 @@ export const ImportSeedPhrase = () => { return ( { - history.replace('/new-user/import-list'); + if (history.length) { + history.goBack(); + } else { + history.replace('/new-user/import-list'); + } }} step={1} className="flex flex-col"