-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hardware Wallet storage should be shared between Iguana and all HD accounts #1621
Comments
This problem is also related to GUI storage as it should be shared between Iguana and all HD accounts as well, so I believe it's important to design such a shared DB correctly.
pub struct MmCtx {
pub conf: Json,
// ...
/// RIPEMD160(SHA256(x)) where x is a secp256k1 pubkey derived from passphrase using **either** Iguana or HD derivation method.
/// This hash is **unique** among Iguana and each HD accounts derived from the same passphrase.
pub rmd160: Constructible<H160>,
/// RIPEMD160(SHA256(x)) where x is a secp256k1 pubkey derived from passphrase using **exactly** Iguana derivation method.
/// This hash is **common** for Iguana and each HD accounts derived from the same passphrase.
pub iguana_rmd160: Constructible<H160>,
}
@artemii235 what do you think? |
@sergeyboyko0791
It's good. This way, you can even print the shared DB ID to log, as it can't be linked to any of the user's addresses (unlike |
Awesome, thank you @artemii235 |
Currently, Hardware Wallet storage is in the same directory as Iguana/HD account:
https://github.com/KomodoPlatform/atomicDEX-API/blob/eb8792ada38dd7171ede1dd243b6a05b69bcbd32/mm2src/coins/hd_wallet_storage/sqlite_storage.rs#L112-L119
This is incorrect since Hardware Wallet should be shared between the accounts.
This can be fixed by adding a Wallet storage that is not dependent on either Iguana or HD account ID, but depends on the mnemonic passphrase only.
The text was updated successfully, but these errors were encountered: