Skip to content

Commit 039fcd3

Browse files
[fix] Remove unnecessary state updates (#989)
1 parent c9e7cce commit 039fcd3

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@web3-onboard/core",
3-
"version": "2.2.7",
3+
"version": "2.2.8",
44
"scripts": {
55
"build": "rollup -c",
66
"dev": "rollup -c -w",

packages/core/src/views/account-center/Index.svelte

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<script lang="ts">
22
import { onDestroy } from 'svelte'
3+
import { state } from '../../store'
34
import { updateAccountCenter } from '../../store/actions'
45
import type { AccountCenter } from '../../types'
56
import Maximized from './Maximized.svelte'
@@ -17,7 +18,10 @@
1718
onDestroy(minimize)
1819
1920
function minimize() {
20-
updateAccountCenter({ expanded: false })
21+
const { accountCenter } = state.get()
22+
if (accountCenter.expanded) {
23+
updateAccountCenter({ expanded: false })
24+
}
2125
}
2226
</script>
2327

0 commit comments

Comments
 (0)