From 3039f580fe2ea682f4ff8283582170ca15be969f Mon Sep 17 00:00:00 2001 From: Jan Hrubes Date: Tue, 17 Dec 2024 14:24:58 +0100 Subject: [PATCH] fix(wallet): fix CSV upload (#463) --- .../src/components/accounts/BatchTransfersActionBtn.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/wallet/src/components/accounts/BatchTransfersActionBtn.vue b/apps/wallet/src/components/accounts/BatchTransfersActionBtn.vue index 35ea1f8a4..dcc049d8c 100644 --- a/apps/wallet/src/components/accounts/BatchTransfersActionBtn.vue +++ b/apps/wallet/src/components/accounts/BatchTransfersActionBtn.vue @@ -214,7 +214,7 @@ const btnText = computed(() => const dialogTitle = computed(() => btnText.value ?? i18n.t('pages.accounts.btn_upload_csv')); const open = ref(false); const loading = ref(false); -const transfersCsv = ref(undefined); +const transfersCsv = ref(undefined); const csvToColumn = computed(() => i18n.t('pages.account.csv_transfer_file_column_to')); const csvCommentColumn = computed(() => i18n.t('pages.account.csv_transfer_file_column_comment')); const csvAmountColumn = computed(() => i18n.t('pages.account.csv_transfer_file_column_amount')); @@ -277,15 +277,15 @@ watch( watch( () => transfersCsv.value, - async files => { - if (!files || !files.length) { + async file => { + if (!file || !file.size) { rows.value = []; rawCsvTable.value = null; invalidRawCsvTable.value = null; return; } - const table = await readFileAsCsvTable(files[0]); + const table = await readFileAsCsvTable(file); rows.value = []; rawCsvTable.value = table; invalidRawCsvTable.value = {