Trim pasted seed words

This commit is contained in:
benthecarman
2023-09-28 17:21:51 -05:00
committed by benthecarman
parent 8bd17db182
commit 706e137625

View File

@@ -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(