-
Notifications
You must be signed in to change notification settings - Fork 16
Rupato/fix: legacy conversion #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
rupato-deriv
wants to merge
1
commit into
deriv-com:master
Choose a base branch
from
rupato-deriv:Rupato/Fix--blockly-legacy-conversion
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rupato/fix: legacy conversion #73
rupato-deriv
wants to merge
1
commit into
deriv-com:master
from
rupato-deriv:Rupato/Fix--blockly-legacy-conversion
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
🤖 AI Code Analysis Results📝 Manual Coding⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ 0% 0 of 186,776 characters (0%) in newly added lines are AI-generated 📊 Analysis Summary
📋 Per-File Breakdown (New Lines Only)
📝 This PR contains traditional hand-written code. 📊 Raw Data (for dashboard){
"timestamp": "2025-09-24T04:07:56.589Z",
"repository": "deriv-com/derivatives-bot",
"branch": "unknown",
"author": "unknown",
"summary": {
"totalCharacters": 186776,
"aiCharacters": 0,
"percentage": 0
},
"files": [
{
"name": ".github/workflows/build-and-deploy-production.yml",
"totalCharacters": 271,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " - production_*\n uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4\n uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3\n uses: actions/cache/restore@638ed79f9dc94c1de1baef91bcab5edaa19451f4"
},
{
"name": ".github/workflows/build-and-deploy-staging.yml",
"totalCharacters": 250,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4\n uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3\n uses: actions/cache/restore@638ed79f9dc94c1de1baef91bcab5edaa19451f4"
},
{
"name": ".github/workflows/claude.yml",
"totalCharacters": 161,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4\n uses: anthropics/claude-code-action@ada5bc42ebb031c1b30d9e12ec73cb7f978b4846"
},
{
"name": ".github/workflows/sync-translations.yml",
"totalCharacters": 100,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "on:\n push:\n branches:\n - master\n schedule:\n - cron: '0 */12 * * *'\n workflow_dispatch:"
},
{
"name": "brand.config.json",
"totalCharacters": 3341,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "{\n \"brand_name\": \"Deriv\",\n \"brand_domain\": \"deriv.com\",\n \"brand_hostname\": {\n \"staging\": \"staging-home.deriv.com/dashboard\",\n \"production\": \"home.deriv.com/dashboard\"\n },\n \"domain_name\": \"Deriv.com\",\n \"colors\": {\n \"primary\": \"#ff444f\",\n \"secondary\": \"#85acb0\",\n \"tertiary\": \"#2a3052\",\n \"success\": \"#4bb4b3\",\n \"danger\": \"#cc2e3d\",\n \"warning\": \"#ffad3a\",\n \"info\": \"#377cfc\",\n \"neutral\": \"#999999\",\n \"black\":..."
},
{
"name": "index.html",
"totalCharacters": 1226,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " <!-- Google Tag Manager -->\n <script>\n (function (w, d, s, l, i) {\n w[l] = w[l] || [];\n w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' });\n var f = d.getElementsByTagName(s)[0],\n j = d.createElement(s),\n dl = l != 'dataLayer' ? '&l=' + l : '';\n j.async = true;\n j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl;\n f.p..."
},
{
"name": "jest.setup.ts",
"totalCharacters": 40,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " json: () => Promise.resolve({}),"
},
{
"name": "package-lock.json",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "package.json",
"totalCharacters": 7192,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " \"name\": \"bot\",\n \"private\": true,\n \"version\": \"0.0.1\",\n \"engines\": {\n \"node\": \"20.x\"\n },\n \"scripts\": {\n \"start\": \"rsbuild dev -o\",\n \"build\": \"rsbuild build\",\n \"watch\": \"rsbuild build --watch\",\n \"serve\": \"http-server dist -p 8443 -a localhost -o\",\n \"start:webpack\": \"webpack serve --open --config webpack.config.js\",\n \"build:webpack\": \"webpack --config webpack.config.js\",\n \"test:lint\": \"prettier --log-level silent --write . && eslint \\\"./src/**/*.?(js|j..."
},
{
"name": "rsbuild.config.ts",
"totalCharacters": 776,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " RUDDERSTACK_KEY: JSON.stringify(\n process.env.APP_ENV === 'production'\n ? process.env.RUDDERSTACK_KEY_PROD\n : process.env.RUDDERSTACK_KEY_DEV\n ),\n from: 'node_modules/@deriv-com/derivatives-charts/dist/*',\n { from: 'node_modules/@deriv-com/derivatives-charts/dist/chart/assets/*', to: 'assets/[name][ext]' },\n {\n from: 'node_modules/@deriv-com/derivati..."
},
{
"name": "scripts/generate-brand-css.js",
"totalCharacters": 7724,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "const fs = require('fs');\nconst path = require('path');\n\n// Import brand configuration from project root\nconst brandConfig = require('../brand.config.json');\n\n// Main function to update brand colors in _themes.scss\nconst updateBrandColorsInThemes = () => {\n const themesPath = path.join(__dirname, '../src/components/shared/styles/_themes.scss');\n\n if (!fs.existsSync(themesPath)) {\n console.error('❌ _themes.scss file not found');\n process.exit(1);\n }\n\n // Read the current..."
},
{
"name": "src/app/App.tsx",
"totalCharacters": 300,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { useLocalStorageSync } from '@/hooks/useLocalStorageSync';\n cdnUrl: `${TRANSLATIONS_CDN_URL || 'https://translations.deriv.com'}/${R2_PROJECT_NAME}/${CROWDIN_BRANCH_NAME}`,\n // Initialize localStorage sync hook to handle session token changes from other tabs\n useLocalStorageSync();\n"
},
{
"name": "src/app/AuthWrapper.tsx",
"totalCharacters": 3560,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import ErrorModal from '@/components/error-modal';\nimport PageError from '@/components/page-error';\nimport { getAuthError, getDefaultError } from '@/components/shared/utils/constants/error';\n setIsAuthComplete: React.Dispatch<React.SetStateAction<boolean>>,\n setTokenError: React.Dispatch<React.SetStateAction<string | null>>,\n setIsAuthError: React.Dispatch<React.SetStateAction<boolean>>\n // Extract token and account_type from URL params\n const urlParams = new URLSearchParams(windo..."
},
{
"name": "src/app/CoreStoreProvider.tsx",
"totalCharacters": 1347,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { TSocketResponseData } from '@/types/api-types';\n const isLoggedOutCookie = Cookies.get('logged_state') === 'false';\n if (client && activeAccount && isAuthorized) {\n } else if (client && !isAuthorized) {\n // Ensure client shows as not logged in until authorization is complete\n client?.setIsLoggedIn(false);\n }, [accountList, activeAccount, activeLoginid, client, isAuthorized]);\n }, [client, common, isAuthorizing]);\n const client_info..."
},
{
"name": "src/app/__tests__/app.spec.tsx",
"totalCharacters": 200,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " useStore: jest.fn(() => ({\n run_panel: {\n is_running: false,\n },\n ui: {\n show_prompt: false,\n setPromptHandler: jest.fn(),\n },\n })),"
},
{
"name": "src/app/app-content.jsx",
"totalCharacters": 400,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { setSmartChartsPublicPath } from '@deriv-com/derivatives-charts';\n\n is_client_store_initialized: client?.is_logged_in ? true : !!client,\n email: '',\n first_name: '',\n last_name: '',\n if (client.is_logged_in && is_api_initialized) {\n }, [is_api_initialized, client.loginid]);\n <ChunkLoader message={localize('Initializing Deriv Bot account...')} />"
},
{
"name": "src/app/app-root.tsx",
"totalCharacters": 33,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " // Initialize API\n }, []);"
},
{
"name": "src/components/auth-loading-wrapper/index.tsx",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/chat/useLiveChat.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/download/download.tsx",
"totalCharacters": 2599,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { downloadFile, getSuccessJournalMessage } from '@/utils/download';\nimport { getSymbolDisplayNameSync } from '@/utils/symbol-display-name';\n transaction_list.forEach((transaction: any) => {\n const data = transaction.data || transaction;\n\n // Handle both old and new API structures\n const market_name = data.display_name || getSymbolDisplayNameSync(data.underlying_symbol || '');\n\n // Transaction IDs - new API structure\n const buy_..."
},
{
"name": "src/components/layout/footer/index.tsx",
"totalCharacters": 815,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "// import useModalManager from '@/hooks/useModalManager';\n// import { getActiveTabUrl } from '@/utils/getActiveTabUrl';\n// import { LANGUAGES } from '@/utils/languages';\n// import { useTranslations } from '@deriv-com/translations';\n// import { DesktopLanguagesModal } from '@deriv-com/ui';\n// import LanguageSettings from './LanguageSettings';\n // const { currentLang = 'EN', localize, switchLanguage } = useTranslations();\n // const { hideModal, isModalOpenFor, showModal } = useModalManager()..."
},
{
"name": "src/components/layout/header/AccountSwitcherWallet/account-switcher-wallet-item.tsx",
"totalCharacters": 191,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " ({ closeAccountsDialog, account }: TAccountSwitcherWalletItemProps) => {\n\n client: { loginid: active_loginid },\n <Localize i18n_default_text='Options' />"
},
{
"name": "src/components/layout/header/account-info-icon.tsx",
"totalCharacters": 437,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import React from 'react';\nimport { CurrencyIcon } from '@/components/currency/currency-icon';\n\ntype TAccountInfoIcon = {\n is_virtual?: boolean;\n currency?: string;\n};\n\nconst AccountInfoIcon = ({ is_virtual, currency }: TAccountInfoIcon) => {\n return (\n <span className='acc-info__id-icon'>\n <CurrencyIcon currency={currency} isVirtual={is_virtual} />\n </span>\n );\n};\n\nexport default AccountInfoIcon;"
},
{
"name": "src/components/layout/header/account-info-wrapper.tsx",
"totalCharacters": 272,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " is_mobile?: boolean;\n children: React.ReactNode;\nconst AccountInfoWrapper = ({ is_disabled, children }: TAccountInfoWrapper) => {\n return (\n <div className={`account-info-wrapper ${is_disabled ? 'account-info-wrapper--disabled' : ''}`}>{children}</div>\n};"
},
{
"name": "src/components/layout/header/account-switcher.scss",
"totalCharacters": 1622,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " cursor: default;\n padding: 0 1.6rem;\n &:hover {\n background: transparent !important;\n }\n\n &__content {\n display: flex;\n flex-direction: column;\n justify-content: center;\n }\n\n &__account-type-header {\n display: flex;\n align-items: center;\n margin-bottom: 0.2rem;\n }\n\n &__account-type {\n @include typeface(--xxsmall-left-normal-grey);\n\n line-height: 1;\n margin: 0;\n font-size: var(--text-size-xxs)..."
},
{
"name": "src/components/layout/header/account-switcher.tsx",
"totalCharacters": 3082,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import React from 'react';\nimport classNames from 'classnames';\nimport { getCurrencyDisplayCode } from '@/components/shared';\nimport Text from '@/components/shared_ui/text';\nimport { Localize, localize } from '@deriv-com/translations';\nimport { useDevice } from '@deriv-com/ui';\nimport { TAccountSwitcher } from './common/types';\nimport AccountInfoIcon from './account-info-icon';\nimport AccountInfoWrapper from './account-info-wrapper';\n if (!activeAccount) return null;\n const { currency, isV..."
},
{
"name": "src/components/layout/header/common/demo-accounts.tsx",
"totalCharacters": 44,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { convertCommaValue } from './utils';"
},
{
"name": "src/components/layout/header/common/types.tsx",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/layout/header/header-config.tsx",
"totalCharacters": 19,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "\n label: 'Home',"
},
{
"name": "src/components/layout/header/header.scss",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/layout/header/header.tsx",
"totalCharacters": 1262,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const { isAuthorizing, isAuthorized, activeLoginid } = useApiBase();\n const { getCurrency, is_virtual } = client ?? {};\n const { isSingleLoggingIn, oAuthLogout } = useOauth2({ handleLogout: async () => client?.logout(), client });\n // Check if there's a session token in localStorage - if so, we should show loading until auth is complete\n const hasSessionToken = typeof window !== 'undefined' && !!localStorage.getItem('session_token');\n if (\n isAuthenticating ||\n ..."
},
{
"name": "src/components/layout/header/mobile-menu/__tests__/menu-content.spec.tsx",
"totalCharacters": 155,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " expect(screen.getByText(/Home/)).toBeInTheDocument();\n const text = screen.getByText(/Home/);\n const text = screen.getByText(/Home/);"
},
{
"name": "src/components/layout/header/mobile-menu/reports-submenu.tsx",
"totalCharacters": 111,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { LegacyOpenPositionIcon, LegacyProfitTableIcon, LegacyStatementIcon } from '@deriv/quill-icons/Legacy';"
},
{
"name": "src/components/layout/header/mobile-menu/use-mobile-menu-config.tsx",
"totalCharacters": 313,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { BrandDerivLogoCoralIcon } from '@deriv/quill-icons';\nimport { LegacyHomeOldIcon, LegacyReportsIcon, LegacyTheme1pxIcon } from '@deriv/quill-icons/Legacy';\n is_logged_in && {\n label: localize('Home'),\n [is_virtual, currency, is_logged_in, client_residence, client]"
},
{
"name": "src/components/layout/header/utils/index.js",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/layout/header/wallets/wallet.scss",
"totalCharacters": 6080,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " 'mobile': radial-gradient(\n 'desktop': radial-gradient(\n 'mobile': radial-gradient(\n 'desktop': radial-gradient(\n 'mobile': radial-gradient(\n 'mobile': radial-gradient(\n 'desktop': radial-gradient(\n 'mobile': radial-gradient(\n 'desktop': radial-gradient(\n 'mobile': radial-gradient(\n 'desktop': radial-gradient(\n 'mobile': radial-gradi..."
},
{
"name": "src/components/layout/index.tsx",
"totalCharacters": 255,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { useEffect, useState } from 'react';\n // Authentication is now handled by the OAuth flow\n setIsAuthenticating(false);\n }, [isLoggedInCookie, isClientAccountsPopulated, isEndpointPage, isCallbackPage, clientHasCurrency, currency]);"
},
{
"name": "src/components/market/market-icon.tsx",
"totalCharacters": 440,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " '1HZ15V': lazy(() =>\n import('@deriv/quill-icons/Markets').then(module => ({ default: module.MarketDerivedVolatility151sIcon }))\n ),\n '1HZ30V': lazy(() =>\n import('@deriv/quill-icons/Markets').then(module => ({ default: module.MarketDerivedVolatility301sIcon }))\n ),\n '1HZ90V': lazy(() =>\n import('@deriv/quill-icons/Markets').then(module => ({ default: module.MarketDerivedVolatility901sIcon }))\n ),"
},
{
"name": "src/components/page-error/page-error.tsx",
"totalCharacters": 121,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { standalone_routes } from '@/components/shared';\n window.location.assign(standalone_routes.deriv_app);"
},
{
"name": "src/components/run-panel/run-panel.tsx",
"totalCharacters": 120,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " }, [is_drawer_open, isDesktop]);\n onRunButtonClick, // eslint-disable-line @typescript-eslint/no-unused-vars\n"
},
{
"name": "src/components/shared/common/utility.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/shared/index.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/shared/services/trading-times-service.ts",
"totalCharacters": 13000,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "class TradingTimesService {\n private trading_times_cache: any = null;\n private cache_expiry: number = 0;\n private readonly CACHE_DURATION = 5 * 60 * 1000; // 5 minutes\n\n /**\n * Get trading times data with caching\n */\n async getTradingTimes(): Promise<any> {\n const now = Date.now();\n\n // Return cached data if still valid\n if (this.trading_times_cache && now < this.cache_expiry && this.trading_times_cache.markets) {\n return this.trading_times_..."
},
{
"name": "src/components/shared/styles/_themes.scss",
"totalCharacters": 538,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " /* Brand colors - dynamically generated from brand.config.json */\n --brand-white: #fff;\n --brand-dark-grey: #151717;\n --brand-red-coral: #ff444f; /* legacy compatibility */\n --brand-orange: #2a3052; /* legacy compatibility */\n\n /* Dynamic brand colors (set by brand configuration) */\n --brand-primary: #ff444f;\n --brand-secondary: #85acb0;\n --brand-tertiary: #2a3052;\n --brand-success: #4bb4b3;\n --brand-danger: #cc2e3d;\n --brand-warning: #ffad3a;\n --brand-inf..."
},
{
"name": "src/components/shared/utils/brand/brand.ts",
"totalCharacters": 59,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import config_data from '../../../../../brand.config.json';"
},
{
"name": "src/components/shared/utils/common-data.js",
"totalCharacters": 25641,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "/**\n * Common Data Utilities\n *\n * This file contains centralized data constants and utility functions\n * to improve maintainability and provide consistent data across components.\n */\n\n// Trading Times Data\nexport const TRADING_TIMES = {\n // Trading times for major symbols\n SYMBOLS: [\n // Forex - 24/5 markets\n 'frxEURUSD',\n 'frxGBPUSD',\n 'frxUSDJPY',\n 'frxAUDUSD',\n 'frxUSDCAD',\n 'frxUSDCHF',\n 'frxNZDUSD',\n 'frxEURGBP',\n ..."
},
{
"name": "src/components/shared/utils/config/config.ts",
"totalCharacters": 2120,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import brandConfig from '../../../../../brand.config.json';\n// Simple environment detection based on hostname\nconst getCurrentEnvironment = (): 'staging' | 'production' => {\n try {\n const hostname = window.location.hostname;\n if (hostname.includes('localhost') || hostname.includes('staging')) {\n return 'staging';\n }\n return 'production';\n } catch (error) {\n console.error('Error detecting environment:', error);\n return 'production'; // Sa..."
},
{
"name": "src/components/shared/utils/constants/contract.ts",
"totalCharacters": 290,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " WLDXAU: localize('Gold Basket'),\n OTC_IBEX35: localize('Spain 35'),\n OTC_SPX500: localize('US 500'),\n '1HZ15V': localize('Volatility 15 (1s) Index'),\n '1HZ30V': localize('Volatility 30 (1s) Index'),\n '1HZ90V': localize('Volatility 90 (1s) Index'),"
},
{
"name": "src/components/shared/utils/constants/error.ts",
"totalCharacters": 166,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "export const getAuthError = () => ({\n header: localize('The token is invalid'),\n description: localize('Please log in'),\n cta_label: localize('Log in'),\n});\n"
},
{
"name": "src/components/shared/utils/constants/index.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/shared/utils/contract/contract-info.ts",
"totalCharacters": 142,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " entry_spot: 2415.18,\n underlying_symbol: '1HZ100V',\n exit_spot: 2420.45,\n entry_spot_time: '2023-11-20 17:00:00',"
},
{
"name": "src/components/shared/utils/contract/contract-types.ts",
"totalCharacters": 115,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol?: string;\n exit_spot?: string | number;\n entry_spot_time?: string | number;"
},
{
"name": "src/components/shared/utils/contract/contract.tsx",
"totalCharacters": 275,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol: string;\n underlying_symbol,\n if (has_default_timeout || !tick_update_timestamp) return getAccuBarriersDefaultTimeout(underlying_symbol);\n tick_update_timestamp + getAccuBarriersDefaultTimeout(underlying_symbol) + ANIMATION_CORRECTION_TIME;"
},
{
"name": "src/components/shared/utils/contract/trade-url-params-config.ts",
"totalCharacters": 150,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const isSymbolValid = active_symbols.some(\n item => (item as any).underlying_symbol === symbol || item.symbol === symbol\n );"
},
{
"name": "src/components/shared/utils/currency/currency.ts",
"totalCharacters": 48,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "const currencies_config: TCurrenciesConfig = {};"
},
{
"name": "src/components/shared/utils/digital-options/digital-options.ts",
"totalCharacters": 134,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "export const isEuResidenceWithOnlyVRTC = () => {\n // Always return false - EU restrictions now handled by backend\n return false;"
},
{
"name": "src/components/shared/utils/helpers/active-symbols.ts",
"totalCharacters": 2611,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " // Handle both old and new field names for backward compatibility\n const getSymbolField = (item: any) => item.underlying_symbol || item.symbol;\n return active_symbols.filter(x => getSymbolField(x) === symbol)[0]\n ? !active_symbols.filter(symbol_info => getSymbolField(symbol_info) === symbol)[0].exchange_is_open\n active_symbols.find(\n symbol_info =>\n (symbol_info as any).underlying_symbol === client_fav_symbol ||\n sy..."
},
{
"name": "src/components/shared/utils/helpers/duration.ts",
"totalCharacters": 747,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " start_type?: string; // Field may not be available in API response anymore\n // Default to 'spot' if start_type is not available (field deprecated in API)\n const start_type = contract.start_type || 'spot';\n\n durations.units_display[start_type as keyof typeof durations.units_display] =\n durations.units_display[start_type as keyof typeof durations.units_display] || [];\n\n const duration_min_max = durations.min_max[start_type as keyof typeof durations.min_max];\n durations.mi..."
},
{
"name": "src/components/shared/utils/helpers/format-response.ts",
"totalCharacters": 58,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { ProfitTable, Statement } from '@deriv/api-types';"
},
{
"name": "src/components/shared/utils/helpers/logic.ts",
"totalCharacters": 119,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { AccountListResponse, TickSpotData } from '@deriv/api-types';\n symbol === contract_info.underlying_symbol &&"
},
{
"name": "src/components/shared/utils/helpers/market-underlying.ts",
"totalCharacters": 132,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " // [AI]\n const pattern = /^([A-Z]+)_((1HZ[0-9-V]+)|((CRASH|BOOM)\\d+[A-Z]?)|(OTC_[A-Z0-9]+)|R_[\\d]{2,3}|[A-Z]+)/;\n // [/AI]"
},
{
"name": "src/components/shared/utils/helpers/start-date.ts",
"totalCharacters": 233,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " // forward_starting_options field may not be available in API response anymore\n if (contract.forward_starting_options && contract.forward_starting_options.length) {\n contract.forward_starting_options.forEach(option => {"
},
{
"name": "src/components/shared/utils/routes/routes.ts",
"totalCharacters": 2041,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "type Service = 'derivCom' | 'smartTrader' | 'derivHub' | 'derivHome' | 'derivDtrader';\n derivHome: {\n staging: 'https://staging-home.deriv.com',\n production: {\n me: 'https://home.deriv.com', // No .me domain yet, using .com\n be: 'https://home.deriv.com', // No .be domain yet, using .com\n com: 'https://home.deriv.com',\n },\n },\n derivDtrader: {\n staging: 'https://staging-dtrader.deriv.com',\n production: {\n me: ..."
},
{
"name": "src/components/shared/utils/validation/index.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/components/shared/utils/validator/validator.ts",
"totalCharacters": 58,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " ? (rule.options.min?.toString() ?? '')"
},
{
"name": "src/components/shared_ui/contract-card/contract-card-items/contract-card-header.tsx",
"totalCharacters": 102,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol,\n <MarketIcon type={underlying_symbol ?? ''} size='md' />"
},
{
"name": "src/components/shared_ui/contract-card/contract-card-items/turbos-card-body.tsx",
"totalCharacters": 153,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const { bid_price, buy_price, profit, barrier, entry_spot, limit_order = {}, sell_price } = contract_info;\n {addComma(entry_spot)}"
},
{
"name": "src/components/shared_ui/contract-card/contract-card-items/vanilla-options-card-body.tsx",
"totalCharacters": 339,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const { buy_price, bid_price, entry_spot, barrier, sell_price, profit }: TContractInfo = contract_info;\n <ContractCardItem header={ENTRY_SPOT}>{entry_spot && addComma(entry_spot)}</ContractCardItem>\n <ContractCardItem header={ENTRY_SPOT}>{entry_spot && addComma(entry_spot)}</ContractCardItem>"
},
{
"name": "src/components/shared_ui/mobile-full-page-modal/mobile-full-page-modal.scss",
"totalCharacters": 280,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " background-color: var(--general-main-1);\n\n &-wrapper {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 1rem 1.6rem 1rem 0;\n }"
},
{
"name": "src/components/shared_ui/types/index.ts",
"totalCharacters": 228,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { TAccordionItem, TAccordionProps } from './accordion.types';\nimport { TDatePickerOnChangeEvent, TGetCardLables, TGetContractTypeDisplay } from './common.types';\nimport { TIconProps, TIconsManifest } from './icons.types';"
},
{
"name": "src/components/summary/summary-card.tsx",
"totalCharacters": 284,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getSymbolDisplayNameSync } from '@/utils/symbol-display-name';\n display_name={\n (contract_info as any)?.underlying_symbol\n ? getSymbolDisplayNameSync((contract_info as any).underlying_symbol)\n : ''\n }"
},
{
"name": "src/components/summary/summary-card.types.ts",
"totalCharacters": 31,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol?: string;"
},
{
"name": "src/components/trade-animation/trade-animation.tsx",
"totalCharacters": 956,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const { contract_stage, is_stop_button_visible, is_stop_button_disabled, onRunButtonClick, onStopBotClick } =\n run_panel;\n const is_unavailable_for_payment_agent = false;\n }, [is_stop_button_visible, is_stop_button_disabled]);\n // Use a fallback to dashboard if active_tab is undefined\n const safeActiveTab = typeof active_tab === 'number' ? active_tab : DBOT_TABS.DASHBOARD;\n // Map tab index to proper subpage name\n const subpage..."
},
{
"name": "src/components/transaction-details/desktop-transaction-table.tsx",
"totalCharacters": 645,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getSymbolDisplayNameSync } from '@/utils/symbol-display-name';\n message={\n data?.display_name ||\n getSymbolDisplayNameSync(data?.underlying_symbol || '')\n }\n icon={<MarketIcon type={data?.underlying_symbol} size='sm' />}\n <TableCell labe..."
},
{
"name": "src/components/transaction-details/mobile-transaction-card.tsx",
"totalCharacters": 621,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getSymbolDisplayNameSync } from '@/utils/symbol-display-name';\n message={\n transaction?.display_name ||\n getSymbolDisplayNameSync(transaction?.underlying_symbol || '')\n }\n icon={<MarketIcon type={transaction?.underlying_symbol} size='md' />}\n label={transaction?.entry_spot}\n loader={!trans..."
},
{
"name": "src/components/transaction-details/transaction-details-desktop.tsx",
"totalCharacters": 113,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " { key: 'entry_spot', label: localize('Entry spot') },\n { key: 'exit_spot', label: localize('Exit spot') },"
},
{
"name": "src/components/transaction-details/transaction-details.types.ts",
"totalCharacters": 77,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " entry_spot: string;\n exit_spot: string;\n underlying_symbol: string;"
},
{
"name": "src/components/transactions/transaction.tsx",
"totalCharacters": 1265,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getSymbolDisplayNameSync } from '@/utils/symbol-display-name';\n {contract.entry_spot && (\n <div className='transactions__popover-value'>{contract.entry_spot}</div>\n {(contract.exit_spot && contract.exit_tick_time && (\n <div className='transactions__popover-value'>{contract.exit_spot}</div>\n (contract.exit_spot && (\n <div className='transactions__popover-value'>{contract.exit_spot}</div>\n ..."
},
{
"name": "src/external/bot-skeleton/scratch/accumulators-proposal-handler.js",
"totalCharacters": 169,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol: undefined,\n const underlying_symbol = market_block?.getFieldValue('SYMBOL_LIST');\n underlying_symbol,\n underlying_symbol: symbol,"
},
{
"name": "src/external/bot-skeleton/scratch/backward-compatibility.js",
"totalCharacters": 178,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const getNodeText = n => (n?.textContent ?? n?.innerText ?? '').trim();\n const variable_name = getNodeText(el_block_child);"
},
{
"name": "src/external/bot-skeleton/scratch/blocks/Binary/Trade Definition/trade_definition_multiplier.js",
"totalCharacters": 1696,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " if (multiplier_range && multiplier_range.length > 0) {\n } else {\n // If no multiplier range available, set default fallback options\n console.warn('DEBUG: No multiplier range available, using fallback options');\n const multiplier_list_dropdown = this.getField('MULTIPLIERTYPE_LIST');\n const fallback_options = [\n ['100', '100'],\n ..."
},
{
"name": "src/external/bot-skeleton/scratch/blocks/Binary/Trade Definition/trade_definition_tradeoptions.js",
"totalCharacters": 2485,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { DURATIONS } from '../../../../../../components/shared/utils/common-data';\n const { currency } = DBotStore.instance.client;\n\n account_limits.getStakePayoutLimits(currency, undefined, this.selected_market).then(limits => {\n contracts_for\n .getDurations(this.selected_symbol, this.selected_trade_type)\n .then(durations => {\n // Use fallback if no durations received\n if (!durations || durations.length..."
},
{
"name": "src/external/bot-skeleton/scratch/dbot.js",
"totalCharacters": 2058,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " if (!top_parent_block) return;\n const market_block = top_parent_block?.getChildByType('trade_definition_market');\n contracts_for\n ?.getTradeTypeCategories?.(market, submarket, symbol)\n .then(categories => {\n const category_field = this.getField('TRADETYPECAT_LIST');\n if (category_field) {\n ..."
},
{
"name": "src/external/bot-skeleton/scratch/shared.js",
"totalCharacters": 876,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getContractTypeOptions as getContractTypeOptionsFromCommon } from '../../../components/shared/utils/common-data';\n // First try to get from config\n if (trade_type && trade_type !== 'na' && trade_type !== '') {\n const trade_types = config().opposites[trade_type.toUpperCase()];\n if (trade_types) {\n const contract_options = trade_types.map(type => Object.entries(type)[0].reverse());\n // When user selected a specific contract, only return the contra..."
},
{
"name": "src/external/bot-skeleton/services/api/account-limits.js",
"totalCharacters": 261,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getAccountLimits } from '../../../../components/shared/utils/common-data';\n\n getStakePayoutLimits(currency = 'AUD', selected_market) {\n // Use common data instead of duplicating here\n return getAccountLimits(currency, selected_market);"
},
{
"name": "src/external/bot-skeleton/services/api/active-symbols.js",
"totalCharacters": 12889,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import {\n MARKET_MAPPINGS,\n MARKET_OPTIONS,\n SUBMARKET_OPTIONS,\n SYMBOL_OPTIONS,\n TRADING_TIMES,\n} from '../../../../components/shared/utils/common-data';\n clearCache() {\n this.active_symbols = [];\n this.processed_symbols = {};\n this.is_initialised = false;\n this.init_promise = new PendingPromise();\n }\n\n // Also create chart-specific processed symbols\n // this.chart_processed_symbols = this.getProcessedSymbolsForChart();\n\n if ..."
},
{
"name": "src/external/bot-skeleton/services/api/api-base.ts",
"totalCharacters": 13906,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { tradingTimesService } from '../../../../components/shared/services/trading-times-service';\nimport { ACTIVE_SYMBOLS, generateDisplayName, MARKET_MAPPINGS } from '../../../../components/shared/utils/common-data';\n\n active_symbols: any[] = [];\n active_symbols_promise: Promise<any[] | undefined> | null = null;\n const accountType = urlParams.get('account_type');\n\n // Only save account_type when BOTH token and account_type are present\n if (oneTimeToken && accountTyp..."
},
{
"name": "src/external/bot-skeleton/services/api/chart-api.js",
"totalCharacters": 8995,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " chart_active_symbols = null; // Separate variable for chart-specific symbols\n\n // Intercept the send method to filter active_symbols responses for chart\n // this.interceptApiCalls();\n\n // Force inject symbols after a short delay to ensure api_base is ready\n // this.forceInjectSymbols();\n\n // /**\n // * Intercept API calls to filter active_symbols responses specifically for chart\n // */\n // interceptApiCalls = () => {\n // if (!th..."
},
{
"name": "src/external/bot-skeleton/services/api/contracts-for.js",
"totalCharacters": 5021,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { DURATIONS, TRADE_TYPE_CATEGORIES, TRADE_TYPES } from '../../../../components/shared/utils/common-data';\n // barrier_category field may not be available in API response anymore\n const has_matching_barrier_category =\n !c.barrier_category || c.barrier_category === barrier_category;\n // barrier_category field may not be available in API response anymore\n // const barrier_category = this.getBarrierCategoryByTradeType(..."
},
{
"name": "src/external/bot-skeleton/services/api/trading-times.js",
"totalCharacters": 3905,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { getTradingTimes, TRADING_TIMES } from '../../../../components/shared/utils/common-data';\nimport { api_base } from './api-base';\n try {\n // Check if API is available\n if (!api_base.api && !this.ws) {\n this.setTradingTimes();\n return;\n }\n const response = await (api_base.api?.send({ trading_times: last_update_date }) ||\n this.ws?.send({ trading_times: last_update_date }));\n if (respo..."
},
{
"name": "src/external/bot-skeleton/services/tradeEngine/trade/Proposal.js",
"totalCharacters": 36,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " 'underlying_symbol',"
},
{
"name": "src/external/bot-skeleton/services/tradeEngine/trade/Ticks.js",
"totalCharacters": 62,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol: this?.tradeOptions?.symbol,"
},
{
"name": "src/external/bot-skeleton/services/tradeEngine/utils/helpers.js",
"totalCharacters": 103,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " underlying_symbol: trade_option.symbol,\n underlying_symbol: trade_option.symbol,"
},
{
"name": "src/hooks/api/account/useActiveAccount.tsx",
"totalCharacters": 144,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " : addComma(parseFloat('0').toFixed(getDecimalPlaces(activeAccount.currency))), // [AI] Format zero with proper decimals"
},
{
"name": "src/hooks/auth/useOauth2.ts",
"totalCharacters": 221,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " if (handleLogout) {\n await handleLogout();\n }\n await client?.logout();\n\n // OAuth2 login is now handled by redirecting to OAuth URL\n window.location.reload();"
},
{
"name": "src/hooks/growthbook/remote_config.json",
"totalCharacters": 30,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " \"cs_chat_intercom\": false,"
},
{
"name": "src/hooks/growthbook/useRemoteConfig.ts",
"totalCharacters": 522,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "\n // Check if URL is properly configured - always use fallback instead of throwing\n if (!REMOTE_CONFIG_URL || REMOTE_CONFIG_URL === '' || REMOTE_CONFIG_URL === 'undefined') {\n console.warn('Remote Config URL not properly configured, using default fallback');\n return initData;\n\n console.warn('Remote Config Server is not reachable, using default fallback');\n return initData;\n if (enabled) {\n // Don't rethrow - just log and continue with f..."
},
{
"name": "src/hooks/useIntercom.ts",
"totalCharacters": 363,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import useRemoteConfig from './growthbook/useRemoteConfig';\n const { data } = useRemoteConfig(true);\n const { cs_chat_intercom } = data;\n const scriptStatus = useScript(cs_chat_intercom ? intercom_script : null);\n if (!cs_chat_intercom || scriptStatus !== 'ready' || !window?.DerivInterCom) return;\n }, [cs_chat_intercom, scriptStatus, token]);"
},
{
"name": "src/hooks/useLocalStorageSync.ts",
"totalCharacters": 3816,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { useEffect, useRef } from 'react';\nimport { useStore } from './useStore';\n\n/**\n * Custom hook to sync localStorage changes across tabs\n * Specifically monitors 'session_token' changes from other tabs and refreshes the page\n *\n * How it works:\n * - The 'storage' event only fires on other tabs/windows when localStorage is modified\n * - It does NOT fire on the tab that made the change\n * - This is perfect for detecting session token changes from other tabs\n * - Temporarily disables beforeun..."
},
{
"name": "src/hooks/useStoreWalletAccountsList.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": ""
},
{
"name": "src/hooks/useTrackjs.ts",
"totalCharacters": 51,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " application: 'derivatives-bot',"
},
{
"name": "src/main.tsx",
"totalCharacters": 143,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { configure } from 'mobx';\n// Configure MobX to handle multiple instances in production builds\nconfigure({ isolateGlobalState: true });\n"
},
{
"name": "src/pages/callback/callback-page.tsx",
"totalCharacters": 165,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " // Emit the InvalidToken event for handling by the application\n if (Cookies.get('logged_state') === 'true') {\n"
},
{
"name": "src/pages/chart/chart.tsx",
"totalCharacters": 12272,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { api_base } from '@/external/bot-skeleton';\nimport { ChartTitle, SmartChart } from '@deriv-com/derivatives-charts';\nimport '@deriv-com/derivatives-charts/dist/smartcharts.css';\n const [forceChartRefresh, setForceChartRefresh] = useState(0);\n\n useEffect(() => {\n // FORCE INJECT 1s volatility indices directly into api_base.active_symbols\n if (api_base.active_symbols && Array.isArray(api_base.active_symbols)) {\n let symbols = [...api_base.active_symbols];\n\n ..."
},
{
"name": "src/pages/chart/toolbar-widgets.tsx",
"totalCharacters": 251,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { ChartMode, DrawTools, Share, StudyLegend, ToolbarWidget, Views } from '@deriv-com/derivatives-charts';\n const validPosition = position === 'top' || position === 'bottom' ? position : 'top';\n\n <ToolbarWidget position={validPosition}>"
},
{
"name": "src/pages/dashboard/info-panel.tsx",
"totalCharacters": 137,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "\n if (is_info_panel_visible) {\n setIsTourOpen(true);\n setIsTourOpen(false);\n }, [is_info_panel_visible]);"
},
{
"name": "src/pages/dashboard/intro-card.tsx",
"totalCharacters": 109,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " {content?.map(text => (\n <p key={`sidebar-tour${text}`}>{text}</p>\n ))}"
},
{
"name": "src/pages/endpoint/__tests__/endpoint.spec.tsx",
"totalCharacters": 91,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " expect(localStorage.getItem('config.server_url') ?? '').toBe('demov2.derivws.com');"
},
{
"name": "src/pages/main/main.tsx",
"totalCharacters": 94,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const handleLoginGeneration = () => {\n window.location.replace(generateOAuthURL());"
},
{
"name": "src/pages/tutorials/dbot-tours/common/tour-start-dialog.tsx",
"totalCharacters": 138,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " if (is_tour_dialog_visible) {\n setIsTourOpen(true);\n setIsTourOpen(false);\n }, [is_tour_dialog_visible]);"
},
{
"name": "src/stores/app-store.ts",
"totalCharacters": 228,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { action, makeObservable, reaction } from 'mobx';\n\n\n const { ui } = this.core;\n\n\n // Country code no longer available from removed get_settings API\n // Previously set up residence change reaction here"
},
{
"name": "src/stores/chart-store.ts",
"totalCharacters": 6492,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const symbol =\n market_block?.getFieldValue('SYMBOL_LIST') ??\n (api_base?.active_symbols[0]\n ? (api_base.active_symbols[0] as any).underlying_symbol || (api_base.active_symbols[0] as any).symbol\n : undefined);\n getMarketsOrder = (active_symbols: any[]) => {\n if (!active_symbols || !Array.isArray(active_symbols)) {\n return [synthetic_index];\n }\n\n\n // Define the exact order we want for volatility indices..."
},
{
"name": "src/stores/client-store.ts",
"totalCharacters": 549,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { isEmptyObject } from '@/components/shared';\nimport { isMultipliersOnly, isOptionsBlocked } from '@/components/shared/common/utility';\nimport type { TAuthData } from '@/types/api-types';\nimport type { Balance } from '@deriv/api-types';\n\n this.authDataSubscription = authData$.subscribe(() => {});\n\n\n\n\n\n\n\n return false;\n // Always return false - EU restrictions now handled by backend\n return false;\n return false;\n return this.is_virtual ? this.is_eu..."
},
{
"name": "src/stores/root-store.ts",
"totalCharacters": 0,
"aiCharacters": 0,
"percentage": 0,
"status": "only-deletions",
"hasAddedContent": false,
"addedContent": "\n"
},
{
"name": "src/stores/run-panel-store.ts",
"totalCharacters": 99,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const { summary_card } = this.root_store;\n const { summary_card } = this.root_store;"
},
{
"name": "src/stores/transactions-store.ts",
"totalCharacters": 518,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " const contract = data as TContractInfo;\n const profit = Number(contract.profit) || 0;\n const is_completed = contract.is_completed || false;\n const buy_price = Number(contract.buy_price) || 0;\n const payout = Number(contract.payout) || Number(contract.bid_price) || 0;\n const bid_price = Number(contract.bid_price) || 0;\n\n entry_tick: data.entry_spot,\n exit_tick: (data as any).exit_spot ..."
},
{
"name": "src/types/api-types.ts",
"totalCharacters": 81,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "\n\n\n\n\n\n\n\n\n\n\n\n balance: number;\n\n local_currencies: Record<string, unknown>;\n"
},
{
"name": "src/types/derivatives-charts.d.ts",
"totalCharacters": 2164,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "declare module '@deriv-com/derivatives-charts' {\n import { ComponentType, ReactNode } from 'react';\n\n export interface SmartChartProps {\n id?: string;\n barriers?: any[];\n showLastDigitStats?: boolean;\n chartControlsWidgets?: any;\n enabledChartFooter?: boolean;\n stateChangeListener?: (state: string, option?: any) => void;\n chartStatusListener?: (status: boolean) => void;\n toolbarWidget?: () => ReactNode;\n chartType?: string;\n ..."
},
{
"name": "src/utils/analytics/index.ts",
"totalCharacters": 1795,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " try {\n // Get account type from localStorage, fallback to demo if missing\n const savedAccountType = localStorage.getItem('account_type');\n const account_type = savedAccountType || 'demo';\n\n // Only try to fetch remote config if URL is properly configured\n const hasValidRemoteConfigUrl =\n process.env.REMOTE_CONFIG_URL &&\n process.env.REMOTE_CONFIG_URL !== '' &&\n process.env.REMOTE_CONFIG_URL !== 'undefined';\n\n let flag..."
},
{
"name": "src/utils/auth-utils.ts",
"totalCharacters": 221,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "export const clearAuthData = () => {\n localStorage.removeItem('account_type'); // Clear account type when clearing auth data\n localStorage.removeItem('clientAccounts');\n localStorage.removeItem('callback_token');"
},
{
"name": "src/utils/download.ts",
"totalCharacters": 732,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": " display_name?: string;\n underlying_symbol?: string;\n transaction_ids?: { buy: string; sell: string };\n barrier?: string;\n date_start?: string;\n purchase_time?: string;\n entry_spot?: string;\n entry_tick_time?: string;\n entry_spot_time?: string;\n exit_spot?: string;\n exit_tick_time?: string;\n exit_spot_time?: string;\n buy_price?: string | number;\n profit?: string | number;\n // Additional fields from new API\n contract_id?: number;\n contract_type?:..."
},
{
"name": "src/utils/mock/contract.ts",
"totalCharacters": 154,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "export const mock_contract = {\n underlying_symbol: 'EURUSD',\n entry_spot: 1.2345,\n exit_spot: 1.6789,\n entry_spot_time: '2023-12-01 17:00:00',"
},
{
"name": "src/utils/remote_config.json",
"totalCharacters": 237,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "{\n \"cs_chat_livechat\": true,\n \"cs_chat_whatsapp\": true,\n \"marketing_growthbook\": true,\n \"passkeys\": true,\n \"tracking_GTM\": true,\n \"tracking_datadog\": true,\n \"tracking_hotjar\": true,\n \"tracking_rudderstack\": true\n}"
},
{
"name": "src/utils/symbol-display-name.ts",
"totalCharacters": 3688,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "import { tradingTimesService } from '@/components/shared/services/trading-times-service';\n\n/**\n * Get display name for a symbol from underlying_symbol\n * @param underlying_symbol - The underlying symbol code (e.g., \"1HZ100V\", \"frxEURUSD\")\n * @returns Promise<string> - The display name (e.g., \"Volatility 100 (1s) Index\", \"EUR/USD\")\n */\nexport const getSymbolDisplayName = async (underlying_symbol: string): Promise<string> => {\n if (!underlying_symbol) {\n return '';\n }\n\n try {\n ..."
},
{
"name": "vercel.dr.json",
"totalCharacters": 1,
"aiCharacters": 0,
"percentage": 0,
"status": "modified",
"hasAddedContent": true,
"addedContent": "}"
}
]
}🚀 Analysis powered by ShiftAI • Analyzes only PR changes, not entire files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🤖 Auto-generated PR
This PR was automatically created by ShiftAI CLI.
fix: legacy conversion