From b3cdcb010a9461f994538098bf8391c286cd745e Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 18 Mar 2023 20:46:59 -0600 Subject: [PATCH] change dateCreated to a string (from a Date object, which persists as a Date object) --- src/db/tables/index.ts | 2 +- src/views/AccountViewView.vue | 2 +- src/views/ImportAccountView.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/db/tables/index.ts b/src/db/tables/index.ts index eb9a245..2c944a2 100644 --- a/src/db/tables/index.ts +++ b/src/db/tables/index.ts @@ -1,6 +1,6 @@ export type Account = { id?: number; // auto-generated by Dexie - dateCreated: Date; + dateCreated: string; derivationPath: string; identity: string; publicKeyHex: string; diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 00f5763..06d1b6a 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -247,7 +247,7 @@ export default class AccountViewView extends Vue { this.derivationPath ); await db.accounts.add({ - dateCreated: new Date(), + dateCreated: new Date().toISOString(), derivationPath: this.derivationPath, identity: JSON.stringify(newId), mnemonic: this.mnemonic, diff --git a/src/views/ImportAccountView.vue b/src/views/ImportAccountView.vue index 8738566..73a7359 100644 --- a/src/views/ImportAccountView.vue +++ b/src/views/ImportAccountView.vue @@ -79,7 +79,7 @@ export default class ImportAccountView extends Vue { const num_accounts = await db.accounts.count(); if (num_accounts === 0) { await db.accounts.add({ - dateCreated: new Date(), + dateCreated: new Date().toISOString(), derivationPath: this.derivationPath, identity: JSON.stringify(newId), mnemonic: mne,