mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-08-30 12:50:24 +00:00
added ReplayBundleResponse
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user