fireblocks/fireblocks-sdk-js

[Bug] calling validateAddress only produces Errors

Closed this issue · 1 comments

Describe the bug

const validation = await fireblocks.validateAddress(assetId, address);

Whatever I provide as assetId and address, I get an error:

Error: Request failed with status code 400
    at createError (./node_modules/axios/lib/core/createError.js:16:15)
    at settle (./node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (./node_modules/axios/lib/adapters/http.js:293:11)
    at IncomingMessage.emit (events.js:412:35)
    at endReadableNT (internal/streams/readable.js:1334:12)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Expected behavior
Have validation be an ValidateAddressResponse.

Version:

  • fireblocks-sdk version: 2.3.1
  • npm version: v14.18.1
  • node version: 6.14.15

You can check what is the actual error by catching the error and using the error.response.data object.

You probably didn't provide an asset that is valid for this endpoint, this is the list of the valid assets for the endpoint:

"XRP", "XRP_TEST", "XLM", "XLM_TEST", "XDB", "XDB_TEST", "DOT", "WND", "EOS", "EOS_TEST"