Skip to content

Commit

Permalink
fix(wallet): fix CSV upload (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
jedna authored Dec 17, 2024
1 parent 7df5e8c commit 3039f58
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<File[] | undefined>(undefined);
const transfersCsv = ref<File | undefined>(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'));
Expand Down Expand Up @@ -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 = {
Expand Down

0 comments on commit 3039f58

Please sign in to comment.