xmr-btc-swap/swap/src
Thomas Eizinger 16dfea035b
Simplify code within BobState::XmrLockProofReceived
To achieve this, we decompose `watch_for_locked_xmr` into two parts:

1. A non-self-consuming function to construct a `WatchRequest`
2. A state transition that can now consume `self` again because
it is only called once within the whole select! expression.

Ideally, we would move more logic onto this state transition (like
comparing the actual amounts and fail the transition if it is not
valid). Doing so would have an unfortunate side-effect: We would
always wait for the full confirmations before checking whether or
not we actually receive enough XMR.

This allows us to have state transitions that consume self.
2021-03-18 15:45:58 +11:00
..
asb Update the application name for --version print 2021-03-18 12:24:10 +11:00
bin Rename ExecutionParams to EnvironmentConfig 2021-03-17 16:31:16 +11:00
bitcoin Move more domain knowledge onto the TxCancel type 2021-03-18 15:44:37 +11:00
cli Update the application name for --version print 2021-03-18 12:24:10 +11:00
database Introduce dedicated bob::State6 for cancelling 2021-03-18 15:45:57 +11:00
monero Simplify code within BobState::XmrLockProofReceived 2021-03-18 15:45:58 +11:00
network Introduce quote protocol and display it to the user before they fund 2021-03-04 16:26:27 +11:00
protocol Simplify code within BobState::XmrLockProofReceived 2021-03-18 15:45:58 +11:00
asb.rs Provide stronger isolation of kraken module 2021-03-05 13:56:25 +11:00
bitcoin.rs Greatly reduce load onto the Electrum backend 2021-03-16 19:24:31 +11:00
cli.rs Remove CLI config file in favour of parameters 2021-03-15 15:41:46 +11:00
database.rs Make sure all error messages start with an uppercase letter 2021-03-05 15:49:15 +11:00
env.rs Make Monero and Bitcoin wallet use a generalized sync interval 2021-03-17 16:31:17 +11:00
fs.rs Import anyhow::Result across the codebase 2021-02-22 13:26:56 +11:00
kraken.rs Disable backoffs max_elapsed_time functionality 2021-03-11 13:33:46 +11:00
lib.rs Merge #321 2021-03-17 10:22:26 +00:00
monero_ext.rs Upgrade to bdk 4.0 2021-02-19 15:18:37 +11:00
monero.rs Simplify code within BobState::XmrLockProofReceived 2021-03-18 15:45:58 +11:00
network.rs Introduce quote protocol and display it to the user before they fund 2021-03-04 16:26:27 +11:00
protocol.rs Change imports_granularity to module 2021-03-04 14:48:13 +11:00
seed.rs Add context if we fail to compute extended private key 2021-03-05 15:49:16 +11:00
trace.rs Disable timestamp if we log to a non-interactive terminal 2021-03-17 11:41:28 +11:00