Skip to content

Commit

Permalink
Make the key creation date optoinal
Browse files Browse the repository at this point in the history
- Old stashes would not load, because the dates were missing.
- This was a breaking change for our fake user interface, used for testing.
  • Loading branch information
swansontec committed Sep 11, 2024
1 parent 80c0fc0 commit c7d45c2
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased

- added: Report key wallet creation dates.

## 2.15.0 (2024-09-06)

- added: `EdgeContext.fetchChallenge`, to request an account-creation CAPTCHA.
Expand Down
4 changes: 4 additions & 0 deletions src/core/currency/wallet/currency-wallet-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ export function makeCurrencyWalletApi(
watch: watchMethod,

// Data store:
get created(): Date | undefined {
return walletInfo.created
},
get disklet(): Disklet {
return storageWalletApi.disklet
},
Expand All @@ -130,6 +133,7 @@ export function makeCurrencyWalletApi(
return storageWalletApi.type
},


// Wallet name:
get name(): string | null {
return input.props.walletState.name
Expand Down
2 changes: 1 addition & 1 deletion src/types/server-cleaners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export const asEdgeBox: Cleaner<EdgeBox> = asObject({
})

export const asEdgeKeyBox: Cleaner<EdgeKeyBox> = asObject({
created: asDate,
created: asOptional(asDate),
data_base64: asBase64,
encryptionType: asNumber,
iv_hex: asBase16
Expand Down
2 changes: 1 addition & 1 deletion src/types/server-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface EdgeBox {
* Encrypted wallet private keys along with a creation date.
*/
export interface EdgeKeyBox extends EdgeBox {
created: Date
created: Date | undefined
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1152,6 +1152,7 @@ export interface EdgeCurrencyWallet {
readonly watch: Subscriber<EdgeCurrencyWallet>

// Data store:
readonly created: Date | undefined
readonly disklet: Disklet
readonly id: string
readonly localDisklet: Disklet
Expand Down

0 comments on commit c7d45c2

Please sign in to comment.