Skip to content

Commit

Permalink
Fix address description editing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomer Vilensky committed May 14, 2020
1 parent 8eed0c3 commit 3beed06
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/fireblocks-sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,14 @@ export class FireblocksSDK {
* @param description The description to set
*/
public async setAddressDescription(vaultAccountId: string, assetId: string, address: string, tag?: string, description?: string): Promise<GenerateAddressResponse> {
return await this.apiClient.issuePutRequest(`/v1/vault/accounts/${vaultAccountId}/${assetId}/addresses/${address}:${tag || ""}`, { description: description || "" });
let addressId = address;
if (tag && tag.length > 0) {
addressId = `${address}:${tag}`;
}

return await this.apiClient.issuePutRequest(
`/v1/vault/accounts/${vaultAccountId}/${assetId}/addresses/${addressId}`,
{ description: description || "" });
}

/**
Expand Down

0 comments on commit 3beed06

Please sign in to comment.