Skip to content

Commit

Permalink
fix(wallet-mobile): portfolio sync issues
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed Dec 20, 2024
1 parent d4dc0a4 commit 7615779
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
4 changes: 2 additions & 2 deletions apps/wallet-mobile/src/features/Menu/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export const Menu = () => {
/>
)}

<React.Suspense
{/* <React.Suspense
fallback={
<Item
disabled
Expand All @@ -105,7 +105,7 @@ export const Menu = () => {
onPress={navigateTo.catalystVoting}
left={<Icon.Catalyst size={24} color={color.gray_600} />}
/>
</React.Suspense>
</React.Suspense> */}

<KnowledgeBase //
label={strings.knowledgeBase}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export const DashboardTokensList = () => {
const isPreprod = network === Chain.Network.Preprod

const tokensList = React.useMemo(() => balances.fts ?? [], [balances.fts])

const isJustADA = React.useMemo(() => {
if (tokensList.length >= 2) return false
if (tokensList?.[0] == null || tokensList.length >= 2) return false
const tokenInfo = tokensList[0].info
const isPrimary = isPrimaryToken(tokenInfo)
return isPrimary
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {usePortfolioTokenInfo} from '@yoroi/portfolio'
import {useTheme} from '@yoroi/theme'
import {App} from '@yoroi/types'
import * as React from 'react'
Expand Down Expand Up @@ -28,7 +29,16 @@ export const PortfolioTokenDetailsScreen = () => {
const [isStickyTab, setIsStickyTab] = React.useState(false)
const {id: tokenId} = usePortfolioTokenDetailParams()
const {wallet} = useSelectedWallet()
const tokenInfo = wallet.balances.records.get(tokenId)?.info
const {tokenInfo} = usePortfolioTokenInfo(
{
getTokenInfo: wallet.networkManager.tokenManager.api.tokenInfo,
id: tokenId,
network: wallet.networkManager.network,
primaryTokenInfo: wallet.portfolioPrimaryTokenInfo,
},
{suspense: true},
)

const HEADER_HEIGHT = 304
const {styles} = useStyles(HEADER_HEIGHT)

Expand Down

0 comments on commit 7615779

Please sign in to comment.