Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@
"@heroicons/react": "^1.0.6",
"@reduxjs/toolkit": "^2.8.2",
"@sidhujag/sysweb3-core": "^1.0.27",
"@sidhujag/sysweb3-keyring": "^1.0.525",
"@sidhujag/sysweb3-keyring": "^1.0.530",
"@sidhujag/sysweb3-network": "^1.0.105",
"@sidhujag/sysweb3-utils": "^1.1.255",
"@sidhujag/sysweb3-utils": "^1.1.256",
"@tippyjs/react": "^4.2.6",
"@types/chrome": "^0.0.270",
"@types/jest": "^29.5.0",
Expand Down Expand Up @@ -105,7 +105,7 @@
"redux-logger": "^3.0.6",
"redux-thunk": "^3.1.0",
"sass": "^1.80.7",
"syscoinjs-lib": "^1.0.254",
"syscoinjs-lib": "^1.0.255",
"tailwindcss": "^3.4.15",
"tippy.js": "^6.3.7",
"uuid": "^9.0.1",
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "Erneut verbinden",
"delete": "Löschen",
"remove": "Entfernen",
"errorDescription": "Fehlerbeschreibung"
"errorDescription": "Fehlerbeschreibung",
"generate": "Generieren"
},
"header": {
"importAccount": "Konto importieren",
Expand Down Expand Up @@ -310,7 +311,7 @@
},
"import": {
"importModalWordMissing": "Wort fehlt!",
"importModalSeed": "Die Seed-Phrase muss 12 oder 24 Wörter enthalten und Sie haben {{seedLength}} eingegeben.",
"importModalSeed": "Die Seed-Phrase muss 12, 15, 18, 21 oder 24 Wörter enthalten, und Sie haben {{seedLength}} eingegeben.",
"importAttention": "ACHTUNG: ",
"importingYourAccount": "Nach dem Importieren Ihres Wallets müssen Sie Ihre Hardware-Wallets erneut hinzufügen und die persönlichen Wallet-Einstellungen anpassen.",
"pasteYourWalletSeed": "Fügen Sie Ihre Wallet-Seed-Phrase ein"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "Retry connect",
"delete": "Delete",
"remove": "Remove",
"errorDescription": "Error description"
"errorDescription": "Error description",
"generate": "Generate"
},
"components": {
"newPassword": "New password (min 8 chars)",
Expand Down Expand Up @@ -165,7 +166,7 @@
},
"import": {
"importModalWordMissing": "Word missing!",
"importModalSeed": "The seed phrase must be 12 or 24 words and you inserted {{seedLength}}.",
"importModalSeed": "The seed phrase must be 12, 15, 18, 21 or 24 words and you inserted {{seedLength}}.",
"importAttention": "ATTENTION: ",
"importingYourAccount": "After importing your wallet you must add again your hardware wallets and adjust the wallet's personal settings.",
"pasteYourWalletSeed": "Paste your wallet seed phrase"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "Reintentar conectar",
"delete": "Eliminar",
"remove": "Remover",
"errorDescription": "Descripción del error"
"errorDescription": "Descripción del error",
"generate": "Generar"
},
"components": {
"newPassword": "Nueva contraseña (mín. 8 caracteres)",
Expand Down Expand Up @@ -165,7 +166,7 @@
},
"import": {
"importModalWordMissing": "Palabra faltante",
"importModalSeed": "La frase de semilla debe tener 12 o 24 palabras y has insertado {{seedLength}}.",
"importModalSeed": "La frase semilla debe tener 12, 15, 18, 21 o 24 palabras y has introducido {{seedLength}}.",
"importAttention": "Atención:",
"importingYourAccount": "Después de importar, deberás volver a agregar tus carteras hardware y ajustar la configuración personal.",
"pasteYourWalletSeed": "Escribe tu frase semilla"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "Réessayer de se connecter",
"delete": "Supprimer",
"remove": "Retirer",
"errorDescription": "Description de l'erreur"
"errorDescription": "Description de l'erreur",
"generate": "Générer"
},
"header": {
"importAccount": "Importer un compte",
Expand Down Expand Up @@ -305,7 +306,7 @@
},
"import": {
"importModalWordMissing": "Mot manquant !",
"importModalSeed": "La phrase de récupération doit contenir 12 ou 24 mots et vous en avez inséré {{seedLength}}.",
"importModalSeed": "La phrase de récupération doit contenir 12, 15, 18, 21 ou 24 mots et vous en avez saisi {{seedLength}}.",
"importAttention": "ATTENTION : ",
"importingYourAccount": "Après l'importation de votre portefeuille, vous devrez ajouter à nouveau vos portefeuilles matériels et ajuster les paramètres personnels.",
"pasteYourWalletSeed": "Collez votre phrase de récupération"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "再接続",
"delete": "削除",
"remove": "削除",
"errorDescription": "エラー説明"
"errorDescription": "エラーの説明",
"generate": "生成"
},
"header": {
"importAccount": "アカウントインポート",
Expand Down Expand Up @@ -310,7 +311,7 @@
},
"import": {
"importModalWordMissing": "単語が不足しています!",
"importModalSeed": "シードフレーズは12または24単語である必要があり、{{seedLength}}単語入力されました。",
"importModalSeed": "シードフレーズは12、15、18、21、または24単語である必要があり、{{seedLength}}単語入力されました。",
"importAttention": "注意:",
"importingYourAccount": "ウォレットをインポートした後、ハードウェアウォレットを再度追加し、ウォレットの個人設定を調整する必要があります。",
"pasteYourWalletSeed": "ウォレットのシードフレーズを貼り付けてください"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "다시 연결",
"delete": "삭제",
"remove": "제거",
"errorDescription": "오류 설명"
"errorDescription": "오류 설명",
"generate": "생성"
},
"header": {
"importAccount": "계정 가져오기",
Expand Down Expand Up @@ -310,7 +311,7 @@
},
"import": {
"importModalWordMissing": "단어가 누락되었습니다!",
"importModalSeed": "시드 구문은 12개 또는 24개의 단어여야 하며 {{seedLength}}개를 입력했습니다.",
"importModalSeed": "시드 구문은 12, 15, 18, 21 또는 24개의 단어여야 하며 {{seedLength}}개를 입력했습니다.",
"importAttention": "주의: ",
"importingYourAccount": "지갑을 가져온 후에는 하드웨어 지갑을 다시 추가하고 지갑의 개인 설정을 조정해야 합니다.",
"pasteYourWalletSeed": "지갑 시드 구문을 붙여넣으세요"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "Tentar conectar novamente",
"delete": "Excluir",
"remove": "Remover",
"errorDescription": "Descrição do erro"
"errorDescription": "Descrição do erro",
"generate": "Gerar"
},
"components": {
"newPassword": "Nova senha (mín. 8 caracteres)",
Expand Down Expand Up @@ -160,7 +161,7 @@
},
"import": {
"importModalWordMissing": "Palavra ausente!",
"importModalSeed": "A frase-semente deve ter 12 ou 24 palavras e você inseriu {{seedLength}}.",
"importModalSeed": "A frase-semente deve ter 12, 15, 18, 21 ou 24 palavras e você inseriu {{seedLength}}.",
"importAttention": "ATENÇÃO: ",
"importingYourAccount": "Após importar sua carteira você deve adicionar novamente suas carteiras de hardware e ajustar as configurações pessoais da carteira.",
"pasteYourWalletSeed": "Cole sua frase semente da carteira"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "Повторить подключение",
"delete": "Удалить",
"remove": "Удалить",
"errorDescription": "Описание ошибки"
"errorDescription": "Описание ошибки",
"generate": "Сгенерировать"
},
"header": {
"importAccount": "Импорт аккаунта",
Expand Down Expand Up @@ -310,7 +311,7 @@
},
"import": {
"importModalWordMissing": "Слово отсутствует!",
"importModalSeed": "Сид-фраза должна содержать 12 или 24 слова, а вы ввели {{seedLength}}.",
"importModalSeed": "Сид-фраза должна содержать 12, 15, 18, 21 или 24 слов(а), а вы ввели {{seedLength}}.",
"importAttention": "ВНИМАНИЕ: ",
"importingYourAccount": "После импорта кошелька вам необходимо заново добавить аппаратные кошельки и настроить персональные параметры кошелька.",
"pasteYourWalletSeed": "Вставьте сид-фразу вашего кошелька"
Expand Down
5 changes: 3 additions & 2 deletions source/assets/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"retryConnect": "重试连接",
"delete": "删除",
"remove": "移除",
"errorDescription": "错误描述"
"errorDescription": "错误描述",
"generate": "生成"
},
"header": {
"importAccount": "导入账户",
Expand Down Expand Up @@ -529,7 +530,7 @@
},
"import": {
"importModalWordMissing": "缺少单词!",
"importModalSeed": "助记词必须是12或24个单词,您输入了{{seedLength}}个。",
"importModalSeed": "助记词必须是12、15、18、21或24个单词,您输入了{{seedLength}}个。",
"importAttention": "注意:",
"importingYourAccount": "导入钱包后,您必须重新添加硬件钱包并调整钱包的个人设置。",
"pasteYourWalletSeed": "粘贴您的钱包助记词"
Expand Down
28 changes: 15 additions & 13 deletions source/pages/SeedConfirm/ConfirmPhrase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const ConfirmPhrase = ({

return (
<OnboardingLayout title={t('seedConfirm.confirmRecovery')}>
<div className="flex flex-col gap-4 items-center justify-center mt-2 text-brand-white transition-all duration-300 ease-in-out">
<div className="flex flex-col gap-4 items-center justify-center mt-2 text-brand-white transition-all duration-300 ease-in-out pb-36 md:pb-48">
<>
<section className="flex flex-wrap gap-3 items-center justify-center p-3 w-11/12 border-b border-[rgba(255, 255, 255, 0.16)] before:border-b before:border-[rgba(255, 255, 255, 0.16)] box-border transition-all duration-300 md:w-9/12">
{newList.map((phrase, idx) => (
Expand Down Expand Up @@ -85,18 +85,20 @@ export const ConfirmPhrase = ({
))}
</section>

<div className="absolute bottom-12">
<Button
className={`bg-brand-deepPink100 ${
orgList.length ? 'opacity-60' : 'opacity-100'
} w-[17.5rem] h-10 text-white text-base font-base font-medium rounded-2xl`}
type="button"
onClick={() => {
!orgList?.length ? handleValidate() : null;
}}
>
{t('buttons.validate')}
</Button>
<div className="fixed bottom-0 left-0 right-0 bg-bkg-3 border-t border-brand-gray300 px-4 py-3 shadow-lg z-50">
<div className="flex justify-center gap-3">
<Button
className={`bg-brand-deepPink100 ${
orgList.length ? 'opacity-60' : 'opacity-100'
} w-[17.5rem] h-10 text-white text-base font-base font-medium rounded-2xl`}
type="button"
onClick={() => {
!orgList?.length ? handleValidate() : null;
}}
>
{t('buttons.validate')}
</Button>
</div>
</div>
</>
{showModal && !passed && (
Expand Down
62 changes: 44 additions & 18 deletions source/pages/SeedConfirm/CreatePhrase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { useController } from 'hooks/useController';
export const CreatePhrase = ({ password }: { password: string }) => {
const { controllerEmitter } = useController();
const [seed, setSeed] = useState('');
const [wordCount, setWordCount] = useState<number>(12);
const { t } = useTranslation();

const [copied, setCopied] = useState<boolean>(false);
Expand All @@ -17,11 +18,12 @@ export const CreatePhrase = ({ password }: { password: string }) => {
const navigate = useNavigate();

useEffect(() => {
//todo: we need to call keyring manager with the new seed phrase function
controllerEmitter(['wallet', 'createNewSeed']).then((response: string) => {
setSeed(response);
});
}, []);
controllerEmitter(['wallet', 'createNewSeed'], [wordCount]).then(
(response: string) => {
setSeed(response);
}
);
}, [controllerEmitter, wordCount]);

const handleCopyToClipboard = useCallback(async (seedPhrase: string) => {
try {
Expand All @@ -44,7 +46,29 @@ export const CreatePhrase = ({ password }: { password: string }) => {

return (
<OnboardingLayout title={t('createPhrase.recoveryPhrase')}>
<div className="flex flex-col gap-4 items-center justify-center max-w-xs md:max-w-lg">
<div className="flex flex-col gap-4 items-center justify-center max-w-xs md:max-w-lg pb-36 md:pb-48">
<div className="flex items-center gap-3 w-full justify-center">
<span className="text-brand-gray200 text-xs">Words:</span>
<select
className="bg-fields-input-primary border border-fields-input-border rounded-md text-brand-white text-sm px-2 py-1"
value={wordCount}
onChange={(e) => setWordCount(parseInt(e.target.value))}
>
<option value={12}>12</option>
<option value={24}>24</option>
</select>
<Button
type="button"
onClick={() =>
controllerEmitter(['wallet', 'createNewSeed'], [wordCount]).then(
(response: string) => setSeed(response)
)
}
className="bg-brand-blue px-3 py-1 h-8 text-xs rounded-md"
>
{t('buttons.generate')}
</Button>
</div>
<SeedPhraseDisplay
seedPhrase={seed}
isEnabled={true}
Expand All @@ -70,18 +94,20 @@ export const CreatePhrase = ({ password }: { password: string }) => {
</label>
</div>

<div className="absolute bottom-12 md:bottom-32">
<Button
disabled={!seed}
id="unlock-btn"
type="button"
className={`bg-brand-deepPink100 ${
isTermsConfirmed ? 'opacity-100' : 'opacity-60 '
} w-[17.5rem] h-10 text-white text-base font-base font-medium rounded-2xl`}
onClick={handleNext}
>
{t('buttons.next')}
</Button>
<div className="fixed bottom-0 left-0 right-0 bg-bkg-3 border-t border-brand-gray300 px-4 py-3 shadow-lg z-50">
<div className="flex justify-center gap-3">
<Button
disabled={!seed}
id="unlock-btn"
type="button"
className={`bg-brand-deepPink100 ${
isTermsConfirmed ? 'opacity-100' : 'opacity-60\t'
} w-[17.5rem] h-10 text-white text-base font-base font-medium rounded-2xl`}
onClick={handleNext}
>
{t('buttons.next')}
</Button>
</div>
</div>
</div>
</OnboardingLayout>
Expand Down
Loading
Loading