added ReplayBundleResponse

This commit is contained in:
pinpong
2017-01-01 21:14:29 +01:00
parent 01538fe3c4
commit bf8e7aa122
2 changed files with 28 additions and 2 deletions
+4 -2
View File
@@ -787,7 +787,7 @@ public class IotaAPIProxy {
* @method replayBundle
* @returns {object} analyzed Transaction objects
**/
public List<Transaction> replayTransfer(String transaction, int depth, int minWeightMagnitude) throws InvalidBundleException, InvalidSignatureException, ArgumentException {
public ReplayBundleResponse replayBundle(String transaction, int depth, int minWeightMagnitude) throws InvalidBundleException, InvalidSignatureException, ArgumentException {
List<String> bundleTrytes = new ArrayList<>();
@@ -798,7 +798,9 @@ public class IotaAPIProxy {
bundleTrytes.add(Converter.transactionTrytes(element));
}
return sendTrytes(bundleTrytes.toArray(new String[bundleTrytes.size()]), depth, minWeightMagnitude);
List<Transaction> trxs = sendTrytes(bundleTrytes.toArray(new String[bundleTrytes.size()]), depth, minWeightMagnitude);
return ReplayBundleResponse.create(trxs.get(0).getPersistence());
}
/**
@@ -0,0 +1,24 @@
package jota.dto.response;
/**
* Created by pinpong on 01.01.17.
*/
public class ReplayBundleResponse extends AbstractResponse {
private Boolean successfully;
public static ReplayBundleResponse create(Boolean successfully) {
ReplayBundleResponse res = new ReplayBundleResponse();
res.successfully = successfully;
return res;
}
public Boolean getSuccessfully() {
return successfully;
}
public void setSuccessfully(Boolean successfully) {
this.successfully = successfully;
}
}