Merge #766: fix wallet name in settings during install
9a4b665fa1a471a7a6c7e0dea09065f9f01ec35d fix wallet name in settings during install (edouardparis)
Pull request description:
DEFAULT_WALLET_NAME aka simple Liana was still used during creation of wallet settings during install
this should have been noticed if I did test the wallet creation process in detail and if I removed the public exposition of the const variable. SHAME
ACKs for top commit:
edouardparis:
Self-ACK 9a4b665fa1a471a7a6c7e0dea09065f9f01ec35d
Tree-SHA512: 3afd98918a7ddcd10e702d0aed66a0645bea734fde61febe021f07c67f5b42a28018e1556e052f03e413db9c75686f121091a7ab871c7c3533d62b7202761625
This commit is contained in:
commit
7e039d7e38
@ -12,7 +12,7 @@ use liana::{miniscript::bitcoin, signer::HotSigner};
|
||||
use liana::descriptors::LianaDescriptor;
|
||||
use liana::miniscript::bitcoin::bip32::Fingerprint;
|
||||
|
||||
pub const DEFAULT_WALLET_NAME: &str = "Liana";
|
||||
const DEFAULT_WALLET_NAME: &str = "Liana";
|
||||
|
||||
pub fn wallet_name(main_descriptor: &LianaDescriptor) -> String {
|
||||
let desc = main_descriptor.to_string();
|
||||
|
||||
@ -5,7 +5,7 @@ use std::time::Duration;
|
||||
use crate::{
|
||||
app::{
|
||||
settings::{KeySetting, Settings, WalletSetting},
|
||||
wallet::DEFAULT_WALLET_NAME,
|
||||
wallet::wallet_name,
|
||||
},
|
||||
bitcoind::Bitcoind,
|
||||
hw::HardwareWalletConfig,
|
||||
@ -68,13 +68,14 @@ impl Context {
|
||||
.map(|token| HardwareWalletConfig::new(kind, *fingerprint, token))
|
||||
})
|
||||
.collect();
|
||||
let descriptor = self
|
||||
.descriptor
|
||||
.as_ref()
|
||||
.expect("Must be a descriptor at this point");
|
||||
Settings {
|
||||
wallets: vec![WalletSetting {
|
||||
name: DEFAULT_WALLET_NAME.to_string(),
|
||||
descriptor_checksum: self
|
||||
.descriptor
|
||||
.as_ref()
|
||||
.unwrap()
|
||||
name: wallet_name(descriptor),
|
||||
descriptor_checksum: descriptor
|
||||
.to_string()
|
||||
.split_once('#')
|
||||
.map(|(_, checksum)| checksum)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user