Skip to content

Commit

Permalink
rotation after send fix
Browse files Browse the repository at this point in the history
  • Loading branch information
omershlo committed Feb 21, 2019
1 parent cbb8a78 commit ca1fefc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gotham-client/src/ecdsa/rotate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use kms::ecdsa::two_party::MasterKey2;
use kms::ecdsa::two_party::*;
use kms::rotation::two_party::party2::Rotation2;
use multi_party_ecdsa::protocols::two_party_ecdsa::lindell_2017::*;
use std::collections::HashMap;

const ROT_PATH_PRE: &str = "ecdsa/rotate";

Expand Down Expand Up @@ -105,11 +106,15 @@ pub fn rotate_master_key(wallet: wallet::Wallet, client: &reqwest::Client) -> wa
id: wallet.private_shares.id.clone(),
master_key: party_two_master_key_rotated,
};
wallet::Wallet {
let addresses_derivation_map = HashMap::new();
let mut wallet_after_rotate = wallet::Wallet {
id: wallet.id.clone(),
network: wallet.network.clone(),
private_shares,
last_derived_pos: wallet.last_derived_pos.clone(),
addresses_derivation_map: wallet.addresses_derivation_map,
}
addresses_derivation_map,
};
wallet_after_rotate.derived();

wallet_after_rotate
}

0 comments on commit ca1fefc

Please sign in to comment.