[bisq-network/bisq] Add rpc method 'getaddressbalance' (#4304)
Stan
notifications at github.com
Fri Jun 19 17:15:41 UTC 2020
@ghubstan commented on this pull request.
> @@ -80,6 +80,15 @@ public long getAddressBalance(String addressString) {
return btcWalletService.getBalanceForAddress(address).value;
}
+ public String getAddressBalanceInfo(String addressString) {
+ var satoshiBalance = getAddressBalance(addressString);
+ var btcBalance = formatSatoshis.apply(satoshiBalance);
+ var numConfirmations = getNumConfirmationsForMostRecentTransaction(addressString);
+ return addressString
+ + " balance: " + format("%13s", btcBalance)
+ + ((numConfirmations > 0) ? (" confirmations: " + format("%6d", numConfirmations)) : "");
I am going to take a look at this next, and any changes I make will be in a new PR associated with a [5-getpaymentaccts](https://github.com/ghubstan/bisq/tree/5-getpaymentaccts) sub branch.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4304#discussion_r442957539
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200619/2007da3c/attachment.html>
More information about the bisq-github
mailing list