Use 'amounts' for local varibale name

pull/28/head
Tobin C. Harding 4 years ago
parent b8130d23a6
commit 8f5a989ad1

@ -46,9 +46,11 @@ pub async fn swap(
}
OutEvent::Request(amounts::OutEvent::Btc { btc, channel }) => {
debug!("Got request from Bob to swap {}", btc);
let p = calculate_amounts(btc);
last_amounts = Some(p);
swarm.send_amounts(channel, p);
let amounts = calculate_amounts(btc);
// TODO: We cache the last amounts returned, this needs improving along with
// verification of message 0.
last_amounts = Some(amounts);
swarm.send_amounts(channel, amounts);
}
OutEvent::Message0(msg) => {
// We don't want Bob to be able to crash us by sending an out of

Loading…
Cancel
Save