@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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dydxprotocol/v4-client-js",
3
- "version": "1.13.0",
3
+ "version": "1.14.0",
4
4
  "description": "General client library for the new dYdX system (v4 decentralized)",
5
5
  "main": "build/src/index.js",
6
6
  "scripts": {
@@ -220,12 +220,17 @@ export async function getFeeTiers(): Promise<string> {
220
220
  }
221
221
  }
222
222
 
223
- export async function getUserFeeTier(address: string): Promise<string> {
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) {