Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
deBeauvoir
samourai-wallet-android
Commits
169bb525
Commit
169bb525
authored
Dec 22, 2021
by
T Dev. D
😎
Browse files
use new methods AddressFactory
parent
3239144c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
app/src/main/java/com/samourai/wallet/send/SendFactory.java
app/src/main/java/com/samourai/wallet/send/SendFactory.java
+12
-5
No files found.
app/src/main/java/com/samourai/wallet/send/SendFactory.java
View file @
169bb525
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment