fix issue with reading pubkey from non phantom wallets on account page
This commit is contained in:
parent
7a9dfc2b68
commit
5dc40a2078
|
@ -56,7 +56,9 @@ const BalancesTable = ({
|
|||
const isMobile = width ? width < breakpoints.md : false
|
||||
const mangoAccount = useMangoStore((s) => s.selectedMangoAccount.current)
|
||||
const wallet = useMangoStore((s) => s.wallet.current)
|
||||
const canWithdraw = mangoAccount?.owner.equals(wallet.publicKey)
|
||||
const canWithdraw = wallet?.publicKey
|
||||
? mangoAccount?.owner.equals(wallet.publicKey)
|
||||
: true
|
||||
const { asPath } = useRouter()
|
||||
|
||||
const handleSizeClick = (size, symbol) => {
|
||||
|
|
|
@ -91,7 +91,9 @@ export default function Account() {
|
|||
|
||||
const isMobile = width ? width < breakpoints.sm : false
|
||||
const { pubkey } = router.query
|
||||
const isDelegatedAccount = !mangoAccount?.owner.equals(wallet?.publicKey)
|
||||
const isDelegatedAccount = wallet?.publicKey
|
||||
? !mangoAccount?.owner?.equals(wallet?.publicKey)
|
||||
: false
|
||||
|
||||
const handleCloseAlertModal = useCallback(() => {
|
||||
setShowAlertsModal(false)
|
||||
|
|
Loading…
Reference in New Issue