diff --git a/README.md b/README.md index fa9d8f8ef2..a552d52b32 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Official frontend app for the Balancer protocol (v2) -![Alt](https://repobeats.axiom.co/api/embed/9a2f4fbb502d735b6b8ec648723e686ae82f1fad.svg "Repobeats analytics image") +![Alt](https://repobeats.axiom.co/api/embed/9a2f4fbb502d735b6b8ec648723e686ae82f1fad.svg 'Repobeats analytics image') ## Development diff --git a/package-lock.json b/package-lock.json index 0841ba2d12..106106ed50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@balancer/frontend-v2", - "version": "1.112.0", + "version": "1.112.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@balancer/frontend-v2", - "version": "1.112.0", + "version": "1.112.3", "license": "MIT", "devDependencies": { "@aave/protocol-js": "^4.3.0", diff --git a/package.json b/package.json index def4f837a7..3f86915853 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@balancer/frontend-v2", - "version": "1.112.0", + "version": "1.112.3", "engines": { "node": "=16", "npm": ">=8" diff --git a/src/components/pool/PoolPageHeader.vue b/src/components/pool/PoolPageHeader.vue index 8d01e741fe..3bb32568e2 100644 --- a/src/components/pool/PoolPageHeader.vue +++ b/src/components/pool/PoolPageHeader.vue @@ -6,7 +6,7 @@ import GauntletIcon from '@/components/images/icons/GauntletIcon.vue'; import APRTooltip from '@/components/tooltips/APRTooltip/APRTooltip.vue'; import useNumbers from '@/composables/useNumbers'; import { usePoolWarning } from '@/composables/usePoolWarning'; -import { usePoolHelpers } from '@/composables/usePoolHelpers'; +import { isFx, usePoolHelpers } from '@/composables/usePoolHelpers'; import { useTokens } from '@/providers/tokens.provider'; import { EXTERNAL_LINKS } from '@/constants/links'; import { POOLS } from '@/constants/pools'; @@ -244,7 +244,7 @@ function symbolFor(titleTokenIndex: number): string { block /> { return { JsonRpcProvider: vi.fn().mockImplementation(() => { - return {}; - }), - WebSocketProvider: vi.fn().mockImplementation(() => { return { once: vi.fn(), }; @@ -30,12 +27,10 @@ describe('RPC provider service', () => { StaticJsonRpcBatchProvider, true ); - const MockedWebSocketProvider = vi.mocked(WebSocketProvider, true); beforeEach(() => { MockedJsonRpcProvider.mockClear(); MockedStaticJsonRpcBatchProvider.mockClear(); - MockedWebSocketProvider.mockClear(); }); it('Instantiates the provider service', () => { @@ -50,6 +45,6 @@ describe('RPC provider service', () => { it('Calls the WebSocketProvider', () => { new RpcProviderService().initBlockListener(() => ({})); - expect(WebSocketProvider).toHaveBeenCalledTimes(1); + expect(MockedJsonRpcProvider).toHaveBeenCalledTimes(1); }); }); diff --git a/src/services/rpc-provider/rpc-provider.service.ts b/src/services/rpc-provider/rpc-provider.service.ts index 50585633c0..c014ecf998 100644 --- a/src/services/rpc-provider/rpc-provider.service.ts +++ b/src/services/rpc-provider/rpc-provider.service.ts @@ -1,5 +1,5 @@ import { Network } from '@/lib/config'; -import { JsonRpcProvider, WebSocketProvider } from '@ethersproject/providers'; +import { JsonRpcProvider } from '@ethersproject/providers'; import { configService } from '@/services/config/config.service'; @@ -15,8 +15,8 @@ export default class RpcProviderService { ) {} public initBlockListener(newBlockHandler: NewBlockHandler): void { - const wsProvider = new WebSocketProvider(this.config.ws); - wsProvider.once('block', newBlockNumber => { + const blockProvider = new JsonRpcProvider(this.config.rpc); + blockProvider.once('block', newBlockNumber => { let currentBlockNumber = newBlockNumber; newBlockHandler(currentBlockNumber); setInterval(() => {