mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
fix receive to address context menu actions
This commit is contained in:
parent
a60eadf8fc
commit
911153e1aa
3 changed files with 4 additions and 3 deletions
|
@ -3,6 +3,7 @@ package com.sparrowwallet.sparrow.control;
|
||||||
import com.sparrowwallet.drongo.address.Address;
|
import com.sparrowwallet.drongo.address.Address;
|
||||||
import com.sparrowwallet.sparrow.glyphfont.FontAwesome5;
|
import com.sparrowwallet.sparrow.glyphfont.FontAwesome5;
|
||||||
import com.sparrowwallet.sparrow.wallet.Entry;
|
import com.sparrowwallet.sparrow.wallet.Entry;
|
||||||
|
import com.sparrowwallet.sparrow.wallet.NodeEntry;
|
||||||
import com.sparrowwallet.sparrow.wallet.UtxoEntry;
|
import com.sparrowwallet.sparrow.wallet.UtxoEntry;
|
||||||
import javafx.geometry.Pos;
|
import javafx.geometry.Pos;
|
||||||
import javafx.scene.control.ContentDisplay;
|
import javafx.scene.control.ContentDisplay;
|
||||||
|
@ -32,7 +33,7 @@ public class AddressCell extends TreeTableCell<Entry, Entry> {
|
||||||
UtxoEntry utxoEntry = (UtxoEntry)entry;
|
UtxoEntry utxoEntry = (UtxoEntry)entry;
|
||||||
Address address = utxoEntry.getAddress();
|
Address address = utxoEntry.getAddress();
|
||||||
setText(address.toString());
|
setText(address.toString());
|
||||||
setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor(), null));
|
setContextMenu(new EntryCell.AddressContextMenu(address, utxoEntry.getOutputDescriptor(), new NodeEntry(utxoEntry.getWallet(), utxoEntry.getNode())));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
tooltip.setText(getTooltipText(utxoEntry));
|
tooltip.setText(getTooltipText(utxoEntry));
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class EntryCell extends TreeTableCell<Entry, Entry> {
|
||||||
NodeEntry nodeEntry = (NodeEntry)entry;
|
NodeEntry nodeEntry = (NodeEntry)entry;
|
||||||
Address address = nodeEntry.getAddress();
|
Address address = nodeEntry.getAddress();
|
||||||
setText(address.toString());
|
setText(address.toString());
|
||||||
setContextMenu(new AddressContextMenu(address, nodeEntry.getOutputDescriptor(), null));
|
setContextMenu(new AddressContextMenu(address, nodeEntry.getOutputDescriptor(), nodeEntry));
|
||||||
Tooltip tooltip = new Tooltip();
|
Tooltip tooltip = new Tooltip();
|
||||||
tooltip.setText(nodeEntry.getNode().getDerivationPath().replace("m", ".."));
|
tooltip.setText(nodeEntry.getNode().getDerivationPath().replace("m", ".."));
|
||||||
setTooltip(tooltip);
|
setTooltip(tooltip);
|
||||||
|
|
|
@ -92,7 +92,7 @@ public class ReceiveController extends WalletFormController implements Initializ
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Platform.runLater(this::refreshAddress);
|
refreshAddress();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setNodeEntry(NodeEntry nodeEntry) {
|
public void setNodeEntry(NodeEntry nodeEntry) {
|
||||||
|
|
Loading…
Reference in a new issue