From 3612f90e091f3beb0054c9ca3d8097ab812a871d Mon Sep 17 00:00:00 2001 From: AnhMTV Date: Fri, 24 May 2024 19:41:41 +0700 Subject: [PATCH] Fix disconnecting port problems (3) --- packages/extension-koni-ui/src/contexts/DataContext.tsx | 1 - packages/extension-koni-ui/src/messaging/index.ts | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/extension-koni-ui/src/contexts/DataContext.tsx b/packages/extension-koni-ui/src/contexts/DataContext.tsx index 25c9433713..a738173356 100644 --- a/packages/extension-koni-ui/src/contexts/DataContext.tsx +++ b/packages/extension-koni-ui/src/contexts/DataContext.tsx @@ -185,7 +185,6 @@ export function initBasicData () { export const DataContext = React.createContext(_DataContext); export const DataContextProvider = ({ children }: DataContextProviderProps) => { - // Start ping and and set interval to ping every 10 seconds ping().catch(console.error); diff --git a/packages/extension-koni-ui/src/messaging/index.ts b/packages/extension-koni-ui/src/messaging/index.ts index 0a4109b7fd..407e237e86 100644 --- a/packages/extension-koni-ui/src/messaging/index.ts +++ b/packages/extension-koni-ui/src/messaging/index.ts @@ -8,6 +8,8 @@ import { SWTransactionResult } from '@subwallet/extension-base/services/transact import { sendMessage } from '@subwallet/extension-koni-ui/messaging/base'; export async function ping () { + console.log('ping'); + return sendMessage('pri(ping)', null); }