mirror of
https://github.com/aljazceru/mutiny-web.git
synced 2026-01-20 06:34:24 +01:00
Trim pasted seed words
This commit is contained in:
committed by
benthecarman
parent
8bd17db182
commit
706e137625
@@ -96,7 +96,7 @@ function TwelveWordsEntry() {
|
||||
|
||||
async function handlePaste() {
|
||||
try {
|
||||
let text;
|
||||
let text: string;
|
||||
|
||||
if (Capacitor.isNativePlatform()) {
|
||||
const { value } = await Clipboard.read();
|
||||
@@ -111,7 +111,7 @@ function TwelveWordsEntry() {
|
||||
}
|
||||
|
||||
// split words on space or newline
|
||||
const words = text.split(/[\s\n]+/);
|
||||
const words = text.trim().split(/[\s\n]+/);
|
||||
|
||||
if (words.length !== 12) {
|
||||
return showToast(
|
||||
|
||||
Reference in New Issue
Block a user