Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:fix proxied socialWindow state issue #2490

Merged
merged 10 commits into from
Jul 3, 2024
4 changes: 2 additions & 2 deletions packages/core/src/controllers/AccountController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import type { W3mFrameTypes } from '@web3modal/wallet'
import { ChainController } from './ChainController.js'
import type { Chain } from '@web3modal/common'
import { NetworkController } from './NetworkController.js'
import { proxy } from 'valtio'
import { proxy, ref } from 'valtio'

// -- Types --------------------------------------------- //
export interface AccountControllerState {
Expand Down Expand Up @@ -141,7 +141,7 @@ export const AccountController = {

setSocialWindow(socialWindow: AccountControllerState['socialWindow'], chain?: Chain) {
if (socialWindow) {
ChainController.setAccountProp('socialWindow', socialWindow, chain)
ChainController.setAccountProp('socialWindow', ref(socialWindow), chain)
}
},

Expand Down
Loading