This commit is contained in:
pinpong
2016-12-28 14:19:24 +01:00
parent 8eb007993b
commit 0d32622d48
2 changed files with 10 additions and 11 deletions
+2 -2
View File
@@ -693,7 +693,7 @@ public class IotaAPIProxy {
* @method getBundle
* @returns {list} bundle Transaction objects
**/
public Bundle getBundle(String transaction) throws ArgumentException, InvalidBundleException, InvalidSignatureException {
public GetBundleResponse getBundle(String transaction) throws ArgumentException, InvalidBundleException, InvalidSignatureException {
Bundle bundle = traverseBundle(transaction, null, null);
if (bundle == null) {
@@ -762,7 +762,7 @@ public class IotaAPIProxy {
if (!isValidSignature) throw new InvalidSignatureException();
}
return bundle;
return GetBundleResponse.create(bundle.getTransactions());
}
/**
@@ -7,17 +7,16 @@ import java.util.List;
public class GetBundleResponse extends AbstractResponse {
public GetBundleResponse(){
}
public GetBundleResponse(List<Transaction> trxs){
this.transactions = trxs;
}
private List<Transaction> transactions = new ArrayList<>();
public static GetBundleResponse create (List<Transaction> transactions){
GetBundleResponse res = new GetBundleResponse();
res.transactions = transactions;
return res;
}
public List<Transaction> getTransactions() {
return transactions;
}
}
}