mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
XMR autoconf should get amount from trade not offer
Get the amount from the trade rather than the offer. Log the expected amount when not matching the explorer result. It would have made debugging this issue much more straightforward. Fixes #4557
This commit is contained in:
parent
de71811827
commit
b842a0789c
2 changed files with 3 additions and 2 deletions
|
@ -60,8 +60,7 @@ public class XmrTxProofModel implements AssetTxProofModel {
|
||||||
this.serviceAddress = serviceAddress;
|
this.serviceAddress = serviceAddress;
|
||||||
this.autoConfirmSettings = autoConfirmSettings;
|
this.autoConfirmSettings = autoConfirmSettings;
|
||||||
|
|
||||||
Coin tradeAmount = trade.getTradeAmount();
|
Volume volume = trade.getTradeVolume();
|
||||||
Volume volume = checkNotNull(trade.getOffer()).getVolumeByAmount(tradeAmount);
|
|
||||||
amount = DevEnv.isDevMode() ?
|
amount = DevEnv.isDevMode() ?
|
||||||
XmrTxProofModel.DEV_AMOUNT : // For dev testing we need to add the matching address to the dev tx key and dev view key
|
XmrTxProofModel.DEV_AMOUNT : // For dev testing we need to add the matching address to the dev tx key and dev view key
|
||||||
volume != null ? volume.getValue() * 10000L : 0L; // XMR satoshis have 12 decimal places vs. bitcoin's 8
|
volume != null ? volume.getValue() * 10000L : 0L; // XMR satoshis have 12 decimal places vs. bitcoin's 8
|
||||||
|
|
|
@ -144,6 +144,8 @@ public class XmrTxProofParser implements AssetTxProofParser<XmrTxProofRequest.Re
|
||||||
amountMatches = jsonAmount == model.getAmount();
|
amountMatches = jsonAmount == model.getAmount();
|
||||||
if (amountMatches) {
|
if (amountMatches) {
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
log.warn("amount {}, expected: {}", jsonAmount, model.getAmount());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue