Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
d6a2ce6
feat: add backgroundUrl and isTrending to DiscoverData type and API m…
CassioMG Mar 31, 2026
3b805d1
feat: add recentProtocols helper for browser.storage.local
CassioMG Mar 31, 2026
5746f87
feat: add useDiscoverData hook with trending, recent, and dapps lists
CassioMG Mar 31, 2026
a8c4866
feat: add ProtocolRow component for Discover sections
CassioMG Mar 31, 2026
95ea090
feat: add ProtocolDetailsPanel component for SlideupModal content
CassioMG Mar 31, 2026
9890836
feat: add ExpandedRecent and ExpandedDapps sub-view components
CassioMG Mar 31, 2026
c180149
feat: rewrite Discover orchestrator with sub-views, modals, and data …
CassioMG Mar 31, 2026
1099777
feat: wire up Discover Sheet in Account view and update AccountHeader
CassioMG Mar 31, 2026
5a35340
test: rewrite Discover tests for new Sheet-based component structure
CassioMG Mar 31, 2026
50b3c08
refactor: remove /discover route, now handled via Sheet overlay
CassioMG Mar 31, 2026
8a17902
fix: save recent protocol before opening tab to prevent data loss in …
CassioMG Mar 31, 2026
18b7a0f
fix: Discover Sheet fills full viewport and removes white border arti…
CassioMG Mar 31, 2026
e5b314d
fix carousel margins and paddings
CassioMG Mar 31, 2026
0ecf85b
fix discover header spacing
CassioMG Mar 31, 2026
ab5f8c0
remove duplicate padding
CassioMG Mar 31, 2026
aea1ad2
update legal disclaimer
CassioMG Mar 31, 2026
6ee8491
Merge branch 'master' into feature/discover-v2
CassioMG Mar 31, 2026
cb2339d
clean-up !important values
CassioMG Mar 31, 2026
d9e7c37
fix carousel card size
CassioMG Mar 31, 2026
2509c15
tweak "Open" button
CassioMG Mar 31, 2026
7e02554
use consistent "X" icon throughout screens
CassioMG Apr 1, 2026
3bcaf62
figma tweaks
CassioMG Apr 1, 2026
b30a972
figma tweak
CassioMG Apr 1, 2026
e999c53
remove superpowers folder
CassioMG Apr 1, 2026
f59150c
globally hides the scrollbar
CassioMG Apr 1, 2026
8321cc4
add translation wrapper
CassioMG Apr 1, 2026
3cc3cfc
add comment
CassioMG Apr 1, 2026
6dc2d5d
pt translations
CassioMG Apr 1, 2026
ccd20d8
more missing pt translations
CassioMG Apr 1, 2026
6f2f8cd
remove unused keys
CassioMG Apr 1, 2026
1df31a3
safe access empty array
CassioMG Apr 1, 2026
a1f53b3
allow dismissing popover menu by tapping on the outside
CassioMG Apr 1, 2026
670d0c2
cleaner ProtocolEntry interface importing/exporting
CassioMG Apr 1, 2026
865a685
move style between files
CassioMG Apr 1, 2026
44981ce
remove unused output
CassioMG Apr 1, 2026
e7b6dae
display fallback image when carousel card image fails to load
CassioMG Apr 1, 2026
06df44a
polish "Welcome to Discover!" modal
CassioMG Apr 1, 2026
f8b7df1
add unit tests
CassioMG Apr 1, 2026
544dc77
Use SDS Text component to render text
CassioMG Apr 1, 2026
c388362
smaller button
CassioMG Apr 2, 2026
de7a612
fix white-border bug
CassioMG Apr 2, 2026
7891c21
Radix handles toggling natively via onOpenChange
CassioMG Apr 2, 2026
010c6fb
discover error state handling
CassioMG Apr 2, 2026
1fc3b41
pt translations
CassioMG Apr 2, 2026
5717f5d
add metrics
CassioMG Apr 3, 2026
8b328ac
Merge branch 'master' into feature/discover-v2
CassioMG Apr 17, 2026
45a64d3
Apply Copilot suggestions from code review
CassioMG Apr 17, 2026
40b0974
chore: add Discover storage key constants
CassioMG Apr 17, 2026
d5356da
chore: add Discover storage SERVICE_TYPES
CassioMG Apr 17, 2026
aa082a6
chore: add Discover storage message types
CassioMG Apr 17, 2026
cc755be
chore: add RecentProtocolEntry to shared types
CassioMG Apr 17, 2026
f27015f
feat(background): add getRecentProtocols handler
CassioMG Apr 17, 2026
36acd7e
feat(background): add addRecentProtocol handler
CassioMG Apr 17, 2026
303c9f4
feat(background): add clearRecentProtocols handler
CassioMG Apr 17, 2026
373ce00
feat(background): add getDiscoverWelcomeSeen handler
CassioMG Apr 17, 2026
248fc83
feat(background): add dismissDiscoverWelcome handler
CassioMG Apr 17, 2026
920a818
feat(background): register Discover storage handlers
CassioMG Apr 17, 2026
810821a
feat(api): add Discover storage wrapper functions
CassioMG Apr 17, 2026
c5229eb
refactor(api): drop unnecessary type casts from Discover wrappers
CassioMG Apr 17, 2026
c97d4ee
refactor(discover): use background messaging for welcome flag
CassioMG Apr 17, 2026
747fe38
refactor(discover): import getRecentProtocols from shared api
CassioMG Apr 17, 2026
5b54ef0
refactor(discover): import protocol helpers from shared api
CassioMG Apr 17, 2026
748da79
refactor(discover): remove popup/helpers/recentProtocols
CassioMG Apr 17, 2026
88fda70
test(discover): update mocks to use shared api spies
CassioMG Apr 17, 2026
c92e81c
Merge branch 'feature/discover-v2' of github.com:stellar/freighter in…
CassioMG Apr 17, 2026
0777936
refactor(api): add fallback to addRecentProtocol return for consistency
CassioMG Apr 17, 2026
370f46b
fix(discover): log storage write errors instead of propagating
CassioMG Apr 17, 2026
0b6a037
fix: add type="button" to ProtocolRow Open button; use sm size for We…
Copilot Apr 17, 2026
dc98cb4
Use smart quote for apostrophe in "Let's go" string (#2701)
Copilot Apr 17, 2026
109ddfc
fix: revert Welcome modal button back to size=md
Copilot Apr 17, 2026
538a1d5
Guard Domain section when URL parsing fails and getHostname returns null
CassioMG Apr 17, 2026
e0acc9b
refactor(discover): use shared request reducer in useDiscoverData
CassioMG Apr 17, 2026
bea1211
refactor(discover): extract shared DiscoverDisclaimer component
CassioMG Apr 17, 2026
e78c373
Remove unused translation
CassioMG Apr 17, 2026
b5f03c2
fix(discover): reject non-https protocol URLs before openTab
CassioMG Apr 17, 2026
1d5bfe2
test(discover): add unit tests for the five Discover background handlers
CassioMG Apr 17, 2026
f9b97bd
a11y(discover): make clickable rows/cards/headers keyboard-activatable
CassioMG Apr 17, 2026
14029de
perf(discover): memoize derived lists in useDiscoverData
CassioMG Apr 17, 2026
365d6ba
refactor(discover): replace filter(Boolean) cast with a type predicate
CassioMG Apr 17, 2026
d7c15bf
style(discover): use --color-shadow-rgb token instead of hardcoded rgba
CassioMG Apr 17, 2026
dacb832
test(discover): add isolated hook tests for useDiscoverData and useDi…
CassioMG Apr 17, 2026
f882caf
a11y(discover): keep role="button" only, drop tabIndex and key handlers
CassioMG Apr 18, 2026
051645a
fix: add type="button" to ProtocolDetailsPanel open button
Copilot Apr 18, 2026
76ac3c7
fix: add type="button" to ExpandedRecent settings button
CassioMG Apr 18, 2026
5872141
fix(discover): await openTab so failures are captured, not silently d…
CassioMG Apr 20, 2026
748b481
fix(discover): guard welcome check and details-metric against failures
CassioMG Apr 20, 2026
c1339a2
Add initial e2e happy path for Discover V2
CassioMG Apr 20, 2026
a1d207e
enable e2e integration mode for discover happy path
CassioMG Apr 20, 2026
a459d26
Add more discover e2e tests
CassioMG Apr 20, 2026
af5f22a
add snapshot test for stable error state UI
CassioMG Apr 20, 2026
783a7d1
Put back missing translations
CassioMG Apr 20, 2026
339e82b
Keeps the modal hidden when the flag lookup rejects
CassioMG Apr 20, 2026
ec06a37
Add more missing translations
CassioMG Apr 20, 2026
a606d2d
refactor(discover): extract SlideupModal transition duration as constant
CassioMG Apr 21, 2026
bd971ef
refactor(discover): drop redundant read-back in dismissDiscoverWelcome
CassioMG Apr 21, 2026
9dc0771
feat(discover): surface user-facing toasts on openTab and clearRecent…
CassioMG Apr 21, 2026
1ac8c7e
fix(sheet): wire onOpenChange on Discover and AssetDetail sheets
CassioMG Apr 21, 2026
bf861ad
test(discover): cover error toasts for openTab and clearRecents failures
CassioMG Apr 21, 2026
73ab959
test(e2e): cover Escape-key dismiss on the Discover sheet
CassioMG Apr 21, 2026
b91331e
Merge branch 'master' into feature/discover-v2
CassioMG Apr 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 77 additions & 1 deletion @shared/api/internal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ import {
HorizonOperation,
UserNotification,
CollectibleContract,
DiscoverData,
RecentProtocolEntry,
} from "./types";
import {
AccountBalancesInterface,
Expand Down Expand Up @@ -621,7 +623,7 @@ export const getTokenPrices = async (tokens: string[]) => {
return parsedResponse.data;
};

export const getDiscoverData = async () => {
export const getDiscoverData = async (): Promise<DiscoverData> => {
const url = new URL(`${INDEXER_V2_URL}/protocols`);
const response = await fetch(url.href);
const parsedResponse = (await response.json()) as {
Expand All @@ -633,6 +635,8 @@ export const getDiscoverData = async () => {
website_url: string;
tags: string[];
is_blacklisted: boolean;
background_url?: string;
is_trending: boolean;
}[];
};
};
Expand All @@ -652,6 +656,8 @@ export const getDiscoverData = async () => {
websiteUrl: entry.website_url,
tags: entry.tags,
isBlacklisted: entry.is_blacklisted,
backgroundUrl: entry.background_url,
isTrending: entry.is_trending,
}));
};

Expand Down Expand Up @@ -2423,3 +2429,73 @@ export const rejectSigningRequest = async ({
console.error(e);
}
};

export const getRecentProtocols = async (): Promise<RecentProtocolEntry[]> => {
const { recentProtocols, error } = await sendMessageToBackground({
activePublicKey: null,
type: SERVICE_TYPES.GET_RECENT_PROTOCOLS,
});

if (error) {
return [];
}

return recentProtocols || [];
};

export const addRecentProtocol = async (
websiteUrl: string,
): Promise<RecentProtocolEntry[]> => {
const { recentProtocols, error } = await sendMessageToBackground({
activePublicKey: null,
websiteUrl,
type: SERVICE_TYPES.ADD_RECENT_PROTOCOL,
});

if (error) {
throw new Error(error);
}

return recentProtocols || [];
};

export const clearRecentProtocols = async (): Promise<
RecentProtocolEntry[]
> => {
const { recentProtocols, error } = await sendMessageToBackground({
activePublicKey: null,
type: SERVICE_TYPES.CLEAR_RECENT_PROTOCOLS,
});

if (error) {
throw new Error(error);
}

return recentProtocols || [];
};

export const getHasSeenDiscoverWelcome = async (): Promise<boolean> => {
const { hasSeenDiscoverWelcome, error } = await sendMessageToBackground({
activePublicKey: null,
type: SERVICE_TYPES.GET_DISCOVER_WELCOME_SEEN,
});

if (error) {
throw new Error(error);
}

return !!hasSeenDiscoverWelcome;
};

export const dismissDiscoverWelcome = async (): Promise<boolean> => {
const { hasSeenDiscoverWelcome, error } = await sendMessageToBackground({
activePublicKey: null,
type: SERVICE_TYPES.DISMISS_DISCOVER_WELCOME,
});

if (error) {
throw new Error(error);
}

return !!hasSeenDiscoverWelcome;
};
26 changes: 26 additions & 0 deletions @shared/api/types/message-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,27 @@ export interface DismissMobileAppBannerMessage extends BaseMessage {
type: SERVICE_TYPES.DISMISS_MOBILE_APP_BANNER;
}

export interface GetRecentProtocolsMessage extends BaseMessage {
type: SERVICE_TYPES.GET_RECENT_PROTOCOLS;
}

export interface AddRecentProtocolMessage extends BaseMessage {
type: SERVICE_TYPES.ADD_RECENT_PROTOCOL;
websiteUrl: string;
}

export interface ClearRecentProtocolsMessage extends BaseMessage {
type: SERVICE_TYPES.CLEAR_RECENT_PROTOCOLS;
}

export interface GetDiscoverWelcomeSeenMessage extends BaseMessage {
type: SERVICE_TYPES.GET_DISCOVER_WELCOME_SEEN;
}

export interface DismissDiscoverWelcomeMessage extends BaseMessage {
type: SERVICE_TYPES.DISMISS_DISCOVER_WELCOME;
}

export interface GetBlockaidDebugOverrideMessage extends BaseMessage {
type: SERVICE_TYPES.GET_BLOCKAID_DEBUG_OVERRIDE;
}
Expand Down Expand Up @@ -514,6 +535,11 @@ export type ServiceMessageRequest =
| GetHiddenAssetsMessage
| GetMobileAppBannerDismissedMessage
| DismissMobileAppBannerMessage
| GetRecentProtocolsMessage
| AddRecentProtocolMessage
| ClearRecentProtocolsMessage
| GetDiscoverWelcomeSeenMessage
| DismissDiscoverWelcomeMessage
| GetBlockaidDebugOverrideMessage
| AddCollectibleMessage
| GetCollectiblesMessage
Expand Down
15 changes: 13 additions & 2 deletions @shared/api/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ export interface Response {
isDismissed: boolean;
collectiblesList: CollectibleContract[];
overriddenBlockaidResponse: string | null;
recentProtocols: RecentProtocolEntry[];
hasSeenDiscoverWelcome: boolean;
}

export interface MemoRequiredAccount {
Expand Down Expand Up @@ -398,14 +400,23 @@ export interface ApiTokenPrices {
[key: string]: ApiTokenPrice | null;
}

export type DiscoverData = {
export interface ProtocolEntry {
description: string;
iconUrl: string;
name: string;
websiteUrl: string;
tags: string[];
isBlacklisted: boolean;
}[];
backgroundUrl?: string;
isTrending: boolean;
}

export interface RecentProtocolEntry {
websiteUrl: string;
lastAccessed: number;
}

export type DiscoverData = ProtocolEntry[];

export interface LedgerKeyAccount {
account_id: string;
Expand Down
5 changes: 5 additions & 0 deletions @shared/constants/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ export enum SERVICE_TYPES {
MARK_QUEUE_ACTIVE = "MARK_QUEUE_ACTIVE",
OPEN_SIDEBAR = "OPEN_SIDEBAR",
REJECT_SIGNING_REQUEST = "REJECT_SIGNING_REQUEST",
GET_RECENT_PROTOCOLS = "GET_RECENT_PROTOCOLS",
ADD_RECENT_PROTOCOL = "ADD_RECENT_PROTOCOL",
CLEAR_RECENT_PROTOCOLS = "CLEAR_RECENT_PROTOCOLS",
GET_DISCOVER_WELCOME_SEEN = "GET_DISCOVER_WELCOME_SEEN",
DISMISS_DISCOVER_WELCOME = "DISMISS_DISCOVER_WELCOME",
}

// SIDEBAR_NAVIGATE is a plain string constant (not in an enum) because it is
Expand Down
5 changes: 2 additions & 3 deletions extension/e2e-tests/accountHistory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ test("View failed transaction", async ({ page, extensionId, context }) => {
{
amount: "0.0010000",
asset_code: "USDC",
asset_issuer:
"GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
asset_issuer: "GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5",
asset_type: "credit_alphanum4",
created_at: "2025-03-21T22:28:46Z",
from: "GDF32CQINROD3E2LMCGZUDVMWTXCJFR5SBYVRJ7WAAIAS3P7DCVWZEFY",
Expand Down Expand Up @@ -61,7 +60,7 @@ test("View failed transaction", async ({ page, extensionId, context }) => {
? input
: input instanceof URL
? input.href
: input.url ?? "";
: (input.url ?? "");
if (urlStr.includes("/account-history/")) {
return Promise.resolve(
new Response(JSON.stringify(data), {
Expand Down
Loading
Loading