`get_external_wallet()` is not retrieving the customerRefId
Opened this issue · 0 comments
juliocepar commented
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:
- 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
- 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