Commit 169bb525 authored by T Dev. D's avatar T Dev. D 😎
Browse files

use new methods AddressFactory

parent 3239144c
......@@ -376,7 +376,6 @@ public class SendFactory {
}
return transaction;
}
public Pair<ArrayList<MyTransactionOutPoint>, ArrayList<TransactionOutput>> boltzmann(List<UTXO> utxos, List<UTXO> utxosBis, BigInteger spendAmount, String address, int account) {
......@@ -749,14 +748,22 @@ public class SendFactory {
String[] s = path.split("/");
if(FormatsUtil.getInstance().isValidBech32(address)) {
debug("SendFactory", "address type:" + "bip84");
HD_Address addr = BIP84Util.getInstance(context).getWallet().getAccount(account).getChain(Integer.parseInt(s[1])).getAddressAt(Integer.parseInt(s[2]));
HD_Address addr = null;
addr = BIP84Util.getInstance(context).getWallet().getAccount(account).getChain(Integer.parseInt(s[1])).getAddressAt(Integer.parseInt(s[2]));
ecKey = addr.getECKey();
}
else if(Address.fromBase58(SamouraiWallet.getInstance().getCurrentNetworkParams(), address).isP2SHAddress()) {
debug("SendFactory", "address type:" + "p2sh");
HD_Address addr = BIP84Util.getInstance(context).getWallet().getAccount(account).getChain(Integer.parseInt(s[1])).getAddressAt(Integer.parseInt(s[2]));
if(account == WhirlpoolMeta.getInstance(context).getWhirlpoolPostmix()) {
debug("SendFactory", "address type:" + "post-mix p2sh");
HD_Address addr = BIP84Util.getInstance(context).getWallet().getAccount(WhirlpoolMeta.getInstance(context).getWhirlpoolPostmix()).getChain(Integer.parseInt(s[1])).getAddressAt(Integer.parseInt(s[2]));
ecKey = addr.getECKey();
}
else {
debug("SendFactory", "address type:" + "bip49");
HD_Address addr = BIP49Util.getInstance(context).getWallet().getAccount(0).getChain(Integer.parseInt(s[1])).getAddressAt(Integer.parseInt(s[2]));
ecKey = addr.getECKey();
}
}
else {
if(account == WhirlpoolMeta.getInstance(context).getWhirlpoolPostmix()) {
debug("SendFactory", "address type:" + "post-mix p2pkh");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment