[bisq-network/bisq] New trade statistics (#4611)
sqrrm
notifications at github.com
Fri Oct 9 14:02:37 UTC 2020
@sqrrm commented on this pull request.
> + tempPaymentMethod = String.valueOf(PaymentMethodMapper.valueOf(paymentMethod).ordinal());
+ } catch (Throwable t) {
+ tempPaymentMethod = paymentMethod;
+ }
+ this.paymentMethod = tempPaymentMethod;
+ this.date = date;
+ this.mediator = mediator;
+ this.refundAgent = refundAgent;
+ this.extraDataMap = ExtraDataMapValidator.getValidatedExtraDataMap(extraDataMap);
+
+ this.hash = hash == null ? createHash() : hash;
+ }
+
+ public byte[] createHash() {
+ // We create hash from all fields excluding hash itself. We use json as simple data serialisation.
+ // TradeDate is different for both peers so we ignore it for hash. ExtraDataMap is ignored as well as at
Date is not excluded from Json serialization. I think that's correct though since only seller is publishing.
I think this comment is wrong.
> + US_POSTAL_MONEY_ORDER,
+ CASH_DEPOSIT,
+ MONEY_GRAM,
+ WESTERN_UNION,
+ HAL_CASH,
+ F2F,
+ BLOCK_CHAINS,
+ PROMPT_PAY,
+ ADVANCED_CASH,
+ BLOCK_CHAINS_INSTANT
+ }
+
+ private final String currency;
+ private final long price;
+ private final long amount;
+ private final String paymentMethod;
Why not save this as a long? Could set first element as `UNKNOWN` for clients that haven't upgraded after a new method is added.
--
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/4611#pullrequestreview-505606917
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20201009/e933a274/attachment.html>
More information about the bisq-github
mailing list