Skip to content

Commit b2220fa

Browse files
authored
Merge pull request #190 from blocknative/fix/wallet-state-store
Remove unsubscribe call, isn't needed and errors due to being called multiple times. Closes #187
2 parents 5f5c68c + b8e98e2 commit b2220fa

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/stores.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,14 +155,13 @@ function createWalletStateSliceStore(options: {
155155
const { subscribe, set } = writable(initialState)
156156

157157
let currentState: string | number | null | undefined
158-
const unsubscribe = subscribe(store => {
158+
subscribe(store => {
159159
currentState = store
160160
})
161161

162162
return {
163163
subscribe,
164164
reset: () => {
165-
unsubscribe()
166165
set(undefined)
167166
},
168167
setStateSyncer: (stateSyncer: StateSyncer) => {

0 commit comments

Comments
 (0)