|
@ -49,7 +49,7 @@ import java.time.*; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
public class HeadersController extends TransactionFormController implements Initializable { |
|
|
public class HeadersController extends TransactionFormController implements Initializable, DynamicUpdate { |
|
|
private static final Logger log = LoggerFactory.getLogger(HeadersController.class); |
|
|
private static final Logger log = LoggerFactory.getLogger(HeadersController.class); |
|
|
public static final String LOCKTIME_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; |
|
|
public static final String LOCKTIME_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; |
|
|
public static final String BLOCK_TIMESTAMP_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss ZZZ"; |
|
|
public static final String BLOCK_TIMESTAMP_DATE_FORMAT = "yyyy-MM-dd HH:mm:ss ZZZ"; |
|
@ -121,7 +121,7 @@ public class HeadersController extends TransactionFormController implements Init |
|
|
private CopyableLabel feeRate; |
|
|
private CopyableLabel feeRate; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private Form blockchainForm; |
|
|
private DynamicForm blockchainForm; |
|
|
|
|
|
|
|
|
@FXML |
|
|
@FXML |
|
|
private Label blockStatus; |
|
|
private Label blockStatus; |
|
@ -410,6 +410,8 @@ public class HeadersController extends TransactionFormController implements Init |
|
|
|
|
|
|
|
|
EventManager.get().post(new RequestOpenWalletsEvent()); |
|
|
EventManager.get().post(new RequestOpenWalletsEvent()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
blockchainForm.setDynamicUpdate(this); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void updateType() { |
|
|
private void updateType() { |
|
@ -493,6 +495,8 @@ public class HeadersController extends TransactionFormController implements Init |
|
|
indicator = (ConfirmationProgressIndicator)blockStatus.getGraphic(); |
|
|
indicator = (ConfirmationProgressIndicator)blockStatus.getGraphic(); |
|
|
indicator.setConfirmations(confirmations); |
|
|
indicator.setConfirmations(confirmations); |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
blockStatus.setGraphic(null); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -779,6 +783,19 @@ public class HeadersController extends TransactionFormController implements Init |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public void update() { |
|
|
|
|
|
BlockTransaction blockTransaction = headersForm.getBlockTransaction(); |
|
|
|
|
|
Sha256Hash txId = headersForm.getTransaction().getTxId(); |
|
|
|
|
|
if(headersForm.getSigningWallet() != null && headersForm.getSigningWallet().getTransactions().containsKey(txId)) { |
|
|
|
|
|
blockTransaction = headersForm.getSigningWallet().getTransactions().get(txId); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if(blockTransaction != null && AppController.getCurrentBlockHeight() != null) { |
|
|
|
|
|
updateBlockchainForm(blockTransaction, AppController.getCurrentBlockHeight()); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@Subscribe |
|
|
@Subscribe |
|
|
public void transactionChanged(TransactionChangedEvent event) { |
|
|
public void transactionChanged(TransactionChangedEvent event) { |
|
|
if(headersForm.getTransaction().equals(event.getTransaction())) { |
|
|
if(headersForm.getTransaction().equals(event.getTransaction())) { |
|
|