change dateCreated to a string (from a Date object, which persists as a Date object)

This commit is contained in:
2023-03-18 20:46:59 -06:00
parent 59d621efc1
commit b3cdcb010a
3 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
export type Account = { export type Account = {
id?: number; // auto-generated by Dexie id?: number; // auto-generated by Dexie
dateCreated: Date; dateCreated: string;
derivationPath: string; derivationPath: string;
identity: string; identity: string;
publicKeyHex: string; publicKeyHex: string;

View File

@@ -247,7 +247,7 @@ export default class AccountViewView extends Vue {
this.derivationPath this.derivationPath
); );
await db.accounts.add({ await db.accounts.add({
dateCreated: new Date(), dateCreated: new Date().toISOString(),
derivationPath: this.derivationPath, derivationPath: this.derivationPath,
identity: JSON.stringify(newId), identity: JSON.stringify(newId),
mnemonic: this.mnemonic, mnemonic: this.mnemonic,

View File

@@ -79,7 +79,7 @@ export default class ImportAccountView extends Vue {
const num_accounts = await db.accounts.count(); const num_accounts = await db.accounts.count();
if (num_accounts === 0) { if (num_accounts === 0) {
await db.accounts.add({ await db.accounts.add({
dateCreated: new Date(), dateCreated: new Date().toISOString(),
derivationPath: this.derivationPath, derivationPath: this.derivationPath,
identity: JSON.stringify(newId), identity: JSON.stringify(newId),
mnemonic: mne, mnemonic: mne,