Skip to content

Commit

Permalink
fix: replace network i18n issue (#1488)
Browse files Browse the repository at this point in the history
  • Loading branch information
loatheb authored Sep 6, 2022
1 parent d25d972 commit a383759
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/kit/src/background/services/ServiceNameResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export default class ServiceNameResolver extends ServiceBase {

return validNames;
} catch (e) {
return 'form__address_unkonwn_error';
return 'msg__network_request_failed';
}
}

Expand All @@ -207,7 +207,7 @@ export default class ServiceNameResolver extends ServiceBase {
return null;
}

return 'form__address_unkonwn_error';
return 'msg__network_request_failed';
}
}
}
6 changes: 5 additions & 1 deletion packages/kit/src/views/CreateWallet/AddExistingWallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,7 @@ function AddExistingWalletView(
showSubmitButton?: boolean;
showPasteButton?: boolean;
onNameServiceChange?: ReturnType<typeof useNameServiceStatus>['onChange'];
nameServiceAddress?: ReturnType<typeof useNameServiceStatus>['address'];
},
) {
const {
Expand All @@ -318,6 +319,7 @@ function AddExistingWalletView(
showSubmitButton,
showPasteButton,
onNameServiceChange,
nameServiceAddress,
} = props;

const {
Expand All @@ -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;
}
Expand Down Expand Up @@ -599,6 +602,7 @@ const AddExistingWallet = () => {
{...viewProps}
showPasteButton
showSubmitButton={false}
nameServiceAddress={address}
onNameServiceChange={onNameServiceChange}
>
{liteRecoveryButton}
Expand Down

0 comments on commit a383759

Please sign in to comment.