Skip to content

Commit

Permalink
crowdin key
Browse files Browse the repository at this point in the history
  • Loading branch information
RakeshUP committed Oct 31, 2023
1 parent 22fcfd5 commit 9d08be8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,8 @@
"alertCriticalDapp": "The QR code provided is not from {{dappName}}.",
"alertSuccess": "{{dappName}} connected",
"codeInputPlaceholder": "wc: …",
"alertCriticalQRcode": "The QR code provided is not from {{dappName}}."
"alertCriticalQRcode": "The QR code provided is not from {{dappName}}.",
"alertInvalid": "Invalid code"
},
"detaildApp": {
"spinnerLabel": "Listening for actions…",
Expand Down
5 changes: 4 additions & 1 deletion src/services/walletConnectInterceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {AuthClientTypes} from '@walletconnect/auth-client';
import {Web3WalletTypes} from '@walletconnect/web3wallet';
import {PairingTypes, SessionTypes} from '@walletconnect/types';
import {WC_URI_PATTERN} from 'utils/constants';
import {i18n} from '../../i18n.config';

const URI_REGEX = new RegExp(WC_URI_PATTERN);
class WalletConnectInterceptor {
Expand All @@ -25,7 +26,9 @@ class WalletConnectInterceptor {

validateURI(uri: string) {
// TODO: Get crowdin key for this
return URI_REGEX.test(uri) ? undefined : 'Invalid code';
return URI_REGEX.test(uri)
? undefined
: i18n.t('modal.dappConnect.validation.alertInvalid');
}

subscribeConnectProposal(
Expand Down

0 comments on commit 9d08be8

Please sign in to comment.