File tree Expand file tree Collapse file tree
lib/app/features/tokenized_communities/providers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -79,11 +79,21 @@ AsyncValue<CommunityToken?> tokenMarketInfoIfAvailable(
7979 );
8080 final hasToken = hasTokenAsync.valueOrNull ?? false ;
8181
82- if (! hasToken) {
82+ // Always try to fetch token info from the analytics service
83+ // even if first-buy definition is not cached yet
84+ final tokenInfo = ref.watch (tokenMarketInfoProvider (eventReference.toString ()));
85+
86+ // If we have token data from analytics, return it (even if hasToken is false due to cache miss)
87+ if (tokenInfo.hasValue && tokenInfo.value != null ) {
88+ return tokenInfo;
89+ }
90+
91+ // Only return null if hasToken is definitely false AND we have no token data
92+ if (! hasToken && (! tokenInfo.hasValue || tokenInfo.value == null )) {
8393 return const AsyncData (null );
8494 }
8595
86- return ref. watch ( tokenMarketInfoProvider (eventReference. toString ())) ;
96+ return tokenInfo ;
8797}
8898
8999@riverpod
You can’t perform that action at this time.
0 commit comments