From 63289c99f85ef1aacda29bd0398c2e1995b8ce52 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Wed, 9 Oct 2019 11:17:27 +0900 Subject: [PATCH] checkpoint move stuff over --- app/api/ada/lib/storage/database/legacy.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/api/ada/lib/storage/database/legacy.js b/app/api/ada/lib/storage/database/legacy.js index 391ab6282aa..b2c94524731 100644 --- a/app/api/ada/lib/storage/database/legacy.js +++ b/app/api/ada/lib/storage/database/legacy.js @@ -1,6 +1,7 @@ // @flow import { dumpByVersion } from './index'; +import { RustModule } from '../../cardanoCrypto/rustLoader'; /** * This file contains methods used to extract information @@ -23,6 +24,26 @@ export type LegacyAdaAddress = { cadIsUsed: boolean, } & LegacyAddressingInfo; +type LegacyLocalStorageWallet = { + adaWallet: AdaWallet, + masterKey?: string, // unused in hardware wallets + // this is a per-account setting but we only have 1 account per wallet in Yoroi + lastReceiveAddressIndex: number +} + +export type LegacyCryptoAccount = { + account: number, + // master public key + root_cached_key: RustModule.Wallet.Bip44AccountPublic, + derivation_scheme: string +} + +type LegacyLocalStorageCryptoAccount = { + account: number, + root_cached_key: string, // MasterPublicKey + derivation_scheme: string +} + export const getLegacyAddressesList = (): Array => { if (dumpByVersion.Addresses) { return dumpByVersion.Addresses;