From bafc19b6d91a2aecd2cb8ba753fe52c17b7d6622 Mon Sep 17 00:00:00 2001 From: Behnam Jaberi Date: Sat, 21 Oct 2023 13:11:32 +0330 Subject: [PATCH] Update init saga file and call watchcurrentNetwork --- src/redux/modules/init/saga.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/redux/modules/init/saga.js b/src/redux/modules/init/saga.js index 879441993..e5e0a2d97 100644 --- a/src/redux/modules/init/saga.js +++ b/src/redux/modules/init/saga.js @@ -1,10 +1,9 @@ -import { put, take, takeEvery } from 'redux-saga/effects' -import { watchAppNetwrok } from '../web3/slice' +import { put, call, takeEvery } from 'redux-saga/effects' +import { watchCurrentNetwork } from '../web3/saga' import { initApp, initAppCompleted } from './slice' export function* watchInitApp() { try { - yield put(watchAppNetwrok()) - yield take(watchAppNetwrok) + yield call(watchCurrentNetwork) yield put(initAppCompleted()) } catch (e) { console.log(e, 'error in init app')