Skip to content

Commit fcbab8c

Browse files
refactor(key-wallet)!: remove MnemonicWithPassphrase wallet type (#747)
* refactor(key-wallet)!: remove `MnemonicWithPassphrase` wallet type Drops the entire passphrase-as-callback feature: callers can no longer construct a wallet that retains a mnemonic and applies a BIP39 passphrase on-demand. Removed across the workspace: - `WalletType::MnemonicWithPassphrase` variant + Zeroize arm - `Wallet::from_mnemonic_with_passphrase` constructor - `add_account_with_passphrase`, `add_bls_account_with_passphrase`, `add_eddsa_account_with_passphrase` on `Wallet` - `derive_extended_private_key_with_passphrase`, `create_accounts_with_passphrase_from_options`, `create_special_purpose_accounts_with_passphrase`, `needs_passphrase`, and `root_extended_priv_key_with_callback` helpers - `add_managed_*_with_passphrase` on `ManagedAccountOperations` - `passphrase` parameter from `WalletManager::create_wallet_from_mnemonic` and `create_wallet_from_mnemonic_return_serialized_bytes` - `passphrase` parameter from FFI `wallet_create_from_mnemonic*`, `wallet_manager_add_wallet_from_mnemonic*`, `wallet_manager_add_wallet_from_mnemonic_return_serialized_bytes` - All passphrase-only tests (`test_wallet_with_passphrase`, `test_passphrase_edge_cases`, the `passphrase_test` module, FFI `test_passphrase_wallets.rs`, etc.) Breaking change: serialized wallets containing the `MnemonicWithPassphrase` variant can no longer be deserialized, and the FFI `passphrase` parameter is gone — callers must update their code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * docs(key-wallet-ffi): regenerate FFI_API.md after passphrase removal Auto-generated docs were stale after removing the `passphrase` parameter from `wallet_create_from_mnemonic*` and `wallet_manager_add_wallet_from_mnemonic*`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * refactor: address review comments after passphrase removal - Distinguish ExternalSignable from WatchOnly in derive_extended_private_key error path so callers see why each variant rejects the request. - Drop the stale "passphrase 'pass1'" debug prints in debug_wallet_add.rs that no longer reflect what the test does. - Remove the obsolete bug-comment and "// No passphrase" annotation in wallet_manager_tests.rs — the bug and the parameter both no longer exist. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6e48993 commit fcbab8c

45 files changed

Lines changed: 78 additions & 1768 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dash-spv-ffi/src/bin/ffi_cli.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,6 @@ fn main() {
537537
let success = wallet_manager_add_wallet_from_mnemonic(
538538
wallet_manager as *mut _,
539539
mnemonic_c.as_ptr(),
540-
ptr::null(), // no passphrase
541540
&mut error,
542541
);
543542

dash-spv-ffi/tests/dashd_sync/context.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,10 @@ impl FFITestContext {
169169
/// Calls FFI wallet functions through raw pointers held by the context.
170170
pub(super) unsafe fn add_wallet(&self, mnemonic: &str) -> Vec<u8> {
171171
let mnemonic_c = CString::new(mnemonic).unwrap();
172-
let passphrase = CString::new("").unwrap();
173172
let mut error = FFIError::default();
174173
let wm = self.session.wallet_manager as *mut FFIWalletManager;
175174

176-
let success = wallet_manager_add_wallet_from_mnemonic(
177-
wm,
178-
mnemonic_c.as_ptr(),
179-
passphrase.as_ptr(),
180-
&mut error,
181-
);
175+
let success = wallet_manager_add_wallet_from_mnemonic(wm, mnemonic_c.as_ptr(), &mut error);
182176
if !success {
183177
let error_msg = if !error.message.is_null() {
184178
CStr::from_ptr(error.message).to_str().unwrap_or("Unknown error")

dash-spv-ffi/tests/test_wallet_manager.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ mod tests {
7979
let (serialized_wallet, expected_wallet_id) = native_manager
8080
.create_wallet_from_mnemonic_return_serialized_bytes(
8181
"abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about",
82-
"",
8382
0,
8483
WalletAccountCreationOptions::Default,
8584
false,

dash-spv/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,6 @@ async fn run() -> Result<(), Box<dyn std::error::Error>> {
292292
let mut wallet_manager = WalletManager::<ManagedWalletInfo>::new(config.network);
293293
wallet_manager.create_wallet_from_mnemonic(
294294
mnemonic_phrase.as_str(),
295-
"",
296295
0,
297296
key_wallet::wallet::initialization::WalletAccountCreationOptions::default(),
298297
)?;

dash-spv/tests/dashd_sync/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ pub(super) fn create_test_wallet(
372372
) -> (Arc<RwLock<WalletManager<ManagedWalletInfo>>>, WalletId) {
373373
let mut wallet_manager = WalletManager::<ManagedWalletInfo>::new(network);
374374
let wallet_id = wallet_manager
375-
.create_wallet_from_mnemonic(mnemonic, "", 0, test_account_options())
375+
.create_wallet_from_mnemonic(mnemonic, 0, test_account_options())
376376
.expect("Failed to create wallet from mnemonic");
377377
(Arc::new(RwLock::new(wallet_manager)), wallet_id)
378378
}

dash-spv/tests/dashd_sync/tests_multi_wallet.rs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ async fn test_wallet_added_at_runtime_catches_up() {
8484
let w1_id = {
8585
let mut wallet_guard = client_handle.client.wallet().write().await;
8686
wallet_guard
87-
.create_wallet_from_mnemonic(&ctx.dashd.wallet.mnemonic, "", 0, test_account_options())
87+
.create_wallet_from_mnemonic(&ctx.dashd.wallet.mnemonic, 0, test_account_options())
8888
.expect("add pre-funded W1 at runtime")
8989
};
9090
wait_for_wallet_synced(client_handle.client.wallet(), &w1_id, initial_height).await;
@@ -115,7 +115,7 @@ async fn test_wallet_added_at_runtime_catches_up() {
115115
let w2_id = {
116116
let mut wallet_guard = client_handle.client.wallet().write().await;
117117
wallet_guard
118-
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, "", initial_height, test_account_options())
118+
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, initial_height, test_account_options())
119119
.expect("add W2 at runtime")
120120
};
121121

@@ -167,12 +167,7 @@ async fn test_wallet_added_at_runtime_catches_up() {
167167
let w3_id = {
168168
let mut wallet_guard = client_handle.client.wallet().write().await;
169169
wallet_guard
170-
.create_wallet_from_mnemonic(
171-
SECONDARY_MNEMONIC,
172-
"",
173-
future_height,
174-
test_account_options(),
175-
)
170+
.create_wallet_from_mnemonic(SECONDARY_MNEMONIC, future_height, test_account_options())
176171
.expect("add W3 at runtime")
177172
};
178173

@@ -278,18 +273,13 @@ async fn test_runtime_add_shared_block_two_wallets() {
278273
let w1_id = {
279274
let mut wallet_guard = client_handle.client.wallet().write().await;
280275
wallet_guard
281-
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, "", initial_height, test_account_options())
276+
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, initial_height, test_account_options())
282277
.expect("add W1 at runtime")
283278
};
284279
let w2_id = {
285280
let mut wallet_guard = client_handle.client.wallet().write().await;
286281
wallet_guard
287-
.create_wallet_from_mnemonic(
288-
SECONDARY_MNEMONIC,
289-
"",
290-
initial_height,
291-
test_account_options(),
292-
)
282+
.create_wallet_from_mnemonic(SECONDARY_MNEMONIC, initial_height, test_account_options())
293283
.expect("add W2 at runtime")
294284
};
295285

@@ -371,7 +361,7 @@ async fn test_runtime_add_during_initial_sync() {
371361
let w1_id = {
372362
let mut wallet_guard = wallet.write().await;
373363
wallet_guard
374-
.create_wallet_from_mnemonic(&ctx.dashd.wallet.mnemonic, "", 0, test_account_options())
364+
.create_wallet_from_mnemonic(&ctx.dashd.wallet.mnemonic, 0, test_account_options())
375365
.expect("add W1 before start")
376366
};
377367

@@ -423,7 +413,7 @@ async fn test_runtime_add_during_initial_sync() {
423413
let w2_id = {
424414
let mut wallet_guard = client_handle.client.wallet().write().await;
425415
wallet_guard
426-
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, "", 0, test_account_options())
416+
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, 0, test_account_options())
427417
.expect("add W2 mid-flight")
428418
};
429419

@@ -506,7 +496,7 @@ async fn test_runtime_add_with_tip_advance_during_rescan() {
506496
let w2_id = {
507497
let mut wallet_guard = client_handle.client.wallet().write().await;
508498
wallet_guard
509-
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, "", 0, test_account_options())
499+
.create_wallet_from_mnemonic(EMPTY_MNEMONIC, 0, test_account_options())
510500
.expect("add W2 at runtime")
511501
};
512502

key-wallet-ffi/FFI_API.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -449,14 +449,14 @@ Free a managed platform account result's error message (if any) Note: This does
449449
#### `wallet_manager_add_wallet_from_mnemonic`
450450

451451
```c
452-
wallet_manager_add_wallet_from_mnemonic(manager: *mut FFIWalletManager, mnemonic: *const c_char, passphrase: *const c_char, error: *mut FFIError,) -> bool
452+
wallet_manager_add_wallet_from_mnemonic(manager: *mut FFIWalletManager, mnemonic: *const c_char, error: *mut FFIError,) -> bool
453453
```
454454

455455
**Description:**
456-
Add a wallet from mnemonic to the manager (backward compatibility) # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
456+
Add a wallet from mnemonic to the manager (backward compatibility) # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
457457

458458
**Safety:**
459-
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
459+
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
460460

461461
**Module:** `wallet_manager`
462462

@@ -465,7 +465,7 @@ Add a wallet from mnemonic to the manager (backward compatibility) # Safety -
465465
#### `wallet_manager_add_wallet_from_mnemonic_return_serialized_bytes`
466466

467467
```c
468-
wallet_manager_add_wallet_from_mnemonic_return_serialized_bytes(manager: *mut FFIWalletManager, mnemonic: *const c_char, passphrase: *const c_char, birth_height: c_uint, account_options: *const crate::types::FFIWalletAccountCreationOptions, downgrade_to_pubkey_wallet: bool, allow_external_signing: bool, wallet_bytes_out: *mut *mut u8, wallet_bytes_len_out: *mut usize, wallet_id_out: *mut u8, error: *mut FFIError,) -> bool
468+
wallet_manager_add_wallet_from_mnemonic_return_serialized_bytes(manager: *mut FFIWalletManager, mnemonic: *const c_char, birth_height: c_uint, account_options: *const crate::types::FFIWalletAccountCreationOptions, downgrade_to_pubkey_wallet: bool, allow_external_signing: bool, wallet_bytes_out: *mut *mut u8, wallet_bytes_len_out: *mut usize, wallet_id_out: *mut u8, error: *mut FFIError,) -> bool
469469
```
470470

471471
**Module:** `wallet_manager`
@@ -475,14 +475,14 @@ wallet_manager_add_wallet_from_mnemonic_return_serialized_bytes(manager: *mut FF
475475
#### `wallet_manager_add_wallet_from_mnemonic_with_options`
476476

477477
```c
478-
wallet_manager_add_wallet_from_mnemonic_with_options(manager: *mut FFIWalletManager, mnemonic: *const c_char, passphrase: *const c_char, account_options: *const crate::types::FFIWalletAccountCreationOptions, error: *mut FFIError,) -> bool
478+
wallet_manager_add_wallet_from_mnemonic_with_options(manager: *mut FFIWalletManager, mnemonic: *const c_char, account_options: *const crate::types::FFIWalletAccountCreationOptions, error: *mut FFIError,) -> bool
479479
```
480480

481481
**Description:**
482-
Add a wallet from mnemonic to the manager with options # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
482+
Add a wallet from mnemonic to the manager with options # Safety - `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
483483

484484
**Safety:**
485-
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
485+
- `manager` must be a valid pointer to an FFIWalletManager instance - `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call
486486

487487
**Module:** `wallet_manager`
488488

@@ -1333,14 +1333,14 @@ Check if a transaction belongs to the wallet using ManagedWalletInfo # Safety
13331333
#### `wallet_create_from_mnemonic`
13341334

13351335
```c
1336-
wallet_create_from_mnemonic(mnemonic: *const c_char, passphrase: *const c_char, network: FFINetwork, error: *mut FFIError,) -> *mut FFIWallet
1336+
wallet_create_from_mnemonic(mnemonic: *const c_char, network: FFINetwork, error: *mut FFIError,) -> *mut FFIWallet
13371337
```
13381338

13391339
**Description:**
1340-
Create a new wallet from mnemonic (backward compatibility - single network) # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1340+
Create a new wallet from mnemonic (backward compatibility - single network) # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
13411341

13421342
**Safety:**
1343-
- `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1343+
- `mnemonic` must be a valid pointer to a null-terminated C string - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
13441344

13451345
**Module:** `wallet`
13461346

@@ -1349,14 +1349,14 @@ Create a new wallet from mnemonic (backward compatibility - single network) # S
13491349
#### `wallet_create_from_mnemonic_with_options`
13501350

13511351
```c
1352-
wallet_create_from_mnemonic_with_options(mnemonic: *const c_char, passphrase: *const c_char, network: FFINetwork, account_options: *const FFIWalletAccountCreationOptions, error: *mut FFIError,) -> *mut FFIWallet
1352+
wallet_create_from_mnemonic_with_options(mnemonic: *const c_char, network: FFINetwork, account_options: *const FFIWalletAccountCreationOptions, error: *mut FFIError,) -> *mut FFIWallet
13531353
```
13541354

13551355
**Description:**
1356-
Create a new wallet from mnemonic with options # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1356+
Create a new wallet from mnemonic with options # Safety - `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
13571357

13581358
**Safety:**
1359-
- `mnemonic` must be a valid pointer to a null-terminated C string - `passphrase` must be a valid pointer to a null-terminated C string or null - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
1359+
- `mnemonic` must be a valid pointer to a null-terminated C string - `account_options` must be a valid pointer to FFIWalletAccountCreationOptions or null - `error` must be a valid pointer to an FFIError structure - The caller must ensure all pointers remain valid for the duration of this call - The returned pointer must be freed with `wallet_free` when no longer needed
13601360

13611361
**Module:** `wallet`
13621362

key-wallet-ffi/examples/check_transaction.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ typedef struct {
3535
// External function declarations
3636
extern void* wallet_create_from_mnemonic(
3737
const char* mnemonic,
38-
const char* passphrase,
3938
FFINetwork network,
4039
FFIError* error
4140
);
@@ -64,7 +63,7 @@ int main() {
6463
FFINetwork network = Testnet;
6564

6665
// Create wallet
67-
void* wallet = wallet_create_from_mnemonic(mnemonic, NULL, network, &error);
66+
void* wallet = wallet_create_from_mnemonic(mnemonic, network, &error);
6867
if (!wallet) {
6968
printf("Failed to create wallet: %s\n", error.message);
7069
return 1;

key-wallet-ffi/src/account_collection.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1070,7 +1070,6 @@ mod tests {
10701070
// Create wallet with default accounts
10711071
let wallet = wallet_create_from_mnemonic_with_options(
10721072
mnemonic.as_ptr(),
1073-
ptr::null(),
10741073
FFINetwork::Testnet,
10751074
ptr::null(),
10761075
error,
@@ -1125,7 +1124,6 @@ mod tests {
11251124

11261125
let wallet = wallet_create_from_mnemonic_with_options(
11271126
mnemonic.as_ptr(),
1128-
ptr::null(),
11291127
FFINetwork::Testnet,
11301128
&options,
11311129
error,
@@ -1172,7 +1170,6 @@ mod tests {
11721170

11731171
let wallet = wallet_create_from_mnemonic_with_options(
11741172
mnemonic.as_ptr(),
1175-
ptr::null(),
11761173
FFINetwork::Testnet,
11771174
&options,
11781175
error,
@@ -1243,7 +1240,6 @@ mod tests {
12431240

12441241
let wallet = wallet_create_from_mnemonic_with_options(
12451242
mnemonic.as_ptr(),
1246-
ptr::null(),
12471243
FFINetwork::Testnet,
12481244
&options,
12491245
error,
@@ -1296,7 +1292,6 @@ mod tests {
12961292

12971293
let wallet = wallet_create_from_mnemonic_with_options(
12981294
mnemonic.as_ptr(),
1299-
ptr::null(),
13001295
FFINetwork::Testnet,
13011296
&options,
13021297
error,
@@ -1381,7 +1376,6 @@ mod tests {
13811376

13821377
let wallet = wallet_create_from_mnemonic_with_options(
13831378
mnemonic.as_ptr(),
1384-
ptr::null(),
13851379
FFINetwork::Testnet,
13861380
&options,
13871381
error,
@@ -1468,7 +1462,6 @@ mod tests {
14681462

14691463
let wallet = wallet_create_from_mnemonic_with_options(
14701464
mnemonic.as_ptr(),
1471-
ptr::null(),
14721465
FFINetwork::Testnet,
14731466
&options,
14741467
error,
@@ -1539,7 +1532,6 @@ mod tests {
15391532
// Create wallet with default accounts (which should have at least BIP44 account 0)
15401533
let wallet = wallet_create_from_mnemonic_with_options(
15411534
mnemonic.as_ptr(),
1542-
ptr::null(),
15431535
FFINetwork::Testnet,
15441536
ptr::null(),
15451537
error,

key-wallet-ffi/src/account_derivation_tests.rs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ mod tests {
2323

2424
// Create wallet on testnet with default accounts
2525
let wallet = unsafe {
26-
wallet::wallet_create_from_mnemonic(
27-
mnemonic.as_ptr(),
28-
passphrase.as_ptr(),
29-
FFINetwork::Testnet,
30-
&mut error,
31-
)
26+
wallet::wallet_create_from_mnemonic(mnemonic.as_ptr(), FFINetwork::Testnet, &mut error)
3227
};
3328
assert!(!wallet.is_null());
3429
assert_eq!(error.code, FFIErrorCode::Success);
@@ -122,12 +117,7 @@ mod tests {
122117

123118
// Create wallet on testnet with default accounts
124119
let wallet = unsafe {
125-
wallet::wallet_create_from_mnemonic(
126-
mnemonic.as_ptr(),
127-
passphrase.as_ptr(),
128-
FFINetwork::Testnet,
129-
&mut error,
130-
)
120+
wallet::wallet_create_from_mnemonic(mnemonic.as_ptr(), FFINetwork::Testnet, &mut error)
131121
};
132122
assert!(!wallet.is_null());
133123

@@ -177,12 +167,7 @@ mod tests {
177167

178168
// Create wallet and get account 0
179169
let wallet = unsafe {
180-
wallet::wallet_create_from_mnemonic(
181-
mnemonic.as_ptr(),
182-
passphrase.as_ptr(),
183-
FFINetwork::Testnet,
184-
&mut error,
185-
)
170+
wallet::wallet_create_from_mnemonic(mnemonic.as_ptr(), FFINetwork::Testnet, &mut error)
186171
};
187172
assert!(!wallet.is_null());
188173
let account = unsafe {

0 commit comments

Comments
 (0)