Skip to content

Commit 078e1f7

Browse files
committed
Use client from node create_wallet function
1 parent f5cb0f8 commit 078e1f7

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

integration_test/tests/wallet.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,10 +155,12 @@ fn wallet__dump_wallet() {
155155
fn wallet__encrypt_wallet() {
156156
let node = Node::with_wallet(Wallet::None, &[]);
157157

158-
// NOTE: `create_wallet` from node returns the `/wallet/<name>` path required in v17–v20 for encrypt wallet RPC.
159-
node.create_wallet("test-wallet").expect("createwallet");
158+
// NOTE: Create a new wallet and returns a dedicated client instance for it.
159+
// This client will send RPCs to the `/wallet/test-wallet` endpoint.
160+
let wallet_client = node.create_wallet("test-wallet").expect("createwallet");
160161

161-
let _: EncryptWallet = node.client.encrypt_wallet("test-passphrase").expect("encryptwallet");
162+
// Use the dedicated client to encrypt the new wallet
163+
let _: EncryptWallet = wallet_client.encrypt_wallet("test-passphrase").expect("encryptwallet");
162164
}
163165

164166
#[test]

0 commit comments

Comments
 (0)