merged conflicts manually
This commit is contained in:
@@ -28,6 +28,10 @@ impl BugBip39Derivation {
|
||||
return false;
|
||||
}
|
||||
|
||||
if wallet.is_encrypted() {
|
||||
return false;
|
||||
}
|
||||
|
||||
// The seed bytes is the raw entropy. To pass it to HD wallet generation,
|
||||
// we need to get the 64 byte bip39 entropy
|
||||
let bip39_seed = bip39::Seed::new(&Mnemonic::from_entropy(&wallet.seed, Language::English).unwrap(), "");
|
||||
@@ -73,13 +77,12 @@ impl BugBip39Derivation {
|
||||
println!("Sending funds to ourself.");
|
||||
let zaddr = client.do_address()["z_addresses"][0].as_str().unwrap().to_string();
|
||||
let balance_json = client.do_balance();
|
||||
let fee: u64 = DEFAULT_FEE.try_into().unwrap();
|
||||
let amount: u64 = balance_json["zbalance"].as_u64().unwrap()
|
||||
+ balance_json["tbalance"].as_u64().unwrap()
|
||||
- fee;
|
||||
+ balance_json["tbalance"].as_u64().unwrap();
|
||||
|
||||
let txid = if amount > 0 {
|
||||
match client.do_send(vec![(&zaddr, amount, None)]) {
|
||||
let fee: u64 = DEFAULT_FEE.try_into().unwrap();
|
||||
match client.do_send(vec![(&zaddr, amount-fee, None)]) {
|
||||
Ok(txid) => txid,
|
||||
Err(e) => {
|
||||
let r = object!{
|
||||
|
||||
Reference in New Issue
Block a user