mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-10-04 13:37:00 +00:00
fix
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user