Skip to content

Remove polymarket feature - #65

Open
sunela-tr wants to merge 1 commit into
mainfrom
remove-polymarket
Open

Remove polymarket feature#65
sunela-tr wants to merge 1 commit into
mainfrom
remove-polymarket

Conversation

@sunela-tr

@sunela-tr sunela-tr commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Description

Polymarket's SDK has changed and needs a migration to work again. This PR removes the feature until migration has been made.

User's with money stuck in polymarket, can retrieve them via WalletConnect.

@sunela-tr
sunela-tr requested review from L03TJ3 and a lite review from Copilot August 24, 2026 11:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the Polymarket-based “Predictions” feature from GoodWallet V2 (UI entry points, translations, analytics events, API routes, and supporting hooks/utils) because the Polymarket SDK has changed and would require a migration to restore functionality.

Changes:

  • Remove “Predictions” from navigation/dashboard actions, tabs, icons, translations, and analytics event types.
  • Delete the Predictions feature implementation (React UI, providers, hooks, utils, constants) and related Next.js API routes.
  • Remove Polymarket-related dependencies/resolutions and update the lockfile accordingly.

Reviewed changes

Copilot reviewed 100 out of 102 changed files in this pull request and generated no comments.

Show a summary per file
File Description
yarn.lock Removes Polymarket/ethers-v5-related transitive packages and related entries.
src/widgets/registry.ts Removes predictions from reserved routes and core dashboard actions.
src/widgets/registry.test.ts Updates core dashboard actions ordering test after removing predictions.
src/ui/assets/index.ts Removes the Predictions illustration export from assets registry.
src/ui/assets/illustrations/predictions.svg Deletes Predictions illustration asset.
src/translations/types.ts Removes predictions translation types (and related fields).
src/translations/translations/en.ts Removes predictions translations and related strings.
src/translations/translations/da.ts Removes predictions translations and related strings.
src/sections/Predictions/WelcomeFlow/index.tsx Deletes Predictions welcome flow entry component.
src/sections/Predictions/WelcomeFlow/components/CreateSafeModal.tsx Deletes Safe deployment modal for Predictions onboarding.
src/sections/Predictions/WelcomeFlow/components/CreateAccountModal.tsx Deletes account/auth/approval onboarding modal for Predictions.
src/sections/Predictions/WelcomeFlow/components/BlockedModal.tsx Deletes geoblock modal for Polymarket.
src/sections/Predictions/WelcomeFlow/components/AuthenticateWithPolymarket.tsx Deletes Polymarket authentication modal.
src/sections/Predictions/WelcomeFlow/components/AllowTokens.tsx Deletes token approval modal for Polymarket.
src/sections/Predictions/utils/validation.ts Deletes Predictions validation helpers.
src/sections/Predictions/utils/transfer.ts Deletes USDC.e transfer tx builder for Polymarket Safe.
src/sections/Predictions/utils/session.ts Deletes localStorage-backed trading session helpers.
src/sections/Predictions/utils/redeem.ts Deletes redeem transaction builder for positions.
src/sections/Predictions/utils/polling.ts Deletes polling interval helper used by Predictions.
src/sections/Predictions/utils/order.ts Deletes order math helpers used by Predictions UI.
src/sections/Predictions/utils/classNames.ts Deletes local cn helper used by Predictions components.
src/sections/Predictions/utils/approvals.ts Deletes token approval checks/tx builders.
src/sections/Predictions/Trading/Positions/PositionFilters.tsx Deletes positions filters UI.
src/sections/Predictions/Trading/Positions/PositionCard.tsx Deletes positions card UI.
src/sections/Predictions/Trading/Positions/index.tsx Deletes positions page logic (sell/redeem/polling).
src/sections/Predictions/Trading/Orders/OrderCard.tsx Deletes open orders card UI.
src/sections/Predictions/Trading/Orders/index.tsx Deletes open orders list UI and cancellation flow.
src/sections/Predictions/Trading/OrderModal/OrderTypeToggle.tsx Deletes order type toggle UI.
src/sections/Predictions/Trading/OrderModal/OrderSummary.tsx Deletes order summary component.
src/sections/Predictions/Trading/OrderModal/OrderForm.tsx Deletes order input form component.
src/sections/Predictions/Trading/OrderModal/index.tsx Deletes order placement modal and associated validation/analytics.
src/sections/Predictions/Trading/MarketTabs.tsx Deletes Predictions tabs container.
src/sections/Predictions/Trading/Events/SearchBar.tsx Deletes markets search bar UI.
src/sections/Predictions/Trading/Events/OutcomeButton.tsx Deletes outcome button UI.
src/sections/Predictions/Trading/Events/MarketRow.tsx Deletes market row UI.
src/sections/Predictions/Trading/Events/MarketRow.module.css Deletes styles for market row label.
src/sections/Predictions/Trading/Events/MarketGraph.tsx Deletes price chart (lightweight-charts) rendering.
src/sections/Predictions/Trading/Events/MarketDrawer.tsx Deletes market details drawer UI.
src/sections/Predictions/Trading/Events/MarketDrawer.module.css Deletes drawer styles.
src/sections/Predictions/Trading/Events/index.tsx Deletes markets listing view and drawer/modal wiring.
src/sections/Predictions/Trading/Events/Events.module.css Deletes event tabs container styles.
src/sections/Predictions/Trading/Events/EventCard.tsx Deletes event card UI and realtime prices fetch.
src/sections/Predictions/Trading/Events/CategoryTabs.tsx Deletes category tab UI for markets.
src/sections/Predictions/providers/WalletProvider.tsx Deletes Predictions-specific wallet provider wrapper.
src/sections/Predictions/providers/WalletContext.tsx Deletes Predictions wallet context types/hook.
src/sections/Predictions/providers/TradingProvider.tsx Deletes Predictions trading provider/context.
src/sections/Predictions/providers/index.tsx Deletes combined Predictions providers entrypoint.
src/sections/Predictions/Portal.tsx Deletes Predictions portal helper.
src/sections/Predictions/PolygonAssets/TransferModal.tsx Deletes withdraw modal for Polymarket Safe funds.
src/sections/Predictions/PolygonAssets/index.tsx Deletes Polygon assets panel for Predictions.
src/sections/Predictions/index.tsx Deletes Predictions main view (bottomsheet content).
src/sections/Predictions/hooks/useUserPositions.ts Deletes positions fetching hook.
src/sections/Predictions/hooks/useUserApiCredentials.ts Deletes API key creation/derivation hook.
src/sections/Predictions/hooks/useUsdcTransfer.ts Deletes USDC.e transfer hook.
src/sections/Predictions/hooks/useTradingSession.ts Deletes trading-session orchestration hook.
src/sections/Predictions/hooks/useTokenApprovals.ts Deletes token approvals hook.
src/sections/Predictions/hooks/useTickSize.ts Deletes tick size lookup hook.
src/sections/Predictions/hooks/useSearchEvents.ts Deletes events search hook.
src/sections/Predictions/hooks/useSafeDeployment.ts Deletes Safe derivation/deployment hook.
src/sections/Predictions/hooks/useRelayClient.ts Deletes relayer client initialization hook.
src/sections/Predictions/hooks/useRedeemPosition.ts Deletes redeem hook.
src/sections/Predictions/hooks/usePriceHistory.ts Deletes price history hook.
src/sections/Predictions/hooks/usePolygonBalances.ts Deletes Polygon USDC.e balances hook.
src/sections/Predictions/hooks/useMarkets.ts Deletes markets/events fetch hook.
src/sections/Predictions/hooks/useGeoblock.ts Deletes geoblock check hook.
src/sections/Predictions/hooks/useClobOrder.ts Deletes Polymarket order submit/cancel hook.
src/sections/Predictions/hooks/useClobOrder.test.ts Deletes tests for Polymarket order hook.
src/sections/Predictions/hooks/useClobClient.ts Deletes authenticated CLOB client factory hook.
src/sections/Predictions/hooks/useAddressCopy.ts Deletes helper hook used by Predictions UI.
src/sections/Predictions/hooks/useActiveOrders.ts Deletes open orders fetching hook.
src/sections/Predictions/constants/validation.ts Deletes validation constants for Predictions.
src/sections/Predictions/constants/ui.ts Deletes UI constants for Predictions components.
src/sections/Predictions/constants/tokens.ts Deletes token/contract constants for Polymarket integration.
src/sections/Predictions/constants/query.ts Deletes SWR/polling constants for Predictions.
src/sections/Predictions/constants/polymarket.ts Deletes Polymarket constants re-export module.
src/sections/Predictions/constants/categories.ts Deletes market categories definitions.
src/sections/Predictions/constants/api.ts Deletes Polymarket API URLs/geoblock config.
src/sections/Predictions/components/StatDisplay.tsx Deletes generic stat display component used in Predictions UI.
src/sections/Predictions/components/LoadingState.tsx Deletes loading state component for Predictions.
src/sections/Predictions/components/InfoTooltip.tsx Deletes tooltip component used in Predictions UI.
src/sections/Predictions/components/index.ts Deletes barrel export for Predictions components.
src/sections/Predictions/components/Footer.tsx Deletes Polymarket ToS footer.
src/sections/Predictions/components/ErrorState.tsx Deletes error state component for Predictions.
src/sections/Predictions/components/EmptyState.tsx Deletes empty state component for Predictions.
src/sections/Predictions/components/Components.module.css Deletes styles used by Predictions components.
src/sections/Predictions/components/CloseDialogButton.tsx Deletes close button wrapper component.
src/sections/Predictions/components/Card.tsx Deletes Predictions-specific card component.
src/sections/Predictions/components/Badge.tsx Deletes badge component used in orders UI.
src/sections/Home/components/WalletSection.tsx Removes predictions action from home dashboard actions mapping.
src/components/Snippet/Tabs/Tabs.tsx Removes Predictions tab page support and related analytics mappings.
src/app/api/polymarket/sign/route.ts Deletes builder-signing API route used by Polymarket SDK.
src/app/api/polymarket/positions/route.ts Deletes positions proxy API route to Polymarket data API.
src/app/api/polymarket/markets/clobTokenIds/[clobTokenId]/route.ts Deletes market lookup proxy route by token id.
src/app/api/polymarket/events/tags/[tagId]/validMarkets.ts Deletes server-side market validation/filtering utilities.
src/app/api/polymarket/events/tags/[tagId]/route.ts Deletes events-by-tag proxy route.
src/app/api/polymarket/events/tags/[tagId]/constants.ts Deletes Polymarket API constants used by events routes.
src/app/api/polymarket/events/search/[query]/route.ts Deletes events search proxy route.
src/app/[locale]/@home/(home)/(bottomsheet)/predictions/page.tsx Deletes the Predictions bottomsheet page route.
src/analytics/types.ts Removes Polymarket/Predictions analytics event types and event payload variants.
README.md Updates product overview to remove Polymarket/Predictions references.
package.json Removes Polymarket dependencies and lightweight-charts; drops polymarket resolution.
configServerless.ts Removes Polymarket builder credential config exports.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants