Skip to content

Commit

Permalink
Merge pull request #7 from sqrrm/dao-cleaning2
Browse files Browse the repository at this point in the history
Remove getValueLockedUpInBond
  • Loading branch information
ManfredKarrer authored Jul 13, 2018
2 parents 4e5126c + d4a0287 commit 83fac41
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class LockedTxListItem {
private final String txId;

private int confirmations = 0;
private Coin amount;
private Coin amount = Coin.ZERO;
private int lockTime;
private AutoTooltipButton button;

Expand Down Expand Up @@ -86,7 +86,8 @@ class LockedTxListItem {
checkNotNull(transaction, "transaction must not be null as we only have list items from transactions " +
"which are available in the wallet");

amount = bsqWalletService.getValueLockedUpInBond(transaction);
stateService.getLockupTxOutput(transaction.getHashAsString()).ifPresent(
out -> amount = Coin.valueOf(out.getValue()));

//TODO SQ: use DaoFacade instead of direct access to stateService
Optional<Integer> opLockTime = stateService.getLockTime(transaction.getHashAsString());
Expand Down

0 comments on commit 83fac41

Please sign in to comment.