Skip to content

Commit 35b690a

Browse files
committed
Make the key creation date optoinal
- Old stashes would not load, because the dates were missing. - This was a breaking change for our fake user interface, used for testing.
1 parent 80c0fc0 commit 35b690a

File tree

5 files changed

+8
-2
lines changed

5 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## Unreleased
44

5+
- added: Report key wallet creation dates.
6+
57
## 2.15.0 (2024-09-06)
68

79
- added: `EdgeContext.fetchChallenge`, to request an account-creation CAPTCHA.

src/core/currency/wallet/currency-wallet-api.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ export function makeCurrencyWalletApi(
113113
watch: watchMethod,
114114

115115
// Data store:
116+
get created(): Date | undefined {
117+
return walletInfo.created
118+
},
116119
get disklet(): Disklet {
117120
return storageWalletApi.disklet
118121
},

src/types/server-cleaners.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export const asEdgeBox: Cleaner<EdgeBox> = asObject({
9595
})
9696

9797
export const asEdgeKeyBox: Cleaner<EdgeKeyBox> = asObject({
98-
created: asDate,
98+
created: asOptional(asDate),
9999
data_base64: asBase64,
100100
encryptionType: asNumber,
101101
iv_hex: asBase16

src/types/server-types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export interface EdgeBox {
1717
* Encrypted wallet private keys along with a creation date.
1818
*/
1919
export interface EdgeKeyBox extends EdgeBox {
20-
created: Date
20+
created: Date | undefined
2121
}
2222

2323
/**

src/types/types.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,7 @@ export interface EdgeCurrencyWallet {
11521152
readonly watch: Subscriber<EdgeCurrencyWallet>
11531153

11541154
// Data store:
1155+
readonly created: Date | undefined
11551156
readonly disklet: Disklet
11561157
readonly id: string
11571158
readonly localDisklet: Disklet

0 commit comments

Comments
 (0)