[bug] don't panic if there's a main/revoke wallet loaded
This commit is contained in:
parent
f03abf15b9
commit
c3e435a228
@ -540,12 +540,16 @@ fn process_transaction(
|
|||||||
|
|
||||||
if let Ok(main) = connected_user.try_get_mut_main() {
|
if let Ok(main) = connected_user.try_get_mut_main() {
|
||||||
let updated = main.update_wallet_with_transaction(&tx, blockheight, tweak_data)?;
|
let updated = main.update_wallet_with_transaction(&tx, blockheight, tweak_data)?;
|
||||||
unimplemented!();
|
if updated.len() > 0 {
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Ok(revoke) = connected_user.try_get_mut_revoke() {
|
if let Ok(revoke) = connected_user.try_get_mut_revoke() {
|
||||||
let updated = revoke.update_wallet_with_transaction(&tx, blockheight, tweak_data)?;
|
let updated = revoke.update_wallet_with_transaction(&tx, blockheight, tweak_data)?;
|
||||||
unimplemented!();
|
if updated.len() > 0 {
|
||||||
|
unimplemented!();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Err(anyhow::Error::msg("No output found"))
|
Err(anyhow::Error::msg("No output found"))
|
||||||
@ -596,7 +600,7 @@ pub fn parse_network_msg(raw: String, fee_rate: u32) -> ApiResult<CachedMessage>
|
|||||||
return Ok(message.clone());
|
return Ok(message.clone());
|
||||||
} else {
|
} else {
|
||||||
// let's keep it in case we receive the transaction later
|
// let's keep it in case we receive the transaction later
|
||||||
let mut new_msg = CachedMessage::default();
|
let mut new_msg = CachedMessage::new();
|
||||||
new_msg.status = CachedMessageStatus::CipherWaitingTx;
|
new_msg.status = CachedMessageStatus::CipherWaitingTx;
|
||||||
new_msg.ciphertext = Some(ank_msg.content);
|
new_msg.ciphertext = Some(ank_msg.content);
|
||||||
messages.push(new_msg);
|
messages.push(new_msg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user