Merge pull request #4560 from jmacxx/fix_xmr_amount_check

XMR autoconf should get amount from trade not offer
This commit is contained in:
sqrrm 2020-09-27 14:40:23 +02:00 committed by GitHub
commit 3174778018
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -60,8 +60,7 @@ public class XmrTxProofModel implements AssetTxProofModel {
this.serviceAddress = serviceAddress;
this.autoConfirmSettings = autoConfirmSettings;
Coin tradeAmount = trade.getTradeAmount();
Volume volume = checkNotNull(trade.getOffer()).getVolumeByAmount(tradeAmount);
Volume volume = trade.getTradeVolume();
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
volume != null ? volume.getValue() * 10000L : 0L; // XMR satoshis have 12 decimal places vs. bitcoin's 8

View File

@ -144,6 +144,8 @@ public class XmrTxProofParser implements AssetTxProofParser<XmrTxProofRequest.Re
amountMatches = jsonAmount == model.getAmount();
if (amountMatches) {
break;
} else {
log.warn("amount {}, expected: {}", jsonAmount, model.getAmount());
}
}
}