[bisq-network/bisq] Provide more offer & contract detail to CLI (#5357)
sqrrm
notifications at github.com
Fri Apr 2 17:15:32 CEST 2021
@sqrrm commented on this pull request.
> @@ -181,4 +190,32 @@ private static String formatTradeData(String format,
t.getOffer().getBaseCurrencyCode().equals("BTC")
? formatOfferVolume(t.getOffer().getVolume())
: formatSatoshis(t.getTradeAmountAsLong());
+
+ private static final BiFunction<TradeInfo, Boolean, String> bsqReceiveAddress = (t, showBsqBuyerAddress) -> {
+ if (showBsqBuyerAddress) {
+ ContractInfo contract = t.getContract();
+ boolean isBuyerMakerAndSellerTaker = contract.getIsBuyerMakerAndSellerTaker();
+ return isBuyerMakerAndSellerTaker // (is BTC buyer / maker)
+ ? contract.getTakerPaymentAccountPayload().getAddress()
+ : contract.getMakerPaymentAccountPayload().getAddress();
+ } else {
+ return "";
+ }
+ };
+
+ private static boolean shouldShowBqsBuyerAddress(TradeInfo tradeInfo, boolean isTaker) {
Spelling `...Bqs...`
> @@ -305,6 +312,41 @@ void sendBtc(String address,
}
}
+ boolean verifyBsqSentToAddress(String address, String amount) {
There are some issues with this as two trades could have the same amounts, or someone sends the BSQ as two transactions adding up to the total amount. I think this is good enough for now, but it's not fool proof. The problem is the same when trading manually though, just something to keep in mind.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/5357#pullrequestreview-627023763
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210402/64452d98/attachment.htm>
More information about the bisq-github
mailing list