Commit Graph

14 Commits

Author SHA1 Message Date
Byron Hambly
5e192acac2
feat(asb): allow asb to register with mulitple rendezvous nodes 2023-08-04 15:04:58 +02:00
Thomas Eizinger
348fca0827
Add isolated test for list_sellers function 2021-07-06 20:03:53 +10:00
Thomas Eizinger
e163942850
Merge transport and behaviour module into network 2021-07-06 19:58:40 +10:00
Daniel Karzel
c0070f8fa7
Move files from protocol to appropriate module
Some network and application specific code does not belong in the protocol module and was moved.
Eventloop, recovery and the outside behaviour were moved to the respective application module because they are application specific.

The `swap_setup` was moved into the network module because upon change both sides will have to be changed and should thus stay close together.
2021-06-28 10:04:08 +10:00
Thomas Eizinger
8a30ef725c
Refactor transports to construct them specific for each application
Instead of splitting up the transports into capabilities, we compose
them directly for each application. This allows us to remove the
websocket transport for the CLI which is really only needed for the
ASB to allow retrieval of quotes via the browser.
2021-06-21 09:01:19 +10:00
rishflab
8805002f96 Remove redundant noun from tracing initialiser functions 2021-04-08 16:14:32 +10:00
rishflab
e517c5934e Move asb tracing initializer to asb module 2021-04-08 10:51:54 +10:00
Thomas Eizinger
3e0301a9d4
Move FixedRate into event_loop module
This is where these types are used, they can be defined in there.
2021-04-06 16:16:57 +10:00
Thomas Eizinger
1822886cd0
Provide stronger isolation of kraken module
Instead of leaking the tokio::sync::Receiver type in our
return value, we create a newtype that implements the desired
interface. This allows us to get rid of the `RateService` structs
and instead implement `LatestRate` directly on top of this struct.

Given that `LatestRate` is only used within the event_loop module,
we move the definition of this type into there.
2021-03-05 13:56:25 +11:00
Thomas Eizinger
bc176bc4fb
Minor import optimizations 2021-03-04 14:48:28 +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
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