// Path: src/com/bridgewalkerapp/androidclient/apidata/WSStatus.java
// @JsonIgnoreProperties(ignoreUnknown=true)
// public class WSStatus extends WebsocketReply {
// 	private long usdBalance;
// 	private long btcIn;
// 	private String primaryBTCAddress;
// 	private List<PendingTransaction> pendingTxs;
// 	private boolean exchangeAvailable;
// 	private long exchangeRate;
// 
// 	@JsonProperty("usd_balance")
// 	public long getUsdBalance() {
// 		return usdBalance;
// 	}
// 
// 	public void setUsdBalance(long usdBalance) {
// 		this.usdBalance = usdBalance;
// 	}
// 
// 	@JsonProperty("btc_in")
// 	public long getBtcIn() {
// 		return btcIn;
// 	}
// 
// 	public void setBtcIn(long btcIn) {
// 		this.btcIn = btcIn;
// 	}
// 
// 	@JsonProperty("primary_btc_address")
// 	public String getPrimaryBTCAddress() {
// 		return primaryBTCAddress;
// 	}
// 
// 	public void setPrimaryBTCAddress(String primaryBTCAddress) {
// 		this.primaryBTCAddress = primaryBTCAddress;
// 	}
// 
// 	@JsonProperty("pending_txs")
// 	public List<PendingTransaction> getPendingTxs() {
// 		return pendingTxs;
// 	}
// 
// 	public void setPendingTxs(List<PendingTransaction> pendingTxs) {
// 		this.pendingTxs = pendingTxs;
// 	}
// 	
// 	public boolean isExchangeAvailable() {
// 		return exchangeAvailable;
// 	}
// 	
// 	@JsonProperty("exchange_available")
// 	public void setExchangeAvailable(boolean exchangeAvailable) {
// 		this.exchangeAvailable = exchangeAvailable;
// 	}
// 	
// 	public long getExchangeRate() {
// 		return exchangeRate;
// 	}
// 	
// 	@JsonProperty("exchange_rate")
// 	public void setExchangeRate(long exchangeRate) {
// 		this.exchangeRate = exchangeRate;
// 	}
// 
// 	@Override
// 	public int getReplyType() {
// 		return TYPE_WS_STATUS;
// 	}
// 
// 	@Override
// 	public boolean isReplyTo(WebsocketRequest request) {
// 		return request.getRequestType() == WebsocketRequest.TYPE_REQUEST_STATUS;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/apidata/subcomponents/PendingTransaction.java
// public class PendingTransaction {
// 	private long amount;
// 	private PendingReason reason;
// 	
// 	@JsonProperty("amount")
// 	public long getAmount() {
// 		return amount;
// 	}
// 	
// 	public void setAmount(long amount) {
// 		this.amount = amount;
// 	}
// 	
// 	@JsonProperty("reason")
// 	public PendingReason getReason() {
// 		return reason;
// 	}
// 	
// 	public void setReason(PendingReason reason) {
// 		this.reason = reason;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/data/ReplyAndRunnable.java
// public class ReplyAndRunnable {
// 	private WebsocketReply reply;
// 	private ParameterizedRunnable runnable;
// 	
// 	public ReplyAndRunnable(WebsocketReply reply, ParameterizedRunnable runnable) {
// 		this.reply = reply;
// 		this.runnable = runnable;
// 	}
// 
// 	public WebsocketReply getReply() {
// 		return reply;
// 	}
// 	
// 	public ParameterizedRunnable getRunnable() {
// 		return runnable;
// 	}
// }


import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
import com.bridgewalkerapp.androidclient.apidata.WSStatus;
import com.bridgewalkerapp.androidclient.apidata.subcomponents.PendingTransaction;
import com.bridgewalkerapp.androidclient.data.ReplyAndRunnable;
	}
	
	abstract protected void displayStatusHook();
	
	private String formatBalance(long usdBalance) {
		return getString(R.string.balance
							, formatUSD(usdBalance, Rounding.ROUND_DOWN));
	}
	
	private String formatExchangeRate(long exchangeRate) {
		if (exchangeRate != 0) {
			return getString(R.string.exchange_rate
								, (double)exchangeRate / (double)BackendService.USD_BASE_AMOUNT);
		} else {
			return "";
		}
	}	
	
	private String formatBTCIn(long btcIn, long exchangeRate) {
		if (btcIn == 0) return null;
		
		if (exchangeRate != 0) {
			return getString(R.string.waiting_for_exchange_with_usd
					, formatBTC(btcIn)
					, calcAndFormatUSDEquivalent(btcIn, exchangeRate));
		} else {
			return getString(R.string.waiting_for_exchange, formatBTC(btcIn));
		}
	}
	
// Path: src/com/bridgewalkerapp/androidclient/apidata/WSStatus.java
// @JsonIgnoreProperties(ignoreUnknown=true)
// public class WSStatus extends WebsocketReply {
// 	private long usdBalance;
// 	private long btcIn;
// 	private String primaryBTCAddress;
// 	private List<PendingTransaction> pendingTxs;
// 	private boolean exchangeAvailable;
// 	private long exchangeRate;
// 
// 	@JsonProperty("usd_balance")
// 	public long getUsdBalance() {
// 		return usdBalance;
// 	}
// 
// 	public void setUsdBalance(long usdBalance) {
// 		this.usdBalance = usdBalance;
// 	}
// 
// 	@JsonProperty("btc_in")
// 	public long getBtcIn() {
// 		return btcIn;
// 	}
// 
// 	public void setBtcIn(long btcIn) {
// 		this.btcIn = btcIn;
// 	}
// 
// 	@JsonProperty("primary_btc_address")
// 	public String getPrimaryBTCAddress() {
// 		return primaryBTCAddress;
// 	}
// 
// 	public void setPrimaryBTCAddress(String primaryBTCAddress) {
// 		this.primaryBTCAddress = primaryBTCAddress;
// 	}
// 
// 	@JsonProperty("pending_txs")
// 	public List<PendingTransaction> getPendingTxs() {
// 		return pendingTxs;
// 	}
// 
// 	public void setPendingTxs(List<PendingTransaction> pendingTxs) {
// 		this.pendingTxs = pendingTxs;
// 	}
// 	
// 	public boolean isExchangeAvailable() {
// 		return exchangeAvailable;
// 	}
// 	
// 	@JsonProperty("exchange_available")
// 	public void setExchangeAvailable(boolean exchangeAvailable) {
// 		this.exchangeAvailable = exchangeAvailable;
// 	}
// 	
// 	public long getExchangeRate() {
// 		return exchangeRate;
// 	}
// 	
// 	@JsonProperty("exchange_rate")
// 	public void setExchangeRate(long exchangeRate) {
// 		this.exchangeRate = exchangeRate;
// 	}
// 
// 	@Override
// 	public int getReplyType() {
// 		return TYPE_WS_STATUS;
// 	}
// 
// 	@Override
// 	public boolean isReplyTo(WebsocketRequest request) {
// 		return request.getRequestType() == WebsocketRequest.TYPE_REQUEST_STATUS;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/apidata/subcomponents/PendingTransaction.java
// public class PendingTransaction {
// 	private long amount;
// 	private PendingReason reason;
// 	
// 	@JsonProperty("amount")
// 	public long getAmount() {
// 		return amount;
// 	}
// 	
// 	public void setAmount(long amount) {
// 		this.amount = amount;
// 	}
// 	
// 	@JsonProperty("reason")
// 	public PendingReason getReason() {
// 		return reason;
// 	}
// 	
// 	public void setReason(PendingReason reason) {
// 		this.reason = reason;
// 	}
// }
// 
// Path: src/com/bridgewalkerapp/androidclient/data/ReplyAndRunnable.java
// public class ReplyAndRunnable {
// 	private WebsocketReply reply;
// 	private ParameterizedRunnable runnable;
// 	
// 	public ReplyAndRunnable(WebsocketReply reply, ParameterizedRunnable runnable) {
// 		this.reply = reply;
// 		this.runnable = runnable;
// 	}
// 
// 	public WebsocketReply getReply() {
// 		return reply;
// 	}
// 	
// 	public ParameterizedRunnable getRunnable() {
// 		return runnable;
// 	}
// }


// Path: src/com/bridgewalkerapp/androidclient/BalanceFragment.java
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.actionbarsherlock.app.SherlockFragment;
import com.bridgewalkerapp.androidclient.apidata.WSStatus;
import com.bridgewalkerapp.androidclient.apidata.subcomponents.PendingTransaction;
import com.bridgewalkerapp.androidclient.data.ReplyAndRunnable;

	}
	
	abstract protected void displayStatusHook();
	
	private String formatBalance(long usdBalance) {
		return getString(R.string.balance
							, formatUSD(usdBalance, Rounding.ROUND_DOWN));
	}
	
	private String formatExchangeRate(long exchangeRate) {
		if (exchangeRate != 0) {
			return getString(R.string.exchange_rate
								, (double)exchangeRate / (double)BackendService.USD_BASE_AMOUNT);
		} else {
			return "";
		}
	}	
	
	private String formatBTCIn(long btcIn, long exchangeRate) {
		if (btcIn == 0) return null;
		
		if (exchangeRate != 0) {
			return getString(R.string.waiting_for_exchange_with_usd
					, formatBTC(btcIn)
					, calcAndFormatUSDEquivalent(btcIn, exchangeRate));
		} else {
			return getString(R.string.waiting_for_exchange, formatBTC(btcIn));
		}
	}
	
	private List<String> formatPendingTxs(List<PendingTransaction> pendingTxs, long exchangeRate) {