Skip to content

Commit

Permalink
Fix logic for triggering nft tabs spans endTrace calls
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Nov 5, 2024
1 parent 0d5b194 commit 05131aa
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions ui/components/app/assets/nfts/nfts-tab/nfts-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,12 @@ export default function NftsTab() {

useEffect(() => {
if (showNftBanner) {
if (nftsLoading) {
endTrace({ name: TraceName.AccountOverviewNftsTabFMP });
} else {
endTrace({ name: TraceName.AccountOverviewNftsTab });
}
endTrace({ name: TraceName.AccountOverviewNftsTabFMP });
endTrace({ name: TraceName.AccountOverviewNftsTab });
} else {
// Preferring nested if-else over 'else if' for readability
// eslint-disable-next-line no-lonely-if
if (nftsStillFetchingIndication) {
if (nftsLoading || nftsStillFetchingIndication) {
endTrace({ name: TraceName.AccountOverviewNftsTabFMP });
} else {
endTrace({ name: TraceName.AccountOverviewNftsTab });
Expand Down

0 comments on commit 05131aa

Please sign in to comment.