Skip to content

Commit

Permalink
Remove validate parent proxy address validation
Browse files Browse the repository at this point in the history
  • Loading branch information
teodorus-nathaniel committed Jun 28, 2024
1 parent 2791c91 commit 789a118
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions src/stores/my-account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,16 +192,6 @@ const useMyAccountBase = create<State & Actions>()((set, get) => ({
if (parentProxyAddress) {
parentProxyAddressStorage.set(parentProxyAddress)
set({ parentProxyAddress })
await validateParentProxyAddress({
grillAddress: address,
parentProxyAddress,
onInvalidProxy: () => {
get().logout()
toast.custom((t) => (
<Toast t={t} type='error' title='Login failed' />
))
},
})
}
}
} catch (e) {
Expand Down Expand Up @@ -288,36 +278,6 @@ const useMyAccountBase = create<State & Actions>()((set, get) => ({
parentProxyAddress: parentProxyAddress ?? undefined,
})

if (!get().isTemporaryAccount) {
if (address && !parentProxyAddress) {
get().logout()
toast.custom((t) => (
<Toast
t={t}
type='error'
title='Logged out'
subtitle='Please reopen the page'
/>
))
} else if (parentProxyAddress && !get().isTemporaryAccount) {
await validateParentProxyAddress({
grillAddress: get().address!,
parentProxyAddress,
onInvalidProxy: () => {
get().logout()
toast.custom((t) => (
<Toast
t={t}
type='error'
title='Logged out'
subtitle='Please reopen the page'
/>
))
},
})
}
}

set({ isInitializedProxy: true })
},
}))
Expand Down

0 comments on commit 789a118

Please sign in to comment.