File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -155,10 +155,12 @@ fn wallet__dump_wallet() {
155
155
fn wallet__encrypt_wallet ( ) {
156
156
let node = Node :: with_wallet ( Wallet :: None , & [ ] ) ;
157
157
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" ) ;
160
161
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" ) ;
162
164
}
163
165
164
166
#[ test]
You can’t perform that action at this time.
0 commit comments