Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/client/address.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,12 @@ export const AddressKeystoreClient = (axiosInstance: AxiosInstance, keystore: Ke
/** Get an address by addressID */
fetch: (addressID: string): Promise<AddressResponse> => axiosInstance.get<unknown, AddressResponse>(`/addresses/${addressID}`),

/** @deprecated Use fetchListOfChain() instead */
/** Get a list of withdrawal addresses for the given asset */
fetchList: (assetID: string): Promise<AddressResponse[]> => axiosInstance.get<unknown, AddressResponse[]>(`/assets/${assetID}/addresses`),

fetchListOfChain: (chainID: string): Promise<AddressResponse[]> => axiosInstance.get<unknown, AddressResponse[]>(`/safe/addresses?chain=${chainID}`),

/** Create a new withdrawal address */
create: (pin: string, params: AddressRequest): Promise<AddressResponse> => {
const msg = getCreateAddressTipBody(params.asset_id, params.destination, params.tag ?? '', params.label);
Expand Down
2 changes: 1 addition & 1 deletion test/address.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('address', () => {
tmpAddressID = receive.address_id;
});
it('read addresses', async () => {
const list = await client.address.fetchList(asset_id);
const list = await client.address.fetchListOfChain(asset_id);
const isHave = list.some(item => item.address_id === tmpAddressID);
expect(isHave).toBeTruthy();
});
Expand Down