Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_external_wallet() is not retrieving the customerRefId #79

Open
juliocepar opened this issue May 24, 2022 · 0 comments
Open

get_external_wallet() is not retrieving the customerRefId #79

juliocepar opened this issue May 24, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@juliocepar
Copy link

Describe the bug
The method get_external_wallet() is not retrieving the customerRefId property, even though this property is set for a wallet (not null).

To Reproduce
Steps to reproduce the behavior:

  1. Write the following code:
from fireblocks_sdk import FireblocksSDK
import json

with open('/path/to/secret.key', 'r') as file: # Replace '/path/to/secret.key' with a valid path
    fireblocks = FireblocksSDK(
        private_key=file.read(),
        api_key='my_api_key', # Replace 'my_api_key' with a valid API Key
        api_base_url='https://api.fireblocks.io'
    )
    my_external_wallet_id = 'aac59cad-6bc7-931c-bddf-cbc633b455ea' # A valid walletId
    ew = fireblocks.get_external_wallet(my_external_wallet_id)
    print("##### Retrieving one external wallet:")
    print(json.dumps(ew, indent=2))

    external_wallets = fireblocks.get_external_wallets()
    print("##### Retrieving all the external wallets and getting only the same retrieved one above:")
    for wallet in external_wallets:
        if wallet['id'] == ew['id']:
            print(json.dumps(wallet, indent=2))
            break
  1. Run the code.

Expected behavior
It should display two dictionaries printed out, according to API specifications (https://docs.fireblocks.com/api/?python#externalwallet) and they should be exactly the same object.

Actual behavior
The obtained object by using get_external_wallet() (single) doesn't have the property customerRefId, but the obtained object by using get_external_wallets() (multiple) does have that property:

##### Retrieving one external wallet:
{
  "id": "aac59cad-6bc7-931c-bddf-cbc633b455ea",
  "name": "Ricardo_ETH-ETH_TEST-EV3K05V9CDX2",
  "assets": [
    {
      "id": "ETH_TEST",
      "status": "APPROVED",
      "address": "0x26B13e3927022988cd7D805D5bc85cD9Fc06208b",
      "tag": ""
    }
  ]
}
##### Retrieving all the external wallets and getting only the same retrieved one above:
{
  "id": "aac59cad-6bc7-931c-bddf-cbc633b455ea",
  "name": "Ricardo_ETH-ETH_TEST-EV3K05V9CDX2",
  "customerRefId": "Ricardo_ETH-ETH_TEST-EV3K05V9CDX2",
  "assets": [
    {
      "id": "ETH_TEST",
      "status": "APPROVED",
      "address": "0x26B13e3927022988cd7D805D5bc85cD9Fc06208b",
      "tag": ""
    }
  ]
}

Versions:

  • Python Version: 3.9
  • fireblocks-sdk version: 1.16.0
@juliocepar juliocepar added the bug Something isn't working label May 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants