From 7b036d880b679cde9415edd283ea06319f9e7683 Mon Sep 17 00:00:00 2001 From: jaredvu Date: Tue, 22 Aug 2023 15:39:13 -0700 Subject: [PATCH] Handle EquityTier query --- src/lib/abacus/dydxChainQueries.ts | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/lib/abacus/dydxChainQueries.ts b/src/lib/abacus/dydxChainQueries.ts index 02517d3..c3384d3 100644 --- a/src/lib/abacus/dydxChainQueries.ts +++ b/src/lib/abacus/dydxChainQueries.ts @@ -48,21 +48,20 @@ class DydxChainQueries implements AbacusDydxChainQueriesProtocol { } catch (error) { log('AbacusDydxChainQueries/connectNetwork', error); } finally { - // Dispatch custom event to notify other parts of the app that the network has been connected - const customEvent = new CustomEvent('abacus:connectNetwork', { - detail: { - indexerUrl, - indexerSocketUrl, - validatorUrl, - chainId, - faucetUrl, - }, - }); + // Dispatch custom event to notify other parts of the app that the network has been connected + const customEvent = new CustomEvent('abacus:connectNetwork', { + detail: { + indexerUrl, + indexerSocketUrl, + validatorUrl, + chainId, + faucetUrl, + }, + }); - globalThis.dispatchEvent(customEvent); - callback(JSON.stringify({ success: true })); + globalThis.dispatchEvent(customEvent); + callback(JSON.stringify({ success: true })); } - } parseToPrimitives(x: T): T { @@ -120,6 +119,7 @@ class DydxChainQueries implements AbacusDydxChainQueriesProtocol { const equityTiers = await this.compositeClient?.validatorClient.get.getEquityTierLimitConfiguration(); const parsedEquityTiers = this.parseToPrimitives(equityTiers); + console.log(parsedEquityTiers); callback(JSON.stringify(parsedEquityTiers)); break; case QueryType.FeeTiers: