Skip to content

Commit

Permalink
feat: implement one-click swaps in SwapProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
meeh0w committed Jan 14, 2025
1 parent 7ff2f2d commit ac7b88d
Show file tree
Hide file tree
Showing 5 changed files with 314 additions and 78 deletions.
3 changes: 3 additions & 0 deletions src/background/services/featureFlags/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export enum FeatureGates {
BLOCKAID_TRANSACTION_SCAN = 'blockaid-transaction-scan',
BLOCKAID_JSONRPC_SCAN = 'blockaid-jsonrpc-scan',
HALLIDAY_BRIDGE_BANNER = 'halliday-bridge-banner',
ONE_CLICK_SWAP = 'one-click-swap',
}

// Posthog API does not return disabled flags on their `/decide` api endpoint
Expand Down Expand Up @@ -96,6 +97,7 @@ export const DISABLED_FLAG_VALUES: FeatureFlags = {
[FeatureGates.BLOCKAID_TRANSACTION_SCAN]: false,
[FeatureGates.BLOCKAID_JSONRPC_SCAN]: false,
[FeatureGates.HALLIDAY_BRIDGE_BANNER]: false,
[FeatureGates.ONE_CLICK_SWAP]: false,
};

// Default flags are used when posthog is not available
Expand Down Expand Up @@ -146,6 +148,7 @@ export const DEFAULT_FLAGS: FeatureFlags = {
[FeatureGates.BLOCKAID_TRANSACTION_SCAN]: true,
[FeatureGates.BLOCKAID_JSONRPC_SCAN]: true,
[FeatureGates.HALLIDAY_BRIDGE_BANNER]: true,
[FeatureGates.ONE_CLICK_SWAP]: true,
};

export enum FeatureFlagEvents {
Expand Down
Loading

0 comments on commit ac7b88d

Please sign in to comment.