[bisq-network/bisq] Fix incorrect tx link to tx explorer - fixes #5548 (#5563)

Kai notifications at github.com
Thu Jun 10 20:19:09 CEST 2021


@KaiWitt commented on this pull request.

NACK

TxIdTextField shouldnt be responsible for opening address URLs

> +            String url = this.isAddress ? blockChainExplorer.addressUrl : blockChainExplorer.txUrl;
+            GUIUtil.openWebPage(url + txId, false);

I don't think `TxIdTextField` should open an address URL. I think `AddressTextField` should do that just based on the name (I don't really know the code base yet)

> -            addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.delayedPayoutTxReceiverAddress"),
+            Tuple2<Label, TxIdTextField> field = addLabelTxIdTextField(gridPane, ++rowIndex, Res.get("shared.delayedPayoutTxReceiverAddress"),
                     dispute.getDonationAddressOfDelayedPayoutTx());
+            field.second.setAddress(true);

I think `addAddressTextField()` should be used if you want to show an address

> @@ -66,6 +66,8 @@ public static void setWalletService(BtcWalletService walletService) {
     private TxConfidenceListener txConfidenceListener;
     @Setter
     private boolean isBsq;
+    @Setter
+    private boolean isAddress = false;

A `TxId` cant be an address, this variable shouldn't be here

-- 
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/5563#pullrequestreview-681107126
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20210610/0b1cf805/attachment.htm>


More information about the bisq-github mailing list