Skip to content

Commit

Permalink
[Bitstamp] Return Lists instead of arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
tross-nydig committed Jun 13, 2024
1 parent 51a882a commit 80fe1f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import jakarta.ws.rs.core.MediaType;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.List;
import org.knowm.xchange.bitstamp.dto.BitstampException;
import org.knowm.xchange.bitstamp.dto.BitstampTransferBalanceResponse;
import org.knowm.xchange.bitstamp.dto.account.BitstampBalance;
Expand Down Expand Up @@ -647,7 +648,7 @@ BitstampTransferBalanceResponse transferSubAccountBalanceToMain(
@POST
@Path("withdrawal-requests/")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
WithdrawalRequest[] getWithdrawalRequests(
List<WithdrawalRequest> getWithdrawalRequests(
@HeaderParam("X-Auth") String apiKey,
@HeaderParam("X-Auth-Signature") ParamsDigest signer,
@HeaderParam("X-Auth-Nonce") SynchronizedValueFactory<String> nonce,
Expand All @@ -658,7 +659,7 @@ WithdrawalRequest[] getWithdrawalRequests(

@POST
@Path("fees/withdrawal/")
WithdrawalFee[] getWithdrawalFees(
List<WithdrawalFee> getWithdrawalFees(
@HeaderParam("X-Auth") String apiKey,
@HeaderParam("X-Auth-Signature") ParamsDigest signer,
@HeaderParam("X-Auth-Nonce") SynchronizedValueFactory<String> nonce,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,16 +350,13 @@ public List<DepositTransaction> getUnconfirmedDeposits() throws IOException {
public List<WithdrawalRequest> getWithdrawalRequests(Long timeDelta) throws IOException {

try {
final List<WithdrawalRequest> response =
Arrays.asList(
bitstampAuthenticatedV2.getWithdrawalRequests(
return bitstampAuthenticatedV2.getWithdrawalRequests(
apiKeyForV2Requests,
signatureCreatorV2,
uuidNonceFactory,
timestampFactory,
API_VERSION,
timeDelta));
return response;
timeDelta);
} catch (BitstampException e) {
throw handleError(e);
}
Expand All @@ -368,13 +365,12 @@ public List<WithdrawalRequest> getWithdrawalRequests(Long timeDelta) throws IOEx
public List<WithdrawalFee> getWithdrawalFees() throws IOException {

try {
return Arrays.asList(
bitstampAuthenticatedV2.getWithdrawalFees(
return bitstampAuthenticatedV2.getWithdrawalFees(
apiKeyForV2Requests,
signatureCreatorV2,
uuidNonceFactory,
timestampFactory,
API_VERSION));
API_VERSION);
} catch (BitstampException e) {
throw handleError(e);
}
Expand Down

0 comments on commit 80fe1f3

Please sign in to comment.