Commit Graph

1537 Commits (683d565679de516ef456f5aaa0c5e798fd9cff6e)
 

Author SHA1 Message Date
bors[bot] 9279877c8f
Merge #301
301: Refactor the kraken module to automatically re-connect on errors r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
Thomas Eizinger 9ad2160c69
Refactor the kraken module to automatically re-connect on errors
In order to be able to re-connect on certain errors, we model
connection errors separately from parsing errors. We also change
the API of the whole module to no longer forward all errors to
the subscribers but instead, only update the subscribers with
either a latest rate or a permanent failure in case we exhausted
all our options to re-connect the websocket.

To model all of this properly, we introduce to sub-modules so that
each submodule can have their own `Error` type.

Resolves #297.
3 years ago
Thomas Eizinger c560b3b21a
Introduce `RateUpdate` type alias to reduce duplication 3 years ago
Thomas Eizinger fd5b38739a
Remove constant in favor of inlining string
This removes an import and simplifies the `connect_async` call.
3 years ago
Thomas Eizinger 142e5e2d3a
Use tracing macros by fully-qualifying them 3 years ago
bors[bot] cc131ecf60
Merge #293
293: Some friday evening goodies r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
3 years ago
Thomas Eizinger 08923a14f3
Simplify GET request for block tip height 4 years ago
Thomas Eizinger e9d7d9299c
Simplify the GET request to the tx status URL 4 years ago
Thomas Eizinger 418ad7089d
Make tests more readable by following arrange-act-assert 4 years ago
Thomas Eizinger c2329b19a2
Tell the user more about the monero lock transaction
First, we tell the user that we are now waiting for Alice to lock
the monero. Additionally, we tell them once we received the
transfer proof which will lead directly into the
"waiting for confirmations" function.
4 years ago
Thomas Eizinger 13c4d29d40
Tell the user immediately how many confirmations we expect
Without this, the user doesn't see a message before the first
confirmation.
4 years ago
Thomas Eizinger 4883e23dd8
Tell the user for how many confirmations we are waiting
Without this, the user has no idea for how long the program is
waiting.
4 years ago
Thomas Eizinger 5d4cf40831
Fix comparison of Monero confirmations 4 years ago
bors[bot] 52483a5a43
Merge #291
291: Improve CLI help comments and "type" hints r=rishflab a=rishflab

The type hints are generated from the field names. This has the
unfortunate consequence of the config field becoming file_path which
does not really make sense people working on the codebase.

Co-authored-by: rishflab <rishflab@hotmail.com>
4 years ago
rishflab f92a8ac300 Improve CLI help comments and "type" hints
The type hints are generated from the field names. This has the
unfortunate consequence of the config field becoming file_path which
does not really make sense people working on the codebase.
4 years ago
bors[bot] 4b99d68790
Merge #290
290: Monero daemon host configurable r=rishflab a=da-kami

Note: `monero-daemon-host` in accordance with the wallet RPC params, from wallet RPC help:

```
Usage:
  monero-wallet-rpc [--wallet-file=<file>|--generate-from-json=<file>|--wallet-dir=<directory>] [--rpc-bind-port=<port>]

General options:
  --help                                Produce help message
  --version                             Output version information

Wallet options:
  --daemon-address arg                  Use daemon instance at <host>:<port>
  --daemon-host arg                     Use daemon instance at host <arg>
                                        instead of localhost
```

Co-authored-by: Daniel Karzel <daniel@comit.network>
4 years ago
bors[bot] 21a2a005e8
Merge #289
289: Tidy up README and docs r=rishflab a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
4 years ago
Daniel Karzel 196557b377 Rename binary to swap 4 years ago
Daniel Karzel f8b61e2e0e Make monero daemon host configurable 4 years ago
Daniel Karzel f091402c7a Remove parameter duplication by introducing structs 4 years ago
Thomas Eizinger 265f4ee2e5
Remove stale mergify configuration 4 years ago
Thomas Eizinger d6789508da
Remove outdated docs 4 years ago
Thomas Eizinger 0b17b1177a
Replace protocol definition in README with setup instructions
Fixes #262.
4 years ago
bors[bot] ba9e92c4b9
Merge #275
275: `main` fn and error message improvements r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
4 years ago
Thomas Eizinger c826a28911
Add context if we fail to compute extended private key 4 years ago
Thomas Eizinger 1aa6d177bf
Improve error messages when determining BTC amount to be swapped 4 years ago
Thomas Eizinger 4138039ea0
Make sure all error messages start with an uppercase letter
These might potentially be shown to a user, let's make them all
consistent.
4 years ago
Thomas Eizinger 816e8b9b96
Add more context to fallible functions inside bitcoin::Wallet 4 years ago
Thomas Eizinger 5c24a46298
Improve error message if stuff fails directly in main 4 years ago
Thomas Eizinger 37f97ac471
Shorten function name
The variable will always be at least called `wallet`, hence we can
omit the `_wallet` postfix from the function name.
4 years ago
Thomas Eizinger 4f66269887
Move error message on sync _into_ the function
The bitcoin::Wallet::sync_wallet function doesn't do anything else
other than delegating. As such, we have just as much information
about what went wrong inside this function as we have outside.

By moving the .context call into the function, we can avoid repeating
us on every call-site.
4 years ago
Thomas Eizinger 5953037b81
Don't repeat the module name within the type 4 years ago
Thomas Eizinger 87f928f56c
Move const to function where it is used 4 years ago
Thomas Eizinger 4642e6c0e3
Simplify arguments to `init_XYZ_wallet` functions
This makes the function calls fit onto one line.
4 years ago
Thomas Eizinger d0db6cba10
Favour individual logs over one in main 4 years ago
bors[bot] 2041f367c6
Merge #288
288: Switch to public stagenet node that works r=rishflab a=rishflab

The xmr.to node has been unreliable lately. The exan.tech node seems to
working.

@da-kami is following up with making this configurable. Lets get this in so we can get a release on Friday.

Co-authored-by: rishflab <rishflab@hotmail.com>
4 years ago
rishflab 754159c9f8 Switch to public stagenet node that works
The xmr.to node has been unreliable lately. The exan.tech node seems to
working.
4 years ago
bors[bot] b7709e1200
Merge #287
287: Properly deal with messages on kraken websocket connection r=da-kami a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
4 years ago
bors[bot] 1f40de15a3
Merge #284 #286
284: Rename `latest` release to `preview` r=thomaseizinger a=thomaseizinger

The latest release should refer to the latest non-pre release.
What we are doing here is actually publishing a preview release.

Fixes #281.

286: Update Cargo.lock for new version r=thomaseizinger a=thomaseizinger

I forgot about this in the last commit ...

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
4 years ago
Thomas Eizinger b178e95f95
Redo layout of eventloop module
1. Move internal types to the bottom and make them private
2. Sort public types by their importance
4 years ago
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.
4 years ago
Thomas Eizinger f6ed4d65b5
Properly deal with additional messages sent from kraken 4 years ago
Thomas Eizinger 7575d412b8
Add kraken_ticker CLI for local testing of the client 4 years ago
Thomas Eizinger 5ce9e5662c
Update Cargo.lock for new version
I forgot about this in the last commit ...
4 years ago
Thomas Eizinger 60d6d50246
Extract kraken websocket client into dedicated module 4 years ago
Thomas Eizinger 3e6e746852
Rename `latest` release to `preview`
The latest release should refer to the latest non-pre release.
What we are doing here is actually publishing a preview release.

Fixes #281.
4 years ago
bors[bot] ed6dc924c9
Merge #283
283: Prepare for next release r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
4 years ago
Thomas Eizinger 25c4639689
Prepare for next release 4 years ago
bors[bot] 5cb25edea0
Merge #276
276: Use Rust cache action instead of rolling it ourselves r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
4 years ago
Thomas Eizinger 52433f7412
Use Rust cache action 4 years ago