mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-05-24 17:31:39 -04:00
Swap-id as file name for generated Monero wallet
Instead of using the private view-key as wallet filename we use the swap-id, to be able to identify which wallet is associated with which swap.
This commit is contained in:
parent
548f057726
commit
489696ee08
4 changed files with 27 additions and 6 deletions
|
@ -73,6 +73,7 @@ impl Wallet {
|
|||
/// keys. The generated wallet will remain loaded.
|
||||
pub async fn create_from_and_load(
|
||||
&self,
|
||||
file_name: &str,
|
||||
private_spend_key: PrivateKey,
|
||||
private_view_key: PrivateViewKey,
|
||||
restore_height: BlockHeight,
|
||||
|
@ -90,6 +91,7 @@ impl Wallet {
|
|||
|
||||
let _ = wallet
|
||||
.generate_from_keys(
|
||||
file_name,
|
||||
&address.to_string(),
|
||||
&private_spend_key.to_string(),
|
||||
&PrivateKey::from(private_view_key).to_string(),
|
||||
|
@ -106,6 +108,7 @@ impl Wallet {
|
|||
/// stored name.
|
||||
pub async fn create_from(
|
||||
&self,
|
||||
file_name: &str,
|
||||
private_spend_key: PrivateKey,
|
||||
private_view_key: PrivateViewKey,
|
||||
restore_height: BlockHeight,
|
||||
|
@ -124,6 +127,7 @@ impl Wallet {
|
|||
|
||||
let _ = wallet
|
||||
.generate_from_keys(
|
||||
file_name,
|
||||
&temp_wallet_address.to_string(),
|
||||
&private_spend_key.to_string(),
|
||||
&PrivateKey::from(private_view_key).to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue