fireblocks / fireblocks-sdk-js

Typescript & Javascript SDK for developers using Fireblocks API
https://docs.fireblocks.com/api/swagger-ui/
MIT License
72 stars 69 forks source link

[Bug] getTransactionsWithPageInfo does not throw with incorrect credentials and empty filter #164

Open eva-ortuno opened 1 year ago

eva-ortuno commented 1 year ago

Describe the bug When calling getTransactionsWithPageInfo() without any of the optionnal parameters and incorrect credentials (for example privateKey set to "-----BEGIN PRIVATE KEY-----"), no error is thrown and the response is an empty list.

To Reproduce Steps to reproduce the behavior:

  1. const fireblocks = new FireblocksSDK("-----BEGIN PRIVATE KEY-----", "test");
  2. const tx = fireblocks.getTransactionsWithPageInfo()
  3. result is { transactions: [], pageDetails: { prevPage: '', nextPage: '' } }

Reproduced on Sandbox account credentials so url set to https://sandbox-api.fireblocks.io

Expected behavior the usual error message would be secretOrPrivateKey must be an asymmetric key when using RS256 expected Ideally if the credentials are incorrect, an error would be thrown directly at step 1 when creation to fireblocks instance.

Version: