diff --git a/src/main/java/org/qortal/crosschain/Bitcoiny.java b/src/main/java/org/qortal/crosschain/Bitcoiny.java
index 53388418..350779bc 100644
--- a/src/main/java/org/qortal/crosschain/Bitcoiny.java
+++ b/src/main/java/org/qortal/crosschain/Bitcoiny.java
@@ -534,7 +534,7 @@ public abstract class Bitcoiny implements ForeignBlockchain {
amount = 0;
}
long timestampMillis = t.timestamp * 1000L;
- return new SimpleTransaction(t.txHash, timestampMillis, amount, fee, inputs, outputs);
+ return new SimpleTransaction(t.txHash, timestampMillis, amount, fee, inputs, outputs, null);
}
/**
diff --git a/src/main/java/org/qortal/crosschain/PirateChain.java b/src/main/java/org/qortal/crosschain/PirateChain.java
index 733fd175..3064503a 100644
--- a/src/main/java/org/qortal/crosschain/PirateChain.java
+++ b/src/main/java/org/qortal/crosschain/PirateChain.java
@@ -296,6 +296,7 @@ public class PirateChain extends Bitcoiny {
Long timestamp = transactionJson.getLong("datetime");
Long amount = transactionJson.getLong("amount");
Long fee = transactionJson.getLong("fee");
+ String memo = null;
if (transactionJson.has("incoming_metadata")) {
JSONArray incomingMetadatas = transactionJson.getJSONArray("incoming_metadata");
@@ -305,10 +306,12 @@ public class PirateChain extends Bitcoiny {
if (incomingMetadata.has("value")) {
//String address = incomingMetadata.getString("address");
Long value = incomingMetadata.getLong("value");
- //String memo = incomingMetadata.getString("memo");
-
amount = value; // TODO: figure out how to parse transactions with multiple incomingMetadata entries
}
+
+ if (incomingMetadata.has("memo") && !incomingMetadata.isNull("memo")) {
+ memo = incomingMetadata.getString("memo");
+ }
}
}
}
@@ -316,7 +319,7 @@ public class PirateChain extends Bitcoiny {
// TODO: JSONArray outgoingMetadatas = transactionJson.getJSONArray("outgoing_metadata");
long timestampMillis = Math.toIntExact(timestamp) * 1000L;
- SimpleTransaction transaction = new SimpleTransaction(txId, timestampMillis, amount, fee, null, null);
+ SimpleTransaction transaction = new SimpleTransaction(txId, timestampMillis, amount, fee, null, null, memo);
transactions.add(transaction);
}
}
diff --git a/src/main/java/org/qortal/crosschain/SimpleTransaction.java b/src/main/java/org/qortal/crosschain/SimpleTransaction.java
index 53039020..b61544d1 100644
--- a/src/main/java/org/qortal/crosschain/SimpleTransaction.java
+++ b/src/main/java/org/qortal/crosschain/SimpleTransaction.java
@@ -12,6 +12,7 @@ public class SimpleTransaction {
private long feeAmount;
private List inputs;
private List