Skip to content

Commit 29743e2

Browse files
committed
feat: get currencies preferred_netwokr param
1 parent afa15ba commit 29743e2

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

lib/client.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,14 @@ export class Client {
8585
* https://api.exchange.cryptomkt.com/#currencies
8686
*
8787
* @param {string[]} [currencies] Optional. A list of currencies ids
88-
* @param [preferred_network] Optional. Code of the default network for currencies.
88+
* @param {string} [preferred_network] Optional. Code of the default network for currencies.
8989
*
9090
* @return A list of available currencies
9191
*/
92-
getCurrencies(currencies?: string[], preferred_network?: string): Promise<{ [key: string]: Currency }> {
93-
return this.get("public/currency", { currencies, preferred_network });
92+
async getCurrencies(currencies?: string[], preferred_network?: string): Promise<{ [key: string]: Currency }> {
93+
const response = await this.get("public/currency", { currencies, preferred_network });
94+
console.log(response)
95+
return response
9496
}
9597

9698
/**
@@ -828,13 +830,13 @@ export class Client {
828830
*
829831
* Requires the "Payment information" API key Access Right.
830832
*
831-
* https://api.exchange.cryptomkt.com/#deposit-crypto-address
833+
* https://api.exchange.cryptomkt.com/#generate-deposit-crypto-address
832834
*
833835
* @param {string} currency currency to create a new address
834836
*
835837
* @return The created address for the currency
836838
*/
837-
createDepositCryptoAddress(currency: string): Promise<Address> {
839+
createDepositCryptoAddress(currency: string, network_code?: string): Promise<Address> {
838840
return this.post(`wallet/crypto/address`, { currency });
839841
}
840842

lib/httpClient.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export class HttpClient {
2424
publc: boolean = false
2525
): Promise<any> {
2626
const { url, opts } = this.prepareRequest(params, method, publc, endpoint);
27-
console.log(opts)
2827
try {
2928
return await this.makeFetch(url, opts);
3029
} catch (e) {

lib/models/Currency.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface Currency {
1313
account_top_order: number;
1414
qr_prefix: string;
1515
delisted: boolean;
16+
contract_address: string;
1617
networks: Network[];
1718
}
1819

0 commit comments

Comments
 (0)