mirror of
https://github.com/jwinterm/LightWallet2.git
synced 2026-10-17 05:21:26 +02:00
Change lockedbalance to just balance.
This commit is contained in:
@@ -212,13 +212,13 @@ public class MainScreen extends AbstractScreen {
|
||||
if (fivesectimer == true) {
|
||||
// Timer task to check balance from simplewallet
|
||||
balancerpc.getinfo(balancevalues);
|
||||
walletview.lockedvalue.setText(df.format(balancevalues.getLockedbalance()/1e12) + " XMR");
|
||||
walletview.balancevalue.setText(df.format(balancevalues.getBalance()/1e12) + " XMR");
|
||||
walletview.unlockedvalue.setText(df.format(balancevalues.getUnlockedbalance()/1e12) + " XMR");
|
||||
if (balancevalues.isChecked()) {
|
||||
walletview.lockedvalue.setStyle(game.uiSkin.get("greenlabel", LabelStyle.class));
|
||||
walletview.balancevalue.setStyle(game.uiSkin.get("greenlabel", LabelStyle.class));
|
||||
walletview.unlockedvalue.setStyle(game.uiSkin.get("greenlabel", LabelStyle.class));
|
||||
} else {
|
||||
walletview.lockedvalue.setStyle(game.uiSkin.get("redlabel", LabelStyle.class));
|
||||
walletview.balancevalue.setStyle(game.uiSkin.get("redlabel", LabelStyle.class));
|
||||
walletview.unlockedvalue.setStyle(game.uiSkin.get("redlabel", LabelStyle.class));
|
||||
}
|
||||
fivesectimer = false;
|
||||
|
||||
@@ -23,8 +23,8 @@ public class WalletView {
|
||||
Label syncvalue;
|
||||
Label unlockedlabel;
|
||||
Label unlockedvalue;
|
||||
Label lockedlabel;
|
||||
Label lockedvalue;
|
||||
Label balancelabel;
|
||||
Label balancevalue;
|
||||
Label calcedlabel;
|
||||
Label calcedvalue;
|
||||
TextButton savewalletbtn;
|
||||
@@ -61,10 +61,10 @@ public class WalletView {
|
||||
walletlayout.add(unlockedlabel).pad(padvalue);
|
||||
walletlayout.add(unlockedvalue).pad(padvalue).row();
|
||||
|
||||
lockedlabel = new Label("Locked balance: ", game.uiSkin);
|
||||
lockedvalue = new Label("Loading...", game.uiSkin, "redlabel");
|
||||
walletlayout.add(lockedlabel).pad(padvalue);
|
||||
walletlayout.add(lockedvalue).pad(padvalue).row();
|
||||
balancelabel = new Label("Balance: ", game.uiSkin);
|
||||
balancevalue = new Label("Loading...", game.uiSkin, "redlabel");
|
||||
walletlayout.add(balancelabel).pad(padvalue);
|
||||
walletlayout.add(balancevalue).pad(padvalue).row();
|
||||
|
||||
calcedlabel = new Label("Calculated balance: ", game.uiSkin);
|
||||
calcedvalue = new Label("None", game.uiSkin);
|
||||
|
||||
@@ -3,7 +3,7 @@ package com.jw.lightwallet.utils;
|
||||
public class BalanceValues {
|
||||
|
||||
long unlockedbalance;
|
||||
long lockedbalance;
|
||||
long balance;
|
||||
boolean checked;
|
||||
|
||||
public boolean isChecked() {
|
||||
@@ -18,11 +18,11 @@ public class BalanceValues {
|
||||
public void setUnlockedbalance(long unlockedbalance) {
|
||||
this.unlockedbalance = unlockedbalance;
|
||||
}
|
||||
public Long getLockedbalance() {
|
||||
return lockedbalance;
|
||||
public Long getBalance() {
|
||||
return balance;
|
||||
}
|
||||
public void setLockedbalance(long lockedbalance) {
|
||||
this.lockedbalance = lockedbalance;
|
||||
public void setBalance(long balance) {
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ public class BalanceRPC {
|
||||
public void handleHttpResponse(HttpResponse httpResponse) {
|
||||
response = httpResponse.getResultAsString();
|
||||
BalanceResponse balanceresponse = new Gson().fromJson(response, BalanceResponse.class);
|
||||
balancevalues.setLockedbalance(balanceresponse.getResult().getLockedbalance());
|
||||
balancevalues.setBalance(balanceresponse.getResult().getBalance());
|
||||
balancevalues.setUnlockedbalance(balanceresponse.getResult().getUnlockedbalance());
|
||||
balancevalues.setChecked(true);
|
||||
}
|
||||
|
||||
@@ -11,10 +11,10 @@ public class BalanceResult {
|
||||
public void setUnlockedbalance(long unlocked_balance) {
|
||||
this.unlocked_balance = unlocked_balance;
|
||||
}
|
||||
public long getLockedbalance() {
|
||||
public long getBalance() {
|
||||
return balance;
|
||||
}
|
||||
public void setLockedbalance(long balance) {
|
||||
public void setBalance(long balance) {
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user