Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 25 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ members = [
]

[workspace.dependencies]
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
dash-network-seeds = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
key-wallet-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
dash-network = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "f569e7b7b99dfe589c41f9ba7d36fbbe6805acdc" }
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
dash-network-seeds = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
key-wallet-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
dash-network = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "a4b3774758a065e228aee19cecb209356a2f507e" }

# Optimize heavy crypto crates even in dev/test builds so that
# Halo 2 proof generation and verification run at near-release speed.
Expand Down
6 changes: 4 additions & 2 deletions packages/rs-platform-wallet/src/manager/wallet_lifecycle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ impl<P: PlatformWalletPersistence + 'static> PlatformWalletManager<P> {
) -> Result<Arc<PlatformWallet>, PlatformWalletError> {
let mnemonic = parse_mnemonic_any_language(mnemonic_phrase)
.map_err(|e| PlatformWalletError::WalletCreation(format!("Invalid mnemonic: {}", e)))?;
let wallet = Wallet::from_mnemonic(mnemonic, network, accounts).map_err(|e| {
let mut wallet = Wallet::from_mnemonic(mnemonic, network, accounts).map_err(|e| {
PlatformWalletError::WalletCreation(format!(
"Failed to create wallet from mnemonic: {}",
e
))
})?;
wallet.downgrade_to_external_signable();
self.register_wallet(wallet, birth_height_override).await
}

Expand All @@ -104,12 +105,13 @@ impl<P: PlatformWalletPersistence + 'static> PlatformWalletManager<P> {
accounts: WalletAccountCreationOptions,
birth_height_override: Option<u32>,
) -> Result<Arc<PlatformWallet>, PlatformWalletError> {
let wallet = Wallet::from_seed_bytes(seed_bytes, network, accounts).map_err(|e| {
let mut wallet = Wallet::from_seed_bytes(seed_bytes, network, accounts).map_err(|e| {
PlatformWalletError::WalletCreation(format!(
"Failed to create wallet from seed bytes: {}",
e
))
})?;
wallet.downgrade_to_external_signable();
self.register_wallet(wallet, birth_height_override).await
}

Expand Down
Loading