Thomas Eizinger
2440964385
Allow ASB to be configured with max BTC buy amount
...
This will make it easier to also configure the CLI to display an appropriate max amount the user has to deal with.
2021-03-03 16:56:34 +11:00
Daniel Karzel
019d6c725a
Maximum sell amount for ASB that defaults to 0.5 XMR
2021-02-26 16:48:27 +11:00
Daniel Karzel
1f1b3a95bc
Logging for different scenarios when reading from rate stream
2021-02-26 12:44:49 +11:00
Daniel Karzel
fc2c08c7c9
Error only on close message when fetching the rate
...
Messages Ping, Pong and Binary are ignored and not reported as error.
2021-02-25 12:52:38 +11:00
Daniel Karzel
151f33ba10
Rename variables to add to understanding the code
2021-02-22 15:38:14 +11:00
Daniel Karzel
9496dce917
Skip heartbeat messages
2021-02-22 14:51:22 +11:00
Thomas Eizinger
a8bfc1d686
Make LatestRate::Error require std::error::Error trait bound
...
This allows us to use .context instead of .map_err when calling
`latest_rate()`. For the static rate module, we simply fill in
`Infallible` which is actually better suited because it describes
that we are never using this error.
2021-02-22 13:27:47 +11:00
Thomas Eizinger
b47b06aa23
Import anyhow::Result across the codebase
...
There is no need to fully qualify this type because it is a type
alias for std::Result. We can mix and match the two as we want.
2021-02-22 13:26:56 +11:00
Franck Royer
519d1a5701
Log rate and amounts for Alice when doing execution setup
2021-02-22 13:26:27 +11:00
Franck Royer
644f4c1732
Bubble up ws error to consumer
...
Note that because we are using `watch` channel, only a reference to the
channel value can be returned.
Hence, using custom Error that can be cloned to be able to
pass `Result` through the channel.
2021-02-22 13:26:27 +11:00
Franck Royer
92b3df4158
Introduce dynamic rates
2021-02-22 13:24:59 +11:00
Daniel Karzel
fe3d6f1fef
Rename nectar to asb (automated swap backend)
2021-02-22 10:24:11 +11:00