be-components 7.4.8 → 7.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ApiOverrides/index.js +4 -0
- package/lib/commonjs/ApiOverrides/index.js.map +1 -1
- package/lib/commonjs/BetRouter/api/index.js +884 -0
- package/lib/commonjs/BetRouter/api/index.js.map +1 -0
- package/lib/commonjs/BetRouter/api/types.js +2 -0
- package/lib/commonjs/BetRouter/api/types.js.map +1 -0
- package/lib/commonjs/BetRouter/components/AccountManager.js +592 -0
- package/lib/commonjs/BetRouter/components/AccountManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/AdminPortal.js +51 -0
- package/lib/commonjs/BetRouter/components/AdminPortal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunities.js +550 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js +320 -0
- package/lib/commonjs/BetRouter/components/BuyOpportunityCard.js.map +1 -0
- package/lib/commonjs/BetRouter/components/ContestLiquidity.js +666 -0
- package/lib/commonjs/BetRouter/components/ContestLiquidity.js.map +1 -0
- package/lib/commonjs/BetRouter/components/ContestSelector.js +193 -0
- package/lib/commonjs/BetRouter/components/ContestSelector.js.map +1 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.js +332 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js +545 -0
- package/lib/commonjs/BetRouter/components/OpportunityDetailModal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js +489 -0
- package/lib/commonjs/BetRouter/components/OpportunityHistory.js.map +1 -0
- package/lib/commonjs/BetRouter/components/PartnerCredentials.js +229 -0
- package/lib/commonjs/BetRouter/components/PartnerCredentials.js.map +1 -0
- package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js +262 -0
- package/lib/commonjs/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/AutoFillView.js +380 -0
- package/lib/commonjs/BetRouter/components/admin/AutoFillView.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/ConfigManager.js +814 -0
- package/lib/commonjs/BetRouter/components/admin/ConfigManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/JobManager.js +895 -0
- package/lib/commonjs/BetRouter/components/admin/JobManager.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueContests.js +2844 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueContests.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js +378 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueInfo.js.map +1 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js +795 -0
- package/lib/commonjs/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
- package/lib/commonjs/BetRouter/index.js +411 -0
- package/lib/commonjs/BetRouter/index.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js +312 -0
- package/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/DesktopLayout.js +271 -0
- package/lib/commonjs/BetRouter/layouts/DesktopLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js +435 -0
- package/lib/commonjs/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/layouts/MobileLayout.js +293 -0
- package/lib/commonjs/BetRouter/layouts/MobileLayout.js.map +1 -0
- package/lib/commonjs/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/lib/commonjs/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/lib/commonjs/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/lib/commonjs/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/lib/commonjs/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/lib/commonjs/BetRouter/types/README.md +249 -0
- package/lib/commonjs/BetRouter/types/accounts.js +2 -0
- package/lib/commonjs/BetRouter/types/accounts.js.map +1 -0
- package/lib/commonjs/BetRouter/types/api-contracts.js +776 -0
- package/lib/commonjs/BetRouter/types/api-contracts.js.map +1 -0
- package/lib/commonjs/BetRouter/types/config.js +2 -0
- package/lib/commonjs/BetRouter/types/config.js.map +1 -0
- package/lib/commonjs/BetRouter/types/contests.js +2 -0
- package/lib/commonjs/BetRouter/types/contests.js.map +1 -0
- package/lib/commonjs/BetRouter/types/credentials.js +90 -0
- package/lib/commonjs/BetRouter/types/credentials.js.map +1 -0
- package/lib/commonjs/BetRouter/types/index.js +149 -0
- package/lib/commonjs/BetRouter/types/index.js.map +1 -0
- package/lib/commonjs/BetRouter/types/jobs.js +2 -0
- package/lib/commonjs/BetRouter/types/jobs.js.map +1 -0
- package/lib/commonjs/BetRouter/types/leagues.js +2 -0
- package/lib/commonjs/BetRouter/types/leagues.js.map +1 -0
- package/lib/commonjs/BetRouter/types/liquidity.js +2 -0
- package/lib/commonjs/BetRouter/types/liquidity.js.map +1 -0
- package/lib/commonjs/BetRouter/types/markets.js +2 -0
- package/lib/commonjs/BetRouter/types/markets.js.map +1 -0
- package/lib/commonjs/BetRouter/types/opportunities.js +6 -0
- package/lib/commonjs/BetRouter/types/opportunities.js.map +1 -0
- package/lib/commonjs/BetRouter/types/orders.js +2 -0
- package/lib/commonjs/BetRouter/types/orders.js.map +1 -0
- package/lib/commonjs/BetRouter/types/participants.js +2 -0
- package/lib/commonjs/BetRouter/types/participants.js.map +1 -0
- package/lib/commonjs/BetRouter/types/partners.js +2 -0
- package/lib/commonjs/BetRouter/types/partners.js.map +1 -0
- package/lib/commonjs/Charts/README.md +310 -0
- package/lib/commonjs/Charts/adapters/TradeChartAdapter.js +406 -0
- package/lib/commonjs/Charts/adapters/TradeChartAdapter.js.map +1 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js +285 -0
- package/lib/commonjs/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js +504 -0
- package/lib/commonjs/Charts/components/LivePriceChart.js.map +1 -0
- package/lib/commonjs/Charts/index.js +126 -0
- package/lib/commonjs/Charts/index.js.map +1 -0
- package/lib/commonjs/Charts/themes/chartTheme.js +141 -0
- package/lib/commonjs/Charts/themes/chartTheme.js.map +1 -0
- package/lib/commonjs/Charts/types.js +2 -0
- package/lib/commonjs/Charts/types.js.map +1 -0
- package/lib/commonjs/Charts/utils/formatters.js +194 -0
- package/lib/commonjs/Charts/utils/formatters.js.map +1 -0
- package/lib/commonjs/Components/Dropdown.js +5 -3
- package/lib/commonjs/Components/Dropdown.js.map +1 -1
- package/lib/commonjs/Components/Icons.js +24 -0
- package/lib/commonjs/Components/Icons.js.map +1 -1
- package/lib/commonjs/Components/index.js +34 -0
- package/lib/commonjs/Components/index.js.map +1 -1
- package/lib/commonjs/index.js +28 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/types.d.js +16 -0
- package/lib/commonjs/types.d.js.map +1 -1
- package/lib/module/ApiOverrides/index.js +4 -0
- package/lib/module/ApiOverrides/index.js.map +1 -1
- package/lib/module/BetRouter/api/index.js +873 -0
- package/lib/module/BetRouter/api/index.js.map +1 -0
- package/lib/module/BetRouter/api/types.js +2 -0
- package/lib/module/BetRouter/api/types.js.map +1 -0
- package/lib/module/BetRouter/components/AccountManager.js +584 -0
- package/lib/module/BetRouter/components/AccountManager.js.map +1 -0
- package/lib/module/BetRouter/components/AdminPortal.js +43 -0
- package/lib/module/BetRouter/components/AdminPortal.js.map +1 -0
- package/lib/module/BetRouter/components/BuyOpportunities.js +542 -0
- package/lib/module/BetRouter/components/BuyOpportunities.js.map +1 -0
- package/lib/module/BetRouter/components/BuyOpportunityCard.js +313 -0
- package/lib/module/BetRouter/components/BuyOpportunityCard.js.map +1 -0
- package/lib/module/BetRouter/components/ContestLiquidity.js +658 -0
- package/lib/module/BetRouter/components/ContestLiquidity.js.map +1 -0
- package/lib/module/BetRouter/components/ContestSelector.js +185 -0
- package/lib/module/BetRouter/components/ContestSelector.js.map +1 -0
- package/lib/module/BetRouter/components/MyOpportunities.js +324 -0
- package/lib/module/BetRouter/components/MyOpportunities.js.map +1 -0
- package/lib/module/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/lib/module/BetRouter/components/OpportunityDetailModal.js +538 -0
- package/lib/module/BetRouter/components/OpportunityDetailModal.js.map +1 -0
- package/lib/module/BetRouter/components/OpportunityHistory.js +481 -0
- package/lib/module/BetRouter/components/OpportunityHistory.js.map +1 -0
- package/lib/module/BetRouter/components/PartnerCredentials.js +222 -0
- package/lib/module/BetRouter/components/PartnerCredentials.js.map +1 -0
- package/lib/module/BetRouter/components/PlacedOpportunityModal.js +255 -0
- package/lib/module/BetRouter/components/PlacedOpportunityModal.js.map +1 -0
- package/lib/module/BetRouter/components/admin/AutoFillView.js +372 -0
- package/lib/module/BetRouter/components/admin/AutoFillView.js.map +1 -0
- package/lib/module/BetRouter/components/admin/ConfigManager.js +806 -0
- package/lib/module/BetRouter/components/admin/ConfigManager.js.map +1 -0
- package/lib/module/BetRouter/components/admin/JobManager.js +888 -0
- package/lib/module/BetRouter/components/admin/JobManager.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueContests.js +2836 -0
- package/lib/module/BetRouter/components/admin/LeagueContests.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueInfo.js +372 -0
- package/lib/module/BetRouter/components/admin/LeagueInfo.js.map +1 -0
- package/lib/module/BetRouter/components/admin/LeagueParticipants.js +787 -0
- package/lib/module/BetRouter/components/admin/LeagueParticipants.js.map +1 -0
- package/lib/module/BetRouter/index.js +399 -0
- package/lib/module/BetRouter/index.js.map +1 -0
- package/lib/module/BetRouter/layouts/DesktopAdminLayout.js +304 -0
- package/lib/module/BetRouter/layouts/DesktopAdminLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/DesktopLayout.js +263 -0
- package/lib/module/BetRouter/layouts/DesktopLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/MobileAdminLayout.js +427 -0
- package/lib/module/BetRouter/layouts/MobileAdminLayout.js.map +1 -0
- package/lib/module/BetRouter/layouts/MobileLayout.js +285 -0
- package/lib/module/BetRouter/layouts/MobileLayout.js.map +1 -0
- package/lib/module/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/lib/module/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/lib/module/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/lib/module/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/lib/module/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/lib/module/BetRouter/types/README.md +249 -0
- package/lib/module/BetRouter/types/accounts.js +2 -0
- package/lib/module/BetRouter/types/accounts.js.map +1 -0
- package/lib/module/BetRouter/types/api-contracts.js +770 -0
- package/lib/module/BetRouter/types/api-contracts.js.map +1 -0
- package/lib/module/BetRouter/types/config.js +2 -0
- package/lib/module/BetRouter/types/config.js.map +1 -0
- package/lib/module/BetRouter/types/contests.js +2 -0
- package/lib/module/BetRouter/types/contests.js.map +1 -0
- package/lib/module/BetRouter/types/credentials.js +78 -0
- package/lib/module/BetRouter/types/credentials.js.map +1 -0
- package/lib/module/BetRouter/types/index.js +17 -0
- package/lib/module/BetRouter/types/index.js.map +1 -0
- package/lib/module/BetRouter/types/jobs.js +2 -0
- package/lib/module/BetRouter/types/jobs.js.map +1 -0
- package/lib/module/BetRouter/types/leagues.js +2 -0
- package/lib/module/BetRouter/types/leagues.js.map +1 -0
- package/lib/module/BetRouter/types/liquidity.js +2 -0
- package/lib/module/BetRouter/types/liquidity.js.map +1 -0
- package/lib/module/BetRouter/types/markets.js +2 -0
- package/lib/module/BetRouter/types/markets.js.map +1 -0
- package/lib/module/BetRouter/types/opportunities.js +2 -0
- package/lib/module/BetRouter/types/opportunities.js.map +1 -0
- package/lib/module/BetRouter/types/orders.js +2 -0
- package/lib/module/BetRouter/types/orders.js.map +1 -0
- package/lib/module/BetRouter/types/participants.js +2 -0
- package/lib/module/BetRouter/types/participants.js.map +1 -0
- package/lib/module/BetRouter/types/partners.js +2 -0
- package/lib/module/BetRouter/types/partners.js.map +1 -0
- package/lib/module/Charts/README.md +310 -0
- package/lib/module/Charts/adapters/TradeChartAdapter.js +400 -0
- package/lib/module/Charts/adapters/TradeChartAdapter.js.map +1 -0
- package/lib/module/Charts/components/BaseLineChart.js +281 -0
- package/lib/module/Charts/components/BaseLineChart.js.map +1 -0
- package/lib/module/Charts/components/LivePriceChart.js +497 -0
- package/lib/module/Charts/components/LivePriceChart.js.map +1 -0
- package/lib/module/Charts/index.js +36 -0
- package/lib/module/Charts/index.js.map +1 -0
- package/lib/module/Charts/themes/chartTheme.js +134 -0
- package/lib/module/Charts/themes/chartTheme.js.map +1 -0
- package/lib/module/Charts/types.js +2 -0
- package/lib/module/Charts/types.js.map +1 -0
- package/lib/module/Charts/utils/formatters.js +178 -0
- package/lib/module/Charts/utils/formatters.js.map +1 -0
- package/lib/module/Components/Dropdown.js +5 -3
- package/lib/module/Components/Dropdown.js.map +1 -1
- package/lib/module/Components/Icons.js +24 -1
- package/lib/module/Components/Icons.js.map +1 -1
- package/lib/module/Components/index.js +3 -0
- package/lib/module/Components/index.js.map +1 -1
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/types.d.js +16 -0
- package/lib/module/types.d.js.map +1 -1
- package/lib/typescript/lib/commonjs/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts +109 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts +16 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts +16 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts +8 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts +14 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts +10 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts +11 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts +7 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts +6 -0
- package/lib/typescript/lib/commonjs/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/index.d.ts +8 -0
- package/lib/typescript/lib/commonjs/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts +20 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts +20 -0
- package/lib/typescript/lib/commonjs/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts +743 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts +56 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts +2 -0
- package/lib/typescript/lib/commonjs/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts +87 -0
- package/lib/typescript/lib/commonjs/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts +31 -0
- package/lib/typescript/lib/commonjs/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts +45 -0
- package/lib/typescript/lib/commonjs/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/index.d.ts +95 -0
- package/lib/typescript/lib/commonjs/Charts/index.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts +106 -0
- package/lib/typescript/lib/commonjs/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/types.d.ts +2 -0
- package/lib/typescript/lib/commonjs/Charts/types.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts +24 -0
- package/lib/typescript/lib/commonjs/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/commonjs/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/commonjs/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/commonjs/index.d.ts +4 -0
- package/lib/typescript/lib/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/BetRouter/api/index.d.ts +108 -0
- package/lib/typescript/lib/module/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts +16 -0
- package/lib/typescript/lib/module/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts +16 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts +14 -0
- package/lib/typescript/lib/module/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts +8 -0
- package/lib/typescript/lib/module/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts +15 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts +11 -0
- package/lib/typescript/lib/module/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts +12 -0
- package/lib/typescript/lib/module/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts +6 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
- package/lib/typescript/lib/module/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/index.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts +20 -0
- package/lib/typescript/lib/module/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts +9 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts +20 -0
- package/lib/typescript/lib/module/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts +742 -0
- package/lib/typescript/lib/module/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/config.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/contests.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts +55 -0
- package/lib/typescript/lib/module/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/index.d.ts +14 -0
- package/lib/typescript/lib/module/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/markets.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/orders.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/participants.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/lib/module/BetRouter/types/partners.d.ts +2 -0
- package/lib/typescript/lib/module/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts +81 -0
- package/lib/typescript/lib/module/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts +31 -0
- package/lib/typescript/lib/module/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts +41 -0
- package/lib/typescript/lib/module/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/index.d.ts +6 -0
- package/lib/typescript/lib/module/Charts/index.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts +102 -0
- package/lib/typescript/lib/module/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/types.d.ts +2 -0
- package/lib/typescript/lib/module/Charts/types.d.ts.map +1 -0
- package/lib/typescript/lib/module/Charts/utils/formatters.d.ts +14 -0
- package/lib/typescript/lib/module/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/lib/module/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/Icons.d.ts +5 -0
- package/lib/typescript/lib/module/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/lib/module/Components/index.d.ts +1 -0
- package/lib/typescript/lib/module/Components/index.d.ts.map +1 -1
- package/lib/typescript/lib/module/index.d.ts +3 -1
- package/lib/typescript/lib/module/index.d.ts.map +1 -1
- package/lib/typescript/src/ApiOverrides/index.d.ts.map +1 -1
- package/lib/typescript/src/BetRouter/api/index.d.ts +115 -0
- package/lib/typescript/src/BetRouter/api/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/api/types.d.ts +2 -0
- package/lib/typescript/src/BetRouter/api/types.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/AccountManager.d.ts +18 -0
- package/lib/typescript/src/BetRouter/components/AccountManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts +15 -0
- package/lib/typescript/src/BetRouter/components/AdminPortal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts +24 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts +19 -0
- package/lib/typescript/src/BetRouter/components/BuyOpportunityCard.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts +15 -0
- package/lib/typescript/src/BetRouter/components/ContestLiquidity.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts +13 -0
- package/lib/typescript/src/BetRouter/components/ContestSelector.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts +16 -0
- package/lib/typescript/src/BetRouter/components/MyOpportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts +21 -0
- package/lib/typescript/src/BetRouter/components/OpportunityDetailModal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts +20 -0
- package/lib/typescript/src/BetRouter/components/OpportunityHistory.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts +12 -0
- package/lib/typescript/src/BetRouter/components/PartnerCredentials.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts +18 -0
- package/lib/typescript/src/BetRouter/components/PlacedOpportunityModal.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/AutoFillView.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/ConfigManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts +4 -0
- package/lib/typescript/src/BetRouter/components/admin/JobManager.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts +9 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueContests.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts +8 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueInfo.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts +8 -0
- package/lib/typescript/src/BetRouter/components/admin/LeagueParticipants.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/index.d.ts +16 -0
- package/lib/typescript/src/BetRouter/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts +15 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopAdminLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts +44 -0
- package/lib/typescript/src/BetRouter/layouts/DesktopLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts +15 -0
- package/lib/typescript/src/BetRouter/layouts/MobileAdminLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts +44 -0
- package/lib/typescript/src/BetRouter/layouts/MobileLayout.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/accounts.d.ts +19 -0
- package/lib/typescript/src/BetRouter/types/accounts.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/api-contracts.d.ts +1071 -0
- package/lib/typescript/src/BetRouter/types/api-contracts.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/config.d.ts +12 -0
- package/lib/typescript/src/BetRouter/types/config.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/contests.d.ts +34 -0
- package/lib/typescript/src/BetRouter/types/contests.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/credentials.d.ts +24 -0
- package/lib/typescript/src/BetRouter/types/credentials.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/index.d.ts +14 -0
- package/lib/typescript/src/BetRouter/types/index.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/jobs.d.ts +35 -0
- package/lib/typescript/src/BetRouter/types/jobs.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/leagues.d.ts +26 -0
- package/lib/typescript/src/BetRouter/types/leagues.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/liquidity.d.ts +14 -0
- package/lib/typescript/src/BetRouter/types/liquidity.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/markets.d.ts +87 -0
- package/lib/typescript/src/BetRouter/types/markets.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/opportunities.d.ts +88 -0
- package/lib/typescript/src/BetRouter/types/opportunities.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/orders.d.ts +34 -0
- package/lib/typescript/src/BetRouter/types/orders.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/participants.d.ts +33 -0
- package/lib/typescript/src/BetRouter/types/participants.d.ts.map +1 -0
- package/lib/typescript/src/BetRouter/types/partners.d.ts +11 -0
- package/lib/typescript/src/BetRouter/types/partners.d.ts.map +1 -0
- package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts +117 -0
- package/lib/typescript/src/Charts/adapters/TradeChartAdapter.d.ts.map +1 -0
- package/lib/typescript/src/Charts/components/BaseLineChart.d.ts +40 -0
- package/lib/typescript/src/Charts/components/BaseLineChart.d.ts.map +1 -0
- package/lib/typescript/src/Charts/components/LivePriceChart.d.ts +13 -0
- package/lib/typescript/src/Charts/components/LivePriceChart.d.ts.map +1 -0
- package/lib/typescript/src/Charts/index.d.ts +28 -0
- package/lib/typescript/src/Charts/index.d.ts.map +1 -0
- package/lib/typescript/src/Charts/themes/chartTheme.d.ts +78 -0
- package/lib/typescript/src/Charts/themes/chartTheme.d.ts.map +1 -0
- package/lib/typescript/src/Charts/types.d.ts +155 -0
- package/lib/typescript/src/Charts/types.d.ts.map +1 -0
- package/lib/typescript/src/Charts/utils/formatters.d.ts +66 -0
- package/lib/typescript/src/Charts/utils/formatters.d.ts.map +1 -0
- package/lib/typescript/src/Components/Dropdown.d.ts.map +1 -1
- package/lib/typescript/src/Components/Icons.d.ts +1 -0
- package/lib/typescript/src/Components/Icons.d.ts.map +1 -1
- package/lib/typescript/src/Components/index.d.ts +1 -0
- package/lib/typescript/src/Components/index.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +4 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/ApiOverrides/index.ts +4 -0
- package/src/BetRouter/api/index.ts +854 -0
- package/src/BetRouter/api/types.ts +0 -0
- package/src/BetRouter/components/AccountManager.tsx +533 -0
- package/src/BetRouter/components/AdminPortal.tsx +44 -0
- package/src/BetRouter/components/BuyOpportunities.tsx +491 -0
- package/src/BetRouter/components/BuyOpportunityCard.tsx +331 -0
- package/src/BetRouter/components/ContestLiquidity.tsx +613 -0
- package/src/BetRouter/components/ContestSelector.tsx +179 -0
- package/src/BetRouter/components/MyOpportunities.tsx +279 -0
- package/src/BetRouter/components/MyOpportunities.tsx.bak +440 -0
- package/src/BetRouter/components/OpportunityDetailModal.tsx +360 -0
- package/src/BetRouter/components/OpportunityHistory.tsx +408 -0
- package/src/BetRouter/components/PartnerCredentials.tsx +212 -0
- package/src/BetRouter/components/PlacedOpportunityModal.tsx +192 -0
- package/src/BetRouter/components/admin/AutoFillView.tsx +275 -0
- package/src/BetRouter/components/admin/ConfigManager.tsx +596 -0
- package/src/BetRouter/components/admin/JobManager.tsx +758 -0
- package/src/BetRouter/components/admin/LeagueContests.tsx +2443 -0
- package/src/BetRouter/components/admin/LeagueInfo.tsx +253 -0
- package/src/BetRouter/components/admin/LeagueParticipants.tsx +662 -0
- package/src/BetRouter/index.tsx +453 -0
- package/src/BetRouter/layouts/DesktopAdminLayout.tsx +348 -0
- package/src/BetRouter/layouts/DesktopLayout.tsx +292 -0
- package/src/BetRouter/layouts/MobileAdminLayout.tsx +387 -0
- package/src/BetRouter/layouts/MobileLayout.tsx +325 -0
- package/src/BetRouter/types/ADMIN_PORTAL.md +863 -0
- package/src/BetRouter/types/ADMIN_PORTAL_SIMPLIFIED.md +1881 -0
- package/src/BetRouter/types/CREDENTIALS_EXAMPLE.md +350 -0
- package/src/BetRouter/types/LIQUIDITY_CLIENT_GUIDE.md +399 -0
- package/src/BetRouter/types/MARKET_LINKING_WORKFLOW.md +682 -0
- package/src/BetRouter/types/MARKET_LINKING_WORKFLOW_V2.md +627 -0
- package/src/BetRouter/types/README.md +249 -0
- package/src/BetRouter/types/accounts.ts +21 -0
- package/src/BetRouter/types/api-contracts.ts +1164 -0
- package/src/BetRouter/types/config.ts +12 -0
- package/src/BetRouter/types/contests.ts +37 -0
- package/src/BetRouter/types/credentials.ts +99 -0
- package/src/BetRouter/types/index.ts +16 -0
- package/src/BetRouter/types/jobs.ts +37 -0
- package/src/BetRouter/types/leagues.ts +29 -0
- package/src/BetRouter/types/liquidity.ts +15 -0
- package/src/BetRouter/types/markets.ts +94 -0
- package/src/BetRouter/types/opportunities.ts +107 -0
- package/src/BetRouter/types/orders.ts +51 -0
- package/src/BetRouter/types/participants.ts +34 -0
- package/src/BetRouter/types/partners.ts +10 -0
- package/src/Charts/README.md +310 -0
- package/src/Charts/adapters/TradeChartAdapter.ts +471 -0
- package/src/Charts/components/BaseLineChart.tsx +293 -0
- package/src/Charts/components/LivePriceChart.tsx +521 -0
- package/src/Charts/index.tsx +62 -0
- package/src/Charts/themes/chartTheme.ts +113 -0
- package/src/Charts/types.ts +160 -0
- package/src/Charts/utils/formatters.ts +182 -0
- package/src/Components/Dropdown.tsx +6 -3
- package/src/Components/Icons.tsx +12 -0
- package/src/Components/index.tsx +4 -0
- package/src/index.tsx +6 -0
- package/src/types.d.ts +410 -2
|
File without changes
|
|
@@ -0,0 +1,533 @@
|
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { View, Text, Button } from "../../Components/Themed";
|
|
3
|
+
import { BetRouterApi } from '../api';
|
|
4
|
+
import type { RouterAccountProps, AccountPartnerProps, RouterPartnerProps } from '../types';
|
|
5
|
+
import type { MyPlayerProps } from '../../types';
|
|
6
|
+
import { ActivityIndicator, Modal, Image, TouchableOpacity, ScrollView, Dimensions } from 'react-native';
|
|
7
|
+
import { useColors } from '../../constants/useColors';
|
|
8
|
+
import PartnerCredentials from './PartnerCredentials';
|
|
9
|
+
import { Icons } from '../../Components';
|
|
10
|
+
|
|
11
|
+
type AccountManagerProps = {
|
|
12
|
+
me?: MyPlayerProps
|
|
13
|
+
onOpenAdminPortal?: () => void
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* This is where a user can manage their account.
|
|
18
|
+
* - Upon load it should grab the following data
|
|
19
|
+
* - getMyDetails - bettoredge auth-svc - this will contain the users profile information on BE
|
|
20
|
+
* - getMyAccount - should retrieve their router_account attached to their bettoredge id
|
|
21
|
+
* - getMyAccountPartners - should retrieve their account_partners (i.e., partner connections - bettoredge, kalshi, etc),
|
|
22
|
+
* - getMyBalances - should retrieve their balances and a combined balance amount
|
|
23
|
+
* @param param0
|
|
24
|
+
*/
|
|
25
|
+
const AccountManager = ({ me, onOpenAdminPortal }: AccountManagerProps) => {
|
|
26
|
+
const Colors = useColors();
|
|
27
|
+
const [loading, setLoading] = useState(false);
|
|
28
|
+
const [account, setAccount] = useState<RouterAccountProps | null>(null);
|
|
29
|
+
const [accountPartners, setAccountPartners] = useState<AccountPartnerProps[]>([]);
|
|
30
|
+
const [partners, setPartners] = useState<RouterPartnerProps[]>([]);
|
|
31
|
+
const [totalBalance, setTotalBalance] = useState(0);
|
|
32
|
+
const [error, setError] = useState<string | null>(null);
|
|
33
|
+
const [selectedAccountPartner, setSelectedAccountPartner] = useState<AccountPartnerProps | null>(null);
|
|
34
|
+
const [showCredentialsModal, setShowCredentialsModal] = useState(false);
|
|
35
|
+
const [showSettingsModal, setShowSettingsModal] = useState(false);
|
|
36
|
+
const [modalKey, setModalKey] = useState(0);
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
if (me?.player_id) {
|
|
40
|
+
BetRouterApi.setEnvironment();
|
|
41
|
+
loadAccountData();
|
|
42
|
+
}
|
|
43
|
+
}, [me?.player_id]);
|
|
44
|
+
|
|
45
|
+
const loadAccountData = async () => {
|
|
46
|
+
setLoading(true);
|
|
47
|
+
setError(null);
|
|
48
|
+
try {
|
|
49
|
+
// Load all partners first so we can display names
|
|
50
|
+
const partnersData = await BetRouterApi.BetRouter.PartnerApi.getPartners();
|
|
51
|
+
setPartners(partnersData);
|
|
52
|
+
|
|
53
|
+
// Load account details
|
|
54
|
+
const accountData = await BetRouterApi.BetRouter.AccountApi.getMe();
|
|
55
|
+
|
|
56
|
+
setAccount(accountData.account);
|
|
57
|
+
|
|
58
|
+
// Load account balances
|
|
59
|
+
const balanceData = await BetRouterApi.BetRouter.AccountApi.getMyBalance();
|
|
60
|
+
setAccountPartners(balanceData.account_partners);
|
|
61
|
+
setTotalBalance(balanceData.balance);
|
|
62
|
+
} catch (e) {
|
|
63
|
+
console.error('Error loading account data:', e);
|
|
64
|
+
setError('Failed to load account data');
|
|
65
|
+
} finally {
|
|
66
|
+
setLoading(false);
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const handleJoinRouter = async () => {
|
|
71
|
+
try {
|
|
72
|
+
setLoading(true);
|
|
73
|
+
const result = await BetRouterApi.BetRouter.AccountApi.join();
|
|
74
|
+
setAccount(result.account);
|
|
75
|
+
} catch (e) {
|
|
76
|
+
console.error('Error joining router:', e);
|
|
77
|
+
setError('Failed to join router');
|
|
78
|
+
} finally {
|
|
79
|
+
setLoading(false);
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const handleLeaveRouter = async () => {
|
|
84
|
+
try {
|
|
85
|
+
setLoading(true);
|
|
86
|
+
const result = await BetRouterApi.BetRouter.AccountApi.leave();
|
|
87
|
+
setAccount(result.account);
|
|
88
|
+
} catch (e) {
|
|
89
|
+
console.error('Error leaving router:', e);
|
|
90
|
+
setError('Failed to leave router');
|
|
91
|
+
} finally {
|
|
92
|
+
setLoading(false);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const handleConnectPartner = async (partner_id: string) => {
|
|
97
|
+
try {
|
|
98
|
+
setLoading(true);
|
|
99
|
+
await BetRouterApi.BetRouter.AccountApi.connectPartner(partner_id);
|
|
100
|
+
await loadAccountData(); // Refresh data
|
|
101
|
+
} catch (e) {
|
|
102
|
+
console.error('Error connecting partner:', e);
|
|
103
|
+
setError('Failed to connect partner');
|
|
104
|
+
} finally {
|
|
105
|
+
setLoading(false);
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const handleDisconnectPartner = async (partner_id: string) => {
|
|
110
|
+
try {
|
|
111
|
+
setLoading(true);
|
|
112
|
+
await BetRouterApi.BetRouter.AccountApi.disconnectPartner(partner_id);
|
|
113
|
+
await loadAccountData(); // Refresh data
|
|
114
|
+
} catch (e) {
|
|
115
|
+
console.error('Error disconnecting partner:', e);
|
|
116
|
+
setError('Failed to disconnect partner');
|
|
117
|
+
} finally {
|
|
118
|
+
setLoading(false);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const handleTestCredentials = async (partner_id: string) => {
|
|
123
|
+
try {
|
|
124
|
+
setLoading(true);
|
|
125
|
+
setError(null);
|
|
126
|
+
await BetRouterApi.BetRouter.AccountApi.testPartnerCredentials(partner_id);
|
|
127
|
+
await loadAccountData(); // Refresh to get updated status
|
|
128
|
+
|
|
129
|
+
// Show success message
|
|
130
|
+
const partner = partners.find(p => p.partner_id === partner_id);
|
|
131
|
+
alert(`✓ ${partner?.name || 'Partner'} credentials tested successfully! Status updated.`);
|
|
132
|
+
} catch (e: any) {
|
|
133
|
+
console.error('Error testing credentials:', e);
|
|
134
|
+
const errorMsg = e?.response?.data?.message || e?.message || 'Credential test failed. Please check your credentials and try again.';
|
|
135
|
+
setError(errorMsg);
|
|
136
|
+
alert(`✗ Credential test failed: ${errorMsg}`);
|
|
137
|
+
} finally {
|
|
138
|
+
setLoading(false);
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
const handleUpdateBalance = async () => {
|
|
143
|
+
try {
|
|
144
|
+
setLoading(true);
|
|
145
|
+
await BetRouterApi.BetRouter.AccountApi.updateBalance();
|
|
146
|
+
await loadAccountData(); // Refresh data
|
|
147
|
+
} catch (e) {
|
|
148
|
+
console.error('Error updating balance:', e);
|
|
149
|
+
setError('Failed to update balance');
|
|
150
|
+
} finally {
|
|
151
|
+
setLoading(false);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const handleUpdateCredentials = async (partner_id: string, credentials: Record<string, any>) => {
|
|
156
|
+
try {
|
|
157
|
+
await BetRouterApi.BetRouter.AccountApi.updatePartnerCredentials(partner_id, credentials);
|
|
158
|
+
await loadAccountData(); // Refresh data
|
|
159
|
+
} catch (e) {
|
|
160
|
+
console.error('Error updating credentials:', e);
|
|
161
|
+
throw e;
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const handleOpenCredentials = (accountPartner: AccountPartnerProps) => {
|
|
166
|
+
setSelectedAccountPartner(accountPartner);
|
|
167
|
+
// Close settings modal first to avoid nested modals on iOS
|
|
168
|
+
setShowSettingsModal(false);
|
|
169
|
+
// Delay opening credentials modal to prevent crash
|
|
170
|
+
setTimeout(() => {
|
|
171
|
+
setShowCredentialsModal(true);
|
|
172
|
+
}, 300);
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
const handleCloseCredentials = () => {
|
|
176
|
+
setShowCredentialsModal(false);
|
|
177
|
+
setSelectedAccountPartner(null);
|
|
178
|
+
// Delay reopening settings modal to prevent crash
|
|
179
|
+
setTimeout(() => {
|
|
180
|
+
setShowSettingsModal(true);
|
|
181
|
+
}, 300);
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
const renderPartner = ({ item }: { item: RouterPartnerProps | AccountPartnerProps }) => {
|
|
185
|
+
// Check if this is an AccountPartnerProps (has account_partner_id) or just a RouterPartnerProps
|
|
186
|
+
const isAccountPartner = 'account_partner_id' in item;
|
|
187
|
+
const accountPartner = isAccountPartner ? item as AccountPartnerProps : accountPartners.find(ap => ap.partner_id === item.partner_id);
|
|
188
|
+
const partner = isAccountPartner
|
|
189
|
+
? partners.find(p => p.partner_id === (item as AccountPartnerProps).partner_id)
|
|
190
|
+
: item as RouterPartnerProps;
|
|
191
|
+
|
|
192
|
+
// If no account_partner exists, show as "Not Connected"
|
|
193
|
+
if (!accountPartner) {
|
|
194
|
+
return (
|
|
195
|
+
<View style={{ padding: 10, borderBottomWidth: 1, borderBottomColor: Colors.borders.light }}>
|
|
196
|
+
<View transparent style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
197
|
+
<View transparent style={{ flex: 1 }}>
|
|
198
|
+
<Text theme='h1'>{partner?.name || item.partner_id}</Text>
|
|
199
|
+
<Text
|
|
200
|
+
theme='description'
|
|
201
|
+
style={{ marginTop: 3 }}
|
|
202
|
+
color={Colors.text.description}
|
|
203
|
+
>
|
|
204
|
+
Status: Not Connected
|
|
205
|
+
</Text>
|
|
206
|
+
</View>
|
|
207
|
+
<View transparent style={{ flexDirection: 'row', gap: 8 }}>
|
|
208
|
+
<Button
|
|
209
|
+
type='success'
|
|
210
|
+
title='Connect'
|
|
211
|
+
onPress={() => handleConnectPartner(item.partner_id)}
|
|
212
|
+
disabled={loading}
|
|
213
|
+
/>
|
|
214
|
+
</View>
|
|
215
|
+
</View>
|
|
216
|
+
</View>
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
const isInactive = accountPartner.status === 'inactive';
|
|
221
|
+
const isConnected = accountPartner.status === 'active';
|
|
222
|
+
const isPending = accountPartner.status === 'inactive' && accountPartner.encrypted_credentials;
|
|
223
|
+
const isActive = accountPartner.status === 'active';
|
|
224
|
+
const hasCredentials = accountPartner.encrypted_credentials && accountPartner.encrypted_credentials.trim() !== '';
|
|
225
|
+
|
|
226
|
+
// Determine status color
|
|
227
|
+
let statusColor = Colors.text.error; // default for inactive/disconnected
|
|
228
|
+
if (isConnected || isActive) {
|
|
229
|
+
statusColor = Colors.text.success;
|
|
230
|
+
} else if (isPending) {
|
|
231
|
+
statusColor = Colors.text.warning;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return (
|
|
235
|
+
<View style={{ padding: 10, borderBottomWidth: 1, borderColor: Colors.borders.light }}>
|
|
236
|
+
<View transparent style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
237
|
+
<View transparent style={{ flex: 1 }}>
|
|
238
|
+
<Text theme='h1'>{partner?.name || accountPartner.partner_id}</Text>
|
|
239
|
+
<Text
|
|
240
|
+
theme='description'
|
|
241
|
+
style={{ marginTop: 3 }}
|
|
242
|
+
color={statusColor}
|
|
243
|
+
>
|
|
244
|
+
Status: {accountPartner.status}
|
|
245
|
+
</Text>
|
|
246
|
+
{!isInactive && (
|
|
247
|
+
<Text theme='description'>Balance: ${accountPartner.balance.toFixed(2)}</Text>
|
|
248
|
+
)}
|
|
249
|
+
</View>
|
|
250
|
+
<View transparent style={{ flexDirection: 'row', gap: 8 }}>
|
|
251
|
+
{isInactive ? (
|
|
252
|
+
// Inactive partners - show different buttons based on credentials
|
|
253
|
+
<>
|
|
254
|
+
<Button
|
|
255
|
+
type='info'
|
|
256
|
+
title={hasCredentials ? 'Update Credentials' : 'Add Credentials'}
|
|
257
|
+
onPress={() => handleOpenCredentials(accountPartner)}
|
|
258
|
+
/>
|
|
259
|
+
{hasCredentials && (
|
|
260
|
+
<Button
|
|
261
|
+
type='success'
|
|
262
|
+
title='Test'
|
|
263
|
+
onPress={() => handleTestCredentials(accountPartner.partner_id)}
|
|
264
|
+
disabled={loading}
|
|
265
|
+
/>
|
|
266
|
+
)}
|
|
267
|
+
</>
|
|
268
|
+
) : (
|
|
269
|
+
// Show management buttons for active/pending partners
|
|
270
|
+
<>
|
|
271
|
+
<Button
|
|
272
|
+
type='info'
|
|
273
|
+
title='Update'
|
|
274
|
+
onPress={() => handleOpenCredentials(accountPartner)}
|
|
275
|
+
/>
|
|
276
|
+
{isPending && (
|
|
277
|
+
<Button
|
|
278
|
+
title='Test'
|
|
279
|
+
onPress={() => handleTestCredentials(accountPartner.partner_id)}
|
|
280
|
+
disabled={loading}
|
|
281
|
+
/>
|
|
282
|
+
)}
|
|
283
|
+
<Button
|
|
284
|
+
type='error'
|
|
285
|
+
title='Disconnect'
|
|
286
|
+
onPress={() => handleDisconnectPartner(accountPartner.partner_id)}
|
|
287
|
+
disabled={loading}
|
|
288
|
+
/>
|
|
289
|
+
</>
|
|
290
|
+
)}
|
|
291
|
+
</View>
|
|
292
|
+
</View>
|
|
293
|
+
</View>
|
|
294
|
+
);
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
if (loading && !account) {
|
|
298
|
+
return (
|
|
299
|
+
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
|
|
300
|
+
<ActivityIndicator size="large" />
|
|
301
|
+
<Text style={{ marginTop: 10 }}>Loading account...</Text>
|
|
302
|
+
</View>
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
if (!account) {
|
|
307
|
+
return (
|
|
308
|
+
<View style={{ flex: 1, padding: 20 }}>
|
|
309
|
+
<View float style={{ padding: 20 }}>
|
|
310
|
+
<Text theme='h1' style={{ marginBottom: 10 }}>Welcome to BetRouter</Text>
|
|
311
|
+
<Text theme='description' style={{ marginBottom: 20 }}>
|
|
312
|
+
You don't have a router account yet. Join to start using BetRouter features.
|
|
313
|
+
</Text>
|
|
314
|
+
<Button
|
|
315
|
+
title='Join Router'
|
|
316
|
+
onPress={handleJoinRouter}
|
|
317
|
+
disabled={loading}
|
|
318
|
+
/>
|
|
319
|
+
{error && (
|
|
320
|
+
<Text style={{ color: Colors.text.error, marginTop: 10 }}>{error}</Text>
|
|
321
|
+
)}
|
|
322
|
+
</View>
|
|
323
|
+
</View>
|
|
324
|
+
);
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
const connectedCount = accountPartners.filter(ap => ap.status === 'active').length;
|
|
328
|
+
|
|
329
|
+
const formatCurrency = (value: number) => {
|
|
330
|
+
return new Intl.NumberFormat('en-US', {
|
|
331
|
+
style: 'currency',
|
|
332
|
+
currency: 'USD'
|
|
333
|
+
}).format(value);
|
|
334
|
+
};
|
|
335
|
+
|
|
336
|
+
return (
|
|
337
|
+
<View style={{ flex: 1 }}>
|
|
338
|
+
{/* Compact Account Header */}
|
|
339
|
+
<View float style={{ margin: 10 }}>
|
|
340
|
+
<View type='body' style={{ padding: 12, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
|
|
341
|
+
{/* Profile Section */}
|
|
342
|
+
<View transparent style={{ flexDirection: 'row', alignItems: 'center', flex: 1 }}>
|
|
343
|
+
{me?.profile_pic ? (
|
|
344
|
+
<Image
|
|
345
|
+
source={{ uri: me.profile_pic }}
|
|
346
|
+
style={{ width: 48, height: 48, borderRadius: 24, marginRight: 12 }}
|
|
347
|
+
/>
|
|
348
|
+
) : (
|
|
349
|
+
<View style={{
|
|
350
|
+
width: 48,
|
|
351
|
+
height: 48,
|
|
352
|
+
borderRadius: 24,
|
|
353
|
+
backgroundColor: Colors.buttons.background.action,
|
|
354
|
+
justifyContent: 'center',
|
|
355
|
+
alignItems: 'center',
|
|
356
|
+
marginRight: 12
|
|
357
|
+
}}>
|
|
358
|
+
<Text style={{ color: Colors.text.white, fontSize: 18, fontWeight: '600' }}>
|
|
359
|
+
{me?.username?.charAt(0).toUpperCase() || '?'}
|
|
360
|
+
</Text>
|
|
361
|
+
</View>
|
|
362
|
+
)}
|
|
363
|
+
<View transparent style={{ flex: 1 }}>
|
|
364
|
+
<Text theme='h1' size={16}>{me?.username || 'User'}</Text>
|
|
365
|
+
<Text theme='description' size={12} style={{ marginTop: 2 }}>
|
|
366
|
+
{connectedCount} partner{connectedCount !== 1 ? 's' : ''} connected
|
|
367
|
+
</Text>
|
|
368
|
+
</View>
|
|
369
|
+
</View>
|
|
370
|
+
|
|
371
|
+
{/* Balance & Settings */}
|
|
372
|
+
<View transparent style={{ alignItems: 'center', flexDirection: 'row', gap: 10 }}>
|
|
373
|
+
<View transparent style={{ alignItems: 'flex-end', marginRight:10 }}>
|
|
374
|
+
<Text theme='description' size={11}>Total Balance</Text>
|
|
375
|
+
<Text theme='h1' size={18} color={Colors.text.success}>
|
|
376
|
+
{formatCurrency(totalBalance)}
|
|
377
|
+
</Text>
|
|
378
|
+
</View>
|
|
379
|
+
{me?.role === 'admin' && onOpenAdminPortal && (
|
|
380
|
+
<Button
|
|
381
|
+
type='action'
|
|
382
|
+
float
|
|
383
|
+
title='Admin'
|
|
384
|
+
onPress={onOpenAdminPortal}
|
|
385
|
+
/>
|
|
386
|
+
)}
|
|
387
|
+
<Button
|
|
388
|
+
type='info'
|
|
389
|
+
float
|
|
390
|
+
onPress={() => {
|
|
391
|
+
setModalKey(prev => prev + 1);
|
|
392
|
+
setShowSettingsModal(true);
|
|
393
|
+
}}
|
|
394
|
+
>
|
|
395
|
+
<Icons.SettingsIcon size={14} color={Colors.text.h1} />
|
|
396
|
+
</Button>
|
|
397
|
+
</View>
|
|
398
|
+
</View>
|
|
399
|
+
</View>
|
|
400
|
+
|
|
401
|
+
{error && (
|
|
402
|
+
<View style={{ padding: 10, margin: 10 }}>
|
|
403
|
+
<Text style={{ color: Colors.text.error }}>{error}</Text>
|
|
404
|
+
</View>
|
|
405
|
+
)}
|
|
406
|
+
|
|
407
|
+
{/* Settings Modal */}
|
|
408
|
+
<Modal
|
|
409
|
+
key={`settings-modal-${modalKey}`}
|
|
410
|
+
visible={showSettingsModal}
|
|
411
|
+
transparent={true}
|
|
412
|
+
animationType="none"
|
|
413
|
+
onRequestClose={() => setShowSettingsModal(false)}
|
|
414
|
+
statusBarTranslucent={true}
|
|
415
|
+
>
|
|
416
|
+
<View style={{
|
|
417
|
+
flex: 1,
|
|
418
|
+
backgroundColor: 'rgba(0,0,0,0.5)',
|
|
419
|
+
justifyContent: 'center',
|
|
420
|
+
alignItems: 'center'
|
|
421
|
+
}}>
|
|
422
|
+
<TouchableOpacity
|
|
423
|
+
activeOpacity={1}
|
|
424
|
+
style={{
|
|
425
|
+
position: 'absolute',
|
|
426
|
+
top: 0,
|
|
427
|
+
left: 0,
|
|
428
|
+
right: 0,
|
|
429
|
+
bottom: 0
|
|
430
|
+
}}
|
|
431
|
+
onPress={() => setShowSettingsModal(false)}
|
|
432
|
+
/>
|
|
433
|
+
<View float style={{
|
|
434
|
+
width: Math.min(Dimensions.get('window').width * 0.9, 600),
|
|
435
|
+
maxHeight: Dimensions.get('window').height * 0.8,
|
|
436
|
+
borderRadius: 8,
|
|
437
|
+
overflow: 'hidden'
|
|
438
|
+
}}>
|
|
439
|
+
{/* Modal Header */}
|
|
440
|
+
<View type='header' style={{
|
|
441
|
+
padding: 15,
|
|
442
|
+
borderTopLeftRadius: 8,
|
|
443
|
+
borderTopRightRadius: 8,
|
|
444
|
+
flexDirection: 'row',
|
|
445
|
+
alignItems: 'center',
|
|
446
|
+
justifyContent: 'space-between'
|
|
447
|
+
}}>
|
|
448
|
+
<View transparent>
|
|
449
|
+
<Text theme='h1'>Account Settings</Text>
|
|
450
|
+
<Text theme='description' style={{ marginTop: 3 }}>
|
|
451
|
+
Manage partners and balances
|
|
452
|
+
</Text>
|
|
453
|
+
</View>
|
|
454
|
+
<Button
|
|
455
|
+
type='text'
|
|
456
|
+
title='Close'
|
|
457
|
+
onPress={() => setShowSettingsModal(false)}
|
|
458
|
+
/>
|
|
459
|
+
</View>
|
|
460
|
+
|
|
461
|
+
{/* Modal Body */}
|
|
462
|
+
<ScrollView style={{ maxHeight: 500 }}>
|
|
463
|
+
<View type='body' style={{ padding: 15 }}>
|
|
464
|
+
<View transparent style={{ flexDirection: 'row', justifyContent: 'space-between', marginBottom: 15 }}>
|
|
465
|
+
<View transparent>
|
|
466
|
+
<Text theme='description' size={12}>Account Status</Text>
|
|
467
|
+
<Text theme='h2'>{account?.status || 'N/A'}</Text>
|
|
468
|
+
</View>
|
|
469
|
+
<Button
|
|
470
|
+
title='Refresh Balance'
|
|
471
|
+
onPress={handleUpdateBalance}
|
|
472
|
+
disabled={loading}
|
|
473
|
+
/>
|
|
474
|
+
</View>
|
|
475
|
+
|
|
476
|
+
<Text theme='h2' style={{ marginBottom: 10, marginTop: 10 }}>
|
|
477
|
+
All Partners ({partners.length})
|
|
478
|
+
</Text>
|
|
479
|
+
|
|
480
|
+
{partners.length === 0 ? (
|
|
481
|
+
<View transparent style={{ padding: 20, alignItems: 'center' }}>
|
|
482
|
+
<Text theme='description'>No partners available</Text>
|
|
483
|
+
</View>
|
|
484
|
+
) : (
|
|
485
|
+
partners.map((partner) => (
|
|
486
|
+
<View key={partner.partner_id} transparent>
|
|
487
|
+
{renderPartner({ item: partner } as any)}
|
|
488
|
+
</View>
|
|
489
|
+
))
|
|
490
|
+
)}
|
|
491
|
+
</View>
|
|
492
|
+
</ScrollView>
|
|
493
|
+
|
|
494
|
+
{/* Modal Footer */}
|
|
495
|
+
<View type='footer' style={{
|
|
496
|
+
padding: 15,
|
|
497
|
+
borderBottomLeftRadius: 8,
|
|
498
|
+
borderBottomRightRadius: 8,
|
|
499
|
+
flexDirection: 'row',
|
|
500
|
+
justifyContent: 'space-between'
|
|
501
|
+
}}>
|
|
502
|
+
{account?.status === 'active' && (
|
|
503
|
+
<Button
|
|
504
|
+
type='error'
|
|
505
|
+
style={{ flex:1 }}
|
|
506
|
+
title='Disconnect All'
|
|
507
|
+
onPress={async () => {
|
|
508
|
+
await handleLeaveRouter();
|
|
509
|
+
setShowSettingsModal(false);
|
|
510
|
+
}}
|
|
511
|
+
disabled={loading}
|
|
512
|
+
/>
|
|
513
|
+
)}
|
|
514
|
+
</View>
|
|
515
|
+
</View>
|
|
516
|
+
</View>
|
|
517
|
+
</Modal>
|
|
518
|
+
|
|
519
|
+
{/* Partner Credentials Modal */}
|
|
520
|
+
{selectedAccountPartner && (
|
|
521
|
+
<PartnerCredentials
|
|
522
|
+
visible={showCredentialsModal}
|
|
523
|
+
accountPartner={selectedAccountPartner}
|
|
524
|
+
partner={partners.find(p => p.partner_id === selectedAccountPartner.partner_id)!}
|
|
525
|
+
onClose={handleCloseCredentials}
|
|
526
|
+
onUpdate={handleUpdateCredentials}
|
|
527
|
+
/>
|
|
528
|
+
)}
|
|
529
|
+
</View>
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export default AccountManager;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { View } from "../../Components/Themed";
|
|
3
|
+
import DesktopAdminLayout from '../layouts/DesktopAdminLayout';
|
|
4
|
+
import MobileAdminLayout from '../layouts/MobileAdminLayout';
|
|
5
|
+
|
|
6
|
+
type AdminPortalProps = {
|
|
7
|
+
insets: { top: number; bottom: number; left: number; right: number };
|
|
8
|
+
onClose?: () => void;
|
|
9
|
+
initialContestId?: string; // Optional contest ID to deep link to
|
|
10
|
+
initialLeagueId?: string; // Optional league ID to deep link to
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
const AdminPortal = ({ insets, onClose, initialContestId, initialLeagueId }: AdminPortalProps) => {
|
|
14
|
+
const [size, setSize] = useState({ width: 0, height: 0 });
|
|
15
|
+
const isDesktop = size.width > 768;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<View
|
|
19
|
+
style={{ flex: 1 }}
|
|
20
|
+
onLayout={(ev) => {
|
|
21
|
+
const { height, width } = ev.nativeEvent.layout;
|
|
22
|
+
setSize({ height, width });
|
|
23
|
+
}}
|
|
24
|
+
>
|
|
25
|
+
{isDesktop ? (
|
|
26
|
+
<DesktopAdminLayout
|
|
27
|
+
insets={insets}
|
|
28
|
+
onClose={onClose}
|
|
29
|
+
initialContestId={initialContestId}
|
|
30
|
+
initialLeagueId={initialLeagueId}
|
|
31
|
+
/>
|
|
32
|
+
) : (
|
|
33
|
+
<MobileAdminLayout
|
|
34
|
+
insets={insets}
|
|
35
|
+
onClose={onClose}
|
|
36
|
+
initialContestId={initialContestId}
|
|
37
|
+
initialLeagueId={initialLeagueId}
|
|
38
|
+
/>
|
|
39
|
+
)}
|
|
40
|
+
</View>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export default AdminPortal;
|