@dydxprotocol/v4-client-js 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/clients/native.ts
CHANGED
|
@@ -220,12 +220,17 @@ export async function getFeeTiers(): Promise<string> {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
-
export async function getUserFeeTier(
|
|
223
|
+
export async function getUserFeeTier(payload: string): Promise<string> {
|
|
224
224
|
try {
|
|
225
225
|
const client = globalThis.client;
|
|
226
226
|
if (client === undefined) {
|
|
227
227
|
throw new UserError('client is not connected. Call connectClient() first');
|
|
228
228
|
}
|
|
229
|
+
const json = JSON.parse(payload);
|
|
230
|
+
const address = json.address;
|
|
231
|
+
if (address === undefined) {
|
|
232
|
+
throw new UserError('address is not set');
|
|
233
|
+
}
|
|
229
234
|
const feeTiers = await globalThis.client?.validatorClient.get.getUserFeeTier(address);
|
|
230
235
|
return encodeJson(feeTiers);
|
|
231
236
|
} catch (e) {
|