diff --git a/package.json b/package.json index 14cd241..47d944b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@leapwallet/leap-keychain", - "version": "0.3.5", + "version": "0.3.6", "description": "A javascript library for crypto key management", "scripts": { "test:coverage": "nyc mocha", diff --git a/src/keychain/keychain.ts b/src/keychain/keychain.ts index 584adb4..d2fe340 100644 --- a/src/keychain/keychain.ts +++ b/src/keychain/keychain.ts @@ -53,6 +53,7 @@ export class KeyChain { walletType: type === 'create' ? WALLETTYPE.SEED_PHRASE : WALLETTYPE.SEED_PHRASE_IMPORTED, id: walletId, colorIndex: colorIndex, + createdAt: Date.now(), }; await KeyChain.updateKeyChain({ @@ -98,6 +99,7 @@ export class KeyChain { walletType: WALLETTYPE.SEED_PHRASE, id: walletId, colorIndex: colorIndex ?? addressIndex, + createdAt: Date.now(), } as Key; const keystoreEntry: { [id: string]: Key } = { @@ -154,6 +156,7 @@ export class KeyChain { walletType: WALLETTYPE.PRIVATE_KEY, id: walletId, colorIndex: lastIndex, + createdAt: Date.now(), }, }; diff --git a/src/types/keychain.ts b/src/types/keychain.ts index c6a2fa3..8f29c0f 100644 --- a/src/types/keychain.ts +++ b/src/types/keychain.ts @@ -16,6 +16,7 @@ export type Key = { walletType: WALLETTYPE; id: string; colorIndex: number; + createdAt?: number; }; export type Keystore = Record>;