mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
Refactoring: Replace isGreaterThan(Coin.ZERO) with isPositive()
This commit is contained in:
parent
fdc582a60e
commit
04c02589aa
1 changed files with 4 additions and 4 deletions
|
@ -926,10 +926,10 @@ public class TradeWalletService {
|
||||||
TransactionOutput p2SHMultiSigOutput = depositTx.getOutput(0);
|
TransactionOutput p2SHMultiSigOutput = depositTx.getOutput(0);
|
||||||
Transaction payoutTx = new Transaction(params);
|
Transaction payoutTx = new Transaction(params);
|
||||||
payoutTx.addInput(p2SHMultiSigOutput);
|
payoutTx.addInput(p2SHMultiSigOutput);
|
||||||
if (buyerPayoutAmount.isGreaterThan(Coin.ZERO)) {
|
if (buyerPayoutAmount.isPositive()) {
|
||||||
payoutTx.addOutput(buyerPayoutAmount, Address.fromBase58(params, buyerAddressString));
|
payoutTx.addOutput(buyerPayoutAmount, Address.fromBase58(params, buyerAddressString));
|
||||||
}
|
}
|
||||||
if (sellerPayoutAmount.isGreaterThan(Coin.ZERO)) {
|
if (sellerPayoutAmount.isPositive()) {
|
||||||
payoutTx.addOutput(sellerPayoutAmount, Address.fromBase58(params, sellerAddressString));
|
payoutTx.addOutput(sellerPayoutAmount, Address.fromBase58(params, sellerAddressString));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -989,10 +989,10 @@ public class TradeWalletService {
|
||||||
Sha256Hash spendTxHash = Sha256Hash.wrap(depositTxHex);
|
Sha256Hash spendTxHash = Sha256Hash.wrap(depositTxHex);
|
||||||
payoutTx.addInput(new TransactionInput(params, depositTx, p2SHMultiSigOutputScript.getProgram(), new TransactionOutPoint(params, 0, spendTxHash), msOutput));
|
payoutTx.addInput(new TransactionInput(params, depositTx, p2SHMultiSigOutputScript.getProgram(), new TransactionOutPoint(params, 0, spendTxHash), msOutput));
|
||||||
|
|
||||||
if (buyerPayoutAmount.isGreaterThan(Coin.ZERO)) {
|
if (buyerPayoutAmount.isPositive()) {
|
||||||
payoutTx.addOutput(buyerPayoutAmount, Address.fromBase58(params, buyerAddressString));
|
payoutTx.addOutput(buyerPayoutAmount, Address.fromBase58(params, buyerAddressString));
|
||||||
}
|
}
|
||||||
if (sellerPayoutAmount.isGreaterThan(Coin.ZERO)) {
|
if (sellerPayoutAmount.isPositive()) {
|
||||||
payoutTx.addOutput(sellerPayoutAmount, Address.fromBase58(params, sellerAddressString));
|
payoutTx.addOutput(sellerPayoutAmount, Address.fromBase58(params, sellerAddressString));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue