Skip to content

Commit

Permalink
Watch-only note
Browse files Browse the repository at this point in the history
  • Loading branch information
fireduck64 committed Jan 13, 2020
1 parent dbefa04 commit e12179a
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions RELEASE-NOTES.md
Expand Up @@ -4,6 +4,7 @@
* Adding username and channel identifiers to explorer
* Switching MrPlow to continue using the same channel
* Switching from maven-jar to new maven-install based system for bazel 2.0
* Added watch-only note on wallet summary page of iceleaf GUI

## 1.6.0

Expand Down
6 changes: 5 additions & 1 deletion client/src/Purse.java
Expand Up @@ -34,6 +34,7 @@ public Purse(SnowBlossomClient client, File wallet_path, Config config, NetworkP
{
this(client, wallet_path, config, params, null);
}

public Purse(SnowBlossomClient client, File wallet_path, Config config, NetworkParams params, String import_seed)
throws Exception
{
Expand Down Expand Up @@ -83,8 +84,11 @@ public void maintainKeys(boolean print_on_pass)
if (client!= null) client.getBalance();
}
}
}


public boolean isWatchOnly()
{
return config.getBoolean("watch_only");
}

private synchronized boolean fillKeyPool()
Expand Down
26 changes: 11 additions & 15 deletions iceleaf-ui/src/WalletPanel.java
Expand Up @@ -22,7 +22,6 @@ public class WalletPanel extends BasePanel
protected TreeMap<String, SnowBlossomClient> client_map = new TreeMap<>();
protected LinkedList<PeriodicThread> wake_threads = new LinkedList<>();


public WalletPanel(IceLeaf ice_leaf)
{
super(ice_leaf);
Expand All @@ -32,17 +31,16 @@ public WalletPanel(IceLeaf ice_leaf)
public void setupPanel()
{

GridBagConstraints c = new GridBagConstraints();
c.weightx = 0.0;
c.weighty= 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.WEST;
GridBagConstraints c = new GridBagConstraints();
c.weightx = 0.0;
c.weighty = 0.0;
c.gridheight = 1;
c.anchor = GridBagConstraints.WEST;

c.gridwidth = GridBagConstraints.REMAINDER;

update_thread = new WalletUpdateThread();
update_thread.start();

}

public void wake()
Expand Down Expand Up @@ -115,11 +113,8 @@ public void runPass() throws Exception
{
String text = ErrorUtil.getThrowInfo(e);
setMessageBox(text);

}

}

}

public void addWakeThread(PeriodicThread p)
Expand All @@ -128,7 +123,6 @@ public void addWakeThread(PeriodicThread p)
{
wake_threads.add(p);
}

}

private String getWalletSummary(String name, File db_dir, File config_file, boolean first_pass)
Expand All @@ -148,11 +142,16 @@ private String getWalletSummary(String name, File db_dir, File config_file, bool

setMessageBox("Checking balance: " + name);

return String.format("%s - %s\n %s",
String summary = String.format("%s - %s\n %s",
name,
SnowBlossomClient.getBalanceInfoPrint(client.getBalance()),
addr
);
if (client.getPurse().isWatchOnly())
{
summary = summary +"\n WATCH ONLY";
}
return summary;
}

public Collection<String> getNames()
Expand Down Expand Up @@ -190,9 +189,6 @@ private SnowBlossomClient loadWallet(String name, File db_dir, File config_file)
client_map.put(name, client);
}
return client;



}

public void setWalletBox(String text)
Expand Down

0 comments on commit e12179a

Please sign in to comment.