Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add txId to proposal display #2519

Merged
merged 2 commits into from
Mar 8, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public class ProposalDisplay {
@Getter
private int gridRow;
private HyperlinkWithIcon linkHyperlinkWithIcon;
private HyperlinkWithIcon txHyperlinkWithIcon;
private int gridRowStartIndex;
private final List<Runnable> inputChangedListeners = new ArrayList<>();
@Getter
Expand Down Expand Up @@ -219,6 +220,14 @@ public void createAllFields(String title, int gridRowStartIndex, double top, Pro
linkWithIconContainer.setVisible(false);
linkWithIconContainer.setManaged(false);

if (!isMakeProposalScreen) {
Tuple3<Label, HyperlinkWithIcon, VBox> uidTuple = addTopLabelHyperlinkWithIcon(gridPane, ++gridRow,
Res.get("dao.proposal.display.txId"), "", "", 0);
txHyperlinkWithIcon = uidTuple.second;
// TODO HyperlinkWithIcon does not scale automatically (button base, -> make anchorpane as base)
txHyperlinkWithIcon.prefWidthProperty().bind(nameTextField.widthProperty());
}

int comboBoxValueTextFieldIndex = -1;
switch (proposalType) {
case COMPENSATION_REQUEST:
Expand Down Expand Up @@ -477,6 +486,12 @@ public void applyProposalPayload(Proposal proposal) {
linkHyperlinkWithIcon.setOnAction(e -> GUIUtil.openWebPage(proposal.getLink()));
}

if (txHyperlinkWithIcon != null) {
txHyperlinkWithIcon.setText(proposal.getTxId());
txHyperlinkWithIcon.setOnAction(e ->
GUIUtil.openWebPage("https://explorer.bisq.network/testnet/tx.html?tx=" + proposal.getTxId()));
ripcurlx marked this conversation as resolved.
Show resolved Hide resolved
}

if (proposal instanceof CompensationProposal) {
CompensationProposal compensationProposal = (CompensationProposal) proposal;
checkNotNull(requestedBsqTextField, "requestedBsqTextField must not be null");
Expand Down