@@ -24,6 +24,7 @@ use crate::epic_util::secp::key::SecretKey;
2424use crate :: epic_util:: Mutex ;
2525
2626use crate :: api_impl:: owner_updater:: StatusMessage ;
27+ use crate :: config:: EpicboxConfig ;
2728use crate :: epic_keychain:: { Identifier , Keychain } ;
2829use crate :: epic_util:: secp:: key:: PublicKey ;
2930use crate :: epicbox_address:: EpicboxAddress ;
@@ -104,6 +105,7 @@ where
104105pub fn get_public_address < ' a , L , C , K > (
105106 wallet_inst : Arc < Mutex < Box < dyn WalletInst < ' a , L , C , K > > > > ,
106107 keychain_mask : Option < & SecretKey > ,
108+ epicbox_config : EpicboxConfig ,
107109 index : u32 ,
108110) -> Result < EpicboxAddress , Error >
109111where
@@ -116,8 +118,11 @@ where
116118 let k = w. keychain ( keychain_mask) ?;
117119 let sec_addr_key = address:: address_from_derivation_path ( & k, & parent_key_id, index) ?;
118120 let pub_key = PublicKey :: from_secret_key ( k. secp ( ) , & sec_addr_key) . unwrap ( ) ;
119-
120- Ok ( EpicboxAddress :: new ( pub_key, Some ( "" . to_string ( ) ) , Some ( 0 ) ) )
121+ Ok ( EpicboxAddress :: new (
122+ pub_key,
123+ Some ( epicbox_config. epicbox_domain . unwrap ( ) ) ,
124+ Some ( epicbox_config. epicbox_port . unwrap ( ) ) ,
125+ ) )
121126}
122127
123128/// retrieve outputs
0 commit comments