Closed jomagalo closed 5 months ago
The dealer expects the default wallet (with an empty name) to be available, and you have a wallet named dealer
.
Please create a wallet with the empty name first:
elements-cli createwallet ""
We created a patch to make the code support this feature.
From 3a2435cd86f674efd0985e33d30d04ea17d17756 Mon Sep 17 00:00:00 2001
From: bitchad42 <bitchad@email.local>
Date: Thu, 21 Mar 2024 00:57:46 -0300
Subject: [PATCH] support wallet name
---
rust/sideswap_dealer/src/rpc.rs | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/rust/sideswap_dealer/src/rpc.rs b/rust/sideswap_dealer/src/rpc.rs
index 6fa33f6..4f8301b 100644
--- a/rust/sideswap_dealer/src/rpc.rs
+++ b/rust/sideswap_dealer/src/rpc.rs
@@ -11,6 +11,7 @@ pub struct RpcServer {
pub port: u16,
pub login: String,
pub password: String,
+ pub wallet: String, // PATCH
}
pub trait RpcCall {
@@ -46,10 +47,11 @@ pub fn make_rpc_call<T: RpcCall>(
trace!("make rpc request: {req}");
// If two or more wallets are loaded, most RPC calls must include the wallet name in the URL path
- let wallet_name = "";
+ // let wallet_name = ""; // PATCH
let endpoint = format!(
"http://{}:{}/wallet/{}",
- &rpc_server.host, rpc_server.port, wallet_name
+ // &rpc_server.host, rpc_server.port, wallet_name // PATCH
+ &rpc_server.host, rpc_server.port, rpc_server.wallet // PATCH
);
let encoded_credentials = base64::engine::general_purpose::STANDARD
--
2.39.2
Of course the value would need to be made optional, which seems trivial.
Patch merged (with minor modifications), thanks.
I try to play SideSwap dealer example and get the following errors: