Skip to content

Commit f473e1e

Browse files
committed
Use node wallet for v20_and_below
1 parent 020824c commit f473e1e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

integration_test/tests/wallet.rs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,20 @@ fn wallet__dump_wallet() {
158158
#[test]
159159
fn wallet__encrypt_wallet() {
160160
let wallet_name = "test-wallet";
161+
let passphrase = "test-passphrase";
161162
let node = Node::with_wallet(Wallet::None, &[]);
162-
let _: CreateWallet = node.client.create_wallet(wallet_name).expect("createwallet");
163163

164-
let passphrase = "test-passphrase";
165-
let _: EncryptWallet = node.client.encrypt_wallet(passphrase).expect("encryptwallet");
164+
let client = match () {
165+
#[cfg(feature = "v20_and_below")]
166+
() => node.create_wallet(wallet_name).expect("createwallet"),
167+
#[cfg(not(feature = "v20_and_below"))]
168+
() => {
169+
node.client.create_wallet(wallet_name).expect("createwallet");
170+
&node.client
171+
},
172+
};
173+
174+
let _: EncryptWallet = client.encrypt_wallet(passphrase).expect("encryptwallet");
166175
}
167176

168177
#[test]

0 commit comments

Comments
 (0)