Skip to content

Commit

Permalink
fix: some release bug (#6151)
Browse files Browse the repository at this point in the history
* fix: should show tip on other chain

* fix: should not query profile table when linked profile size is 0
  • Loading branch information
Lanttcat authored Apr 26, 2022
1 parent c790d7e commit 3c3b4d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ export const FungibleTokenTableRow = memo<TokenTableRowProps>(({ asset, onSend,
</span>
</Tooltip>
<Tooltip
disableHoverListener={isOnCurrentChain || asset.token.chainId !== ChainId.Conflux}
disableHoverListener={isOnCurrentChain || asset.token.chainId === ChainId.Conflux}
disableTouchListener
title={<ChangeNetworkTip chainId={asset.token.chainId} />}
placement="top"
Expand Down
11 changes: 8 additions & 3 deletions packages/mask/background/services/identity/persona/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,14 @@ export async function queryOwnedPersonaInformation(): Promise<PersonaInformation
linkedProfiles: map,
publicHexKey: persona.publicHexKey,
})
const profiles = await queryProfilesDB({ identifiers: [...persona.linkedProfiles.keys()] }, t)
// we must not await toProfileInformation cause it is tx of another db.
extraPromises.push(toProfileInformation(profiles).then((x) => map.push(...x)))

if (!persona.linkedProfiles.size) {
extraPromises.push(toProfileInformation([]).then((x) => map.push(...x)))
} else {
const profiles = await queryProfilesDB({ identifiers: [...persona.linkedProfiles.keys()] }, t)
// we must not await toProfileInformation cause it is tx of another db.
extraPromises.push(toProfileInformation(profiles).then((x) => map.push(...x)))
}
}
})
await Promise.all(extraPromises)
Expand Down

0 comments on commit 3c3b4d8

Please sign in to comment.