mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 18:03:12 +01:00
Add isUnspent to JsonTxOutput
This commit is contained in:
parent
3de2746834
commit
012dab9ad2
@ -233,6 +233,7 @@ public class ExportJsonFilesService implements DaoSetupService {
|
||||
JsonTxOutputType txOutputType = JsonTxOutputType.valueOf(txOutput.getTxOutputType().name());
|
||||
int lockTime = txOutput.getLockTime();
|
||||
String opReturn = txOutput.getOpReturnData() != null ? Utils.HEX.encode(txOutput.getOpReturnData()) : null;
|
||||
boolean isUnspent = bsqStateService.isUnspent(txOutput.getKey());
|
||||
return new JsonTxOutput(tx.getId(),
|
||||
txOutput.getIndex(),
|
||||
bsqAmount,
|
||||
@ -249,7 +250,8 @@ public class ExportJsonFilesService implements DaoSetupService {
|
||||
txOutputType,
|
||||
txOutputType.getDisplayString(),
|
||||
opReturn,
|
||||
lockTime
|
||||
lockTime,
|
||||
isUnspent
|
||||
);
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
|
@ -41,11 +41,12 @@ class JsonTxOutput {
|
||||
private final long time;
|
||||
private final JsonTxType txType;
|
||||
private final String txTypeDisplayString;
|
||||
private final JsonTxOutputType txOutputType; // new
|
||||
private final String txOutputTypeDisplayString; // new
|
||||
private final JsonTxOutputType txOutputType;
|
||||
private final String txOutputTypeDisplayString;
|
||||
@Nullable
|
||||
private final String opReturn;
|
||||
private final int lockTime; // new
|
||||
private final int lockTime;
|
||||
private final boolean isUnspent;
|
||||
|
||||
String getId() {
|
||||
return txId + ":" + index;
|
||||
|
Loading…
Reference in New Issue
Block a user