diff --git a/packages/core/src/controllers/PublicStateController.ts b/packages/core/src/controllers/PublicStateController.ts index f4b91511a2..03f83ed2da 100644 --- a/packages/core/src/controllers/PublicStateController.ts +++ b/packages/core/src/controllers/PublicStateController.ts @@ -3,12 +3,14 @@ import type { CaipNetworkId } from '../utils/TypeUtil.js' // -- Types --------------------------------------------- // export interface PublicStateControllerState { + loading: boolean open: boolean selectedNetworkId?: CaipNetworkId } // -- State --------------------------------------------- // const state = proxy({ + loading: false, open: false, selectedNetworkId: undefined }) diff --git a/packages/scaffold/src/client.ts b/packages/scaffold/src/client.ts index e3d760a4a6..596e21fc05 100644 --- a/packages/scaffold/src/client.ts +++ b/packages/scaffold/src/client.ts @@ -130,7 +130,7 @@ export class Web3ModalScaffold { } public getState() { - return { ...PublicStateController.state } + return { ...PublicStateController.state, loading: ModalController.state.loading } } public subscribeState(callback: (newState: PublicStateControllerState) => void) {