@replicode/parallax
Advanced tools
Comparing version 1.1.35 to 1.1.37
@@ -9,3 +9,3 @@ import { ParallaxOptions } from './parallax.options'; | ||
stats(address: string, collection: string): Promise<Parallax.UserStatsByCollectionResponse>; | ||
userWallets(userID: string, type?: string): Promise<Parallax.Wallet[]>; | ||
userWallets(userID: string): Promise<Parallax.Wallet[]>; | ||
addWallet(userID: string, chain: string, address: string): Promise<Boolean>; | ||
@@ -12,0 +12,0 @@ removeWallet(userID: string, chain: string, address: string): Promise<Boolean>; |
@@ -26,3 +26,4 @@ "use strict"; | ||
headers: { | ||
"X-API-Key": this.options.api_key | ||
"X-API-Key": this.options.api_key, | ||
'X-EXTERNAL-TYPE': 'discord' | ||
} | ||
@@ -47,12 +48,10 @@ }); | ||
} | ||
async userWallets(userID, type) { | ||
async userWallets(userID) { | ||
let route = `/user/wallet`; | ||
var params = { | ||
userID: userID | ||
}; | ||
if (type) { | ||
params['type'] = type; | ||
} | ||
try { | ||
let response = await this.client.get(route, { params }); | ||
let response = await this.client.get(route, { | ||
headers: { | ||
'X-EXTERNAL-ID': userID | ||
} | ||
}); | ||
let wallets = response.data; | ||
@@ -74,4 +73,3 @@ return wallets; | ||
headers: { | ||
'X-EXTERNAL-ID': userID, | ||
'X-EXTERNAL-TYPE': 'discord' | ||
'X-EXTERNAL-ID': userID | ||
} | ||
@@ -78,0 +76,0 @@ }); |
{ | ||
"name": "@replicode/parallax", | ||
"version": "1.1.35", | ||
"version": "1.1.37", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index", |
@@ -25,3 +25,4 @@ import { Injectable, Logger } from '@nestjs/common'; | ||
headers: { | ||
"X-API-Key": this.options.api_key | ||
"X-API-Key": this.options.api_key, | ||
'X-EXTERNAL-TYPE': 'discord' | ||
} | ||
@@ -51,15 +52,11 @@ }); | ||
async userWallets(userID:string, type?: string):Promise<Parallax.Wallet[]> { | ||
async userWallets(userID:string):Promise<Parallax.Wallet[]> { | ||
let route = `/user/wallet`; | ||
var params = { | ||
userID: userID | ||
}; | ||
if (type) { | ||
params['type'] = type; | ||
} | ||
try { | ||
let response:AxiosResponse = await this.client.get(route, { params }); | ||
let response:AxiosResponse = await this.client.get(route,{ | ||
headers: { | ||
'X-EXTERNAL-ID': userID | ||
} | ||
}); | ||
let wallets: Parallax.Wallet[] = response.data as Parallax.Wallet[]; | ||
@@ -85,4 +82,3 @@ return wallets; | ||
headers: { | ||
'X-EXTERNAL-ID': userID, | ||
'X-EXTERNAL-TYPE': 'discord' | ||
'X-EXTERNAL-ID': userID | ||
} | ||
@@ -89,0 +85,0 @@ }); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27198
600