use bech32_hrp in sendBuilder
@@ -184,10 +184,8 @@ impl<'a> SendBuilder<'a> {
// Note that we need to sign the original address, i.e., `path/index`,
// instead of `path/index/_offset` or `path/_offset`.
// Todo: Make the range 0..100 configurable
- let bech32_addresses = match self.client.get_network_info().network {
- Network::Mainnet => output.address.to_bech32(),
- _ => output.address.to_bech32_testnet(),
- };
+ let bech32_hrp = self.client.get_network_info().bech32_hrp;
+ let bech32_addresses = output.address.to_bech32(&bech32_hrp);
let (address_index, internal) = search_address(
&self.seed.expect("No seed"),
account_index,
