diff --git a/packages/kit/src/background/services/ServiceNameResolver.ts b/packages/kit/src/background/services/ServiceNameResolver.ts index c1bb9945949..6ca830c6025 100644 --- a/packages/kit/src/background/services/ServiceNameResolver.ts +++ b/packages/kit/src/background/services/ServiceNameResolver.ts @@ -192,7 +192,7 @@ export default class ServiceNameResolver extends ServiceBase { return validNames; } catch (e) { - return 'form__address_unkonwn_error'; + return 'msg__network_request_failed'; } } @@ -207,7 +207,7 @@ export default class ServiceNameResolver extends ServiceBase { return null; } - return 'form__address_unkonwn_error'; + return 'msg__network_request_failed'; } } } diff --git a/packages/kit/src/views/CreateWallet/AddExistingWallet.tsx b/packages/kit/src/views/CreateWallet/AddExistingWallet.tsx index 829cad729b8..e99f0b12bf9 100644 --- a/packages/kit/src/views/CreateWallet/AddExistingWallet.tsx +++ b/packages/kit/src/views/CreateWallet/AddExistingWallet.tsx @@ -301,6 +301,7 @@ function AddExistingWalletView( showSubmitButton?: boolean; showPasteButton?: boolean; onNameServiceChange?: ReturnType['onChange']; + nameServiceAddress?: ReturnType['address']; }, ) { const { @@ -318,6 +319,7 @@ function AddExistingWalletView( showSubmitButton, showPasteButton, onNameServiceChange, + nameServiceAddress, } = props; const { @@ -341,7 +343,8 @@ function AddExistingWalletView( control={control} name="text" rules={{ - validate: async (text) => { + validate: async (t) => { + const text = nameServiceAddress || address || t; if (!text) { return true; } @@ -599,6 +602,7 @@ const AddExistingWallet = () => { {...viewProps} showPasteButton showSubmitButton={false} + nameServiceAddress={address} onNameServiceChange={onNameServiceChange} > {liteRecoveryButton}