Skip to content

Commit

Permalink
fix view as another wallet (#573)
Browse files Browse the repository at this point in the history
  • Loading branch information
jahabeebs committed Jun 13, 2024
1 parent 24c6409 commit 5098c00
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/VaultManager.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ const VaultManager = () => {
return
}
popupsActions.setIsWaitingModalOpen(true)
history.push(`/${value}`)
if (window?.location) {
window.location.assign(`/${value}`)
} else {
history.push(`/${value}`)
}
handleCancel()
await timeout(3000)
popupsActions.setIsWaitingModalOpen(false)
Expand Down
5 changes: 3 additions & 2 deletions src/containers/Vaults/VaultDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ const VaultDetails = ({ ...props }) => {
return props.location.pathname.includes('deposit')
}
return false
}, [props])
}, [props.location])

const isWithdraw = useMemo(() => {
if (props.location) {
return props.location.pathname.includes('withdraw')
}
return false
}, [props])
}, [props.location])

const isOwner = useIsOwner(safeId)

Expand All @@ -52,6 +52,7 @@ const VaultDetails = ({ ...props }) => {
if (safe && safeId && geb && liquidationData) {
safeActions.setSingleSafe(safe)
safeActions.setSafeData(DEFAULT_SAFE_STATE)
return
}

if (!safe && geb && safeId) {
Expand Down
3 changes: 3 additions & 0 deletions src/model/safeModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,9 @@ const safeModel: SafeModel = {
state.list = payload
}),
setSingleSafe: action((state, payload) => {
if (!payload) {
return
}
state.singleSafe = payload
}),
setOperation: action((state, payload) => {
Expand Down

0 comments on commit 5098c00

Please sign in to comment.