wallettemplate.utils.WTUtils Java Examples

The following examples show how to use wallettemplate.utils.WTUtils. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SendMoneyController.java    From green_android with GNU General Public License v3.0 5 votes vote down vote up
public void initialize() {
    Coin balance = Main.bitcoin.wallet().getBalance();
    checkState(!balance.isZero());
    new BitcoinAddressValidator(Main.params, address, sendBtn);
    new TextFieldValidator(amountEdit, text ->
            !WTUtils.didThrow(() -> checkState(Coin.parseCoin(text).compareTo(balance) <= 0)));
    amountEdit.setText(balance.toPlainString());
}
 
Example #2
Source File: SendMoneyBlockchainController.java    From thunder with GNU Affero General Public License v3.0 5 votes vote down vote up
public void initialize () {
    Coin balance = Main.wallet.getBalance();
    checkState(!balance.isZero());
    new BitcoinAddressValidator(Constants.getNetwork(), address, sendBtn);
    new TextFieldValidator(amountEdit, text ->
            !WTUtils.didThrow(() -> checkState(Coin.parseCoin(text).compareTo(balance) <= 0)));
    amountEdit.setText(balance.toPlainString());
}
 
Example #3
Source File: SendMoneyController.java    From GreenBits with GNU General Public License v3.0 5 votes vote down vote up
public void initialize() {
    Coin balance = Main.bitcoin.wallet().getBalance();
    checkState(!balance.isZero());
    new BitcoinAddressValidator(Main.params, address, sendBtn);
    new TextFieldValidator(amountEdit, text ->
            !WTUtils.didThrow(() -> checkState(Coin.parseCoin(text).compareTo(balance) <= 0)));
    amountEdit.setText(balance.toPlainString());
}
 
Example #4
Source File: SendMoneyBlockchainController.java    From thundernetwork with GNU Affero General Public License v3.0 5 votes vote down vote up
public void initialize() {
    Coin balance = Main.bitcoin.wallet().getBalance();
    checkState(!balance.isZero());
    new BitcoinAddressValidator(Main.params, address, sendBtn);
    new TextFieldValidator(amountEdit, text ->
            !WTUtils.didThrow(() -> checkState(Coin.parseCoin(text).compareTo(balance) <= 0)));
    amountEdit.setText(balance.toPlainString());
}