mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-10 03:49:48 -05:00
![Thomas Eizinger](/assets/img/avatar_default.png)
Previously, we relied on the wallet in the `monero-wallet-rpc` daemon to be loaded as we do on startup. As a consequence of this expectation, restarting `monero-wallet-rpc` to fix bugs like #652 resulted in the ASB no longer operating correctly. To fix this, we now load the wallet on-demand in case the daemon responds with the error code -13. Ideally, we would implement this behaviour generically using the proxy pattern on the `MoneroWalletRpc` trait. Unfortunately, when attempting to do so we uncover a limitation in the design of `jsonrpc_client`. This limitation is tracked in https://github.com/thomaseizinger/rust-jsonrpc-client/issues/47. Once fixed, we can implement this logic in a more robust way that is not tied to the `check_tx_key` RPC call but applies to any RPC call automatically.
19 lines
408 B
Rust
19 lines
408 B
Rust
#![warn(
|
|
unused_extern_crates,
|
|
missing_debug_implementations,
|
|
missing_copy_implementations,
|
|
rust_2018_idioms,
|
|
clippy::cast_possible_truncation,
|
|
clippy::cast_sign_loss,
|
|
clippy::fallible_impl_from,
|
|
clippy::cast_precision_loss,
|
|
clippy::cast_possible_wrap,
|
|
clippy::dbg_macro
|
|
)]
|
|
#![forbid(unsafe_code)]
|
|
|
|
pub mod monerod;
|
|
pub mod wallet;
|
|
|
|
pub use jsonrpc_client as jsonrpc;
|