com.google.bitcoin.core.Transaction

Here are the examples of the java api class com.google.bitcoin.core.Transaction taken from open source projects.

1. BitcoinWallet#updateUI()

Project: bitcoin-android
File: BitcoinWallet.java
private void updateUI() {
    if (appState == null || appState.wallet == null) {
        return;
    }
    TextView balance = (TextView) findViewById(R.id.balanceLabel);
    balance.setText("BTC " + Utils.bitcoinValueToFriendlyString(appState.wallet.getBalance(BalanceType.ESTIMATED)));
    TableLayout tl = (TableLayout) findViewById(R.id.transactions);
    tl.removeAllViews();
    ArrayList<Transaction> transactions = appState.wallet.getAllTransactions();
    // Show only the first 100 transaction
    if (transactions.size() > 100)
        transactions = (ArrayList<Transaction>) transactions.subList(0, 99);
    for (Transaction tx : transactions) {
        addRowForTransaction(tl, tx);
    }
}

2. BackgroundTask#resendPendingTransactions()

Project: bitcoin-android
File: BackgroundTask.java
private void resendPendingTransactions() {
    Log.d("Wallet", "Resending pendings transactions");
    for (Transaction tx : appState.wallet.pending.values()) {
        if (tx.sent(appState.wallet)) {
            Log.d("Wallet", "resending");
            appState.sendTransaction(tx);
        }
    }
}