Skip to content

Commit

Permalink
Fix migrate_db_chrysalis_to_stardust() for some ledger nano wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Oct 9, 2023
1 parent b3740c2 commit fc8d1be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions bindings/nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Added `SeedSecretManager` to `SecretManagerType`;
- `migrateDbChrysalisToStardust()` for some ledger nano wallets;

### Removed

Expand Down
1 change: 1 addition & 0 deletions sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed

- Update protocol params and addresses with correct bech32 HRP in `Wallet::set_client_options()`;
- `migrate_db_chrysalis_to_stardust()` for some ledger nano wallets;

## 1.1.0 - 2023-09-29

Expand Down
4 changes: 3 additions & 1 deletion sdk/src/wallet/migration/chrysalis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,9 @@ pub(crate) mod rocksdb {
let value_utf8 =
String::from_utf8(value.to_vec()).map_err(|_| Error::Migration("invalid utf8".into()))?;
// "iota-wallet-key-checksum_value" is never an encrypted value
if key_utf8 == "iota-wallet-key-checksum_value" {
// "FIRST_LEDGER_ADDRESS" was at some point not re-encrypted with the correct password and should
// therefore also be ignored to not return an error
if key_utf8 == "iota-wallet-key-checksum_value" || key_utf8 == "FIRST_LEDGER_ADDRESS" {
value_utf8
} else if let Ok(value) = serde_json::from_str::<Vec<u8>>(&value_utf8) {
decrypt_record(value, encryption_key)?
Expand Down

0 comments on commit fc8d1be

Please sign in to comment.