From d4a02872922fcf3d83f6fffba3244a59b9e77bfb Mon Sep 17 00:00:00 2001 From: sqrrm Date: Thu, 12 Jul 2018 19:01:06 +0200 Subject: [PATCH] Remove getValueLockedUpInBond --- .../desktop/main/dao/bonding/unlock/LockedTxListItem.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/bisq/desktop/main/dao/bonding/unlock/LockedTxListItem.java b/src/main/java/bisq/desktop/main/dao/bonding/unlock/LockedTxListItem.java index 4f146e0e6de..dde2eaea57d 100644 --- a/src/main/java/bisq/desktop/main/dao/bonding/unlock/LockedTxListItem.java +++ b/src/main/java/bisq/desktop/main/dao/bonding/unlock/LockedTxListItem.java @@ -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; @@ -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 opLockTime = stateService.getLockTime(transaction.getHashAsString());