mirror of
https://github.com/sparrowwallet/sparrow.git
synced 2024-12-24 12:46:45 +00:00
handle null label
This commit is contained in:
parent
ef2e2a1855
commit
183d0ded2f
1 changed files with 1 additions and 1 deletions
|
@ -482,7 +482,7 @@ public class ElectrumServer {
|
||||||
|
|
||||||
if(!transactionOutputs.equals(node.getTransactionOutputs())) {
|
if(!transactionOutputs.equals(node.getTransactionOutputs())) {
|
||||||
for(BlockTransactionHashIndex txo : transactionOutputs) {
|
for(BlockTransactionHashIndex txo : transactionOutputs) {
|
||||||
Optional<String> optionalLabel = node.getTransactionOutputs().stream().filter(oldTxo -> oldTxo.getHash().equals(txo.getHash()) && oldTxo.getIndex() == txo.getIndex()).map(BlockTransactionHash::getLabel).findFirst();
|
Optional<String> optionalLabel = node.getTransactionOutputs().stream().filter(oldTxo -> oldTxo.getHash().equals(txo.getHash()) && oldTxo.getIndex() == txo.getIndex() && oldTxo.getLabel() != null).map(BlockTransactionHash::getLabel).findFirst();
|
||||||
optionalLabel.ifPresent(txo::setLabel);
|
optionalLabel.ifPresent(txo::setLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue