Search in sources :

Example 1 with WalletDetails

use of network.bisq.api.model.WalletDetails in project bisq-api by mrosseel.

the class BisqProxy method getWalletDetails.

public WalletDetails getWalletDetails() {
    if (!btcWalletService.isWalletReady()) {
        throw new WalletNotReadyException("Wallet is not ready");
    }
    Coin availableBalance = btcWalletService.getAvailableBalance();
    Coin reservedBalance = updateReservedBalance();
    Coin lockedBalance = updateLockedBalance();
    return new WalletDetails(availableBalance.getValue(), reservedBalance.getValue(), lockedBalance.getValue());
}
Also used : Coin(org.bitcoinj.core.Coin) WalletDetails(network.bisq.api.model.WalletDetails)

Aggregations

WalletDetails (network.bisq.api.model.WalletDetails)1 Coin (org.bitcoinj.core.Coin)1