mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-02-24 23:45:34 +08:00
fix(bip39-generator): cleared an issue with the mnemonic validation
This commit is contained in:
parent
e48d60b1ed
commit
ca7cb44389
1 changed files with 7 additions and 7 deletions
|
@ -59,24 +59,24 @@
|
|||
|
||||
<script setup lang="ts">
|
||||
import { useCopy } from '@/composable/copy';
|
||||
import { ref, computed } from 'vue';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
import {
|
||||
entropyToMnemonic,
|
||||
englishWordList,
|
||||
chineseSimplifiedWordList,
|
||||
chineseTraditionalWordList,
|
||||
czechWordList,
|
||||
englishWordList,
|
||||
entropyToMnemonic,
|
||||
frenchWordList,
|
||||
generateEntropy,
|
||||
italianWordList,
|
||||
japaneseWordList,
|
||||
koreanWordList,
|
||||
mnemonicToEntropy,
|
||||
portugueseWordList,
|
||||
spanishWordList,
|
||||
generateEntropy,
|
||||
mnemonicToEntropy,
|
||||
} from '@it-tools/bip39';
|
||||
import { Copy, Refresh } from '@vicons/tabler';
|
||||
import { useValidation } from '@/composable/validation';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
const languages = {
|
||||
English: englishWordList,
|
||||
|
@ -134,7 +134,7 @@ const mnemonicValidation = useValidation({
|
|||
{
|
||||
validator: (value) => {
|
||||
try {
|
||||
mnemonicToEntropy(value);
|
||||
mnemonicToEntropy(value, languages[language.value]);
|
||||
return true;
|
||||
} catch (_) {
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue