fireblocks/fireblocks-sdk-js

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

Opened this issue · 0 comments

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:

  • fireblocks-sdk version:4.1.0
  • npm version: 8.3.1
  • node version: 16.14.0