├── .nvmrc
├── public
├── robots.txt
├── locales
│ ├── en
│ │ └── translation.json
│ └── ru
│ │ └── translation.json
├── favicon.ico
├── icon-192.png
├── icon-512.png
├── og-image.png
├── apple-touch-icon.png
├── assets
│ ├── images
│ │ ├── tonapi.webp
│ │ ├── invoices.webp
│ │ ├── tonapi-m.webp
│ │ ├── invoices-m.webp
│ │ ├── partnerships.webp
│ │ ├── partnerships-m.webp
│ │ ├── tonkeeper-NFT.webp
│ │ ├── tonkeeper-swap.webp
│ │ ├── tonkeeper-browser.webp
│ │ ├── tonkeeper-on-ramp.webp
│ │ ├── tonviewer-pages-m.webp
│ │ ├── tonviewer-pages.webp
│ │ ├── tonviewer-widget.webp
│ │ ├── tonkeeper-activity.webp
│ │ ├── tonviewer-widget-m.webp
│ │ └── tonkeeper-price-graph.webp
│ └── videos
│ │ └── find-user-id.webm
├── tonconnect-manifest.json
├── manifest.json
└── icon.svg
├── src
├── features
│ ├── airdrop
│ │ ├── index.ts
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ └── AirdropMetadata.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── dashboard
│ │ ├── index.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── marketing
│ │ ├── index.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── nft
│ │ ├── ui
│ │ │ ├── index.ts
│ │ │ └── cnft
│ │ │ │ └── index.ts
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ └── CnftCollection.ts
│ │ └── index.ts
│ ├── jetton
│ │ ├── ui
│ │ │ ├── index.ts
│ │ │ └── minter
│ │ │ │ └── index.ts
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ └── JettonMetadata.ts
│ │ └── index.ts
│ ├── tonapi
│ │ ├── liteproxy
│ │ │ ├── index.ts
│ │ │ └── ui
│ │ │ │ └── index.ts
│ │ ├── api-keys
│ │ │ ├── model
│ │ │ │ ├── index.ts
│ │ │ │ └── interfaces
│ │ │ │ │ ├── create-api-key-form.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── edit-api-key-form.ts
│ │ │ │ │ └── api-key.ts
│ │ │ ├── index.ts
│ │ │ └── ui
│ │ │ │ └── index.ts
│ │ ├── pricing
│ │ │ ├── model
│ │ │ │ ├── index.ts
│ │ │ │ └── interfaces
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── ton-api-payment.ts
│ │ │ │ │ ├── ton-api-seleced-tier.ts
│ │ │ │ │ └── ton-api-tier.ts
│ │ │ ├── index.ts
│ │ │ └── ui
│ │ │ │ └── index.ts
│ │ ├── statistics
│ │ │ ├── model
│ │ │ │ ├── index.ts
│ │ │ │ └── interfaces
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── ton-api-stats.ts
│ │ │ ├── index.ts
│ │ │ └── ui
│ │ │ │ └── index.ts
│ │ ├── webhooks
│ │ │ ├── index.ts
│ │ │ ├── model
│ │ │ │ ├── index.ts
│ │ │ │ └── interfaces
│ │ │ │ │ ├── create-webhooks-form.ts
│ │ │ │ │ ├── add-subscriptions-form.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── edit-webhooks-form.ts
│ │ │ │ │ └── webhooks.ts
│ │ │ └── ui
│ │ │ │ └── index.ts
│ │ └── index.ts
│ ├── faucet
│ │ ├── index.ts
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ ├── request-faucet-form.ts
│ │ │ │ └── faucet-payment.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── analytics
│ │ ├── index.ts
│ │ ├── model
│ │ │ ├── interfaces
│ │ │ │ ├── charts
│ │ │ │ │ ├── pie-chart-options.ts
│ │ │ │ │ ├── area-chart-options.ts
│ │ │ │ │ ├── bar-chart-options.ts
│ │ │ │ │ ├── line-chart-options.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── analytics-charts-config.ts
│ │ │ │ ├── gpt-generation-pricing.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── analytics-payment.ts
│ │ │ │ ├── analytics-tables-schema.ts
│ │ │ │ ├── analytics-dashboard-widget.ts
│ │ │ │ └── analytics-graph-query.ts
│ │ │ ├── ANALYTICS_LINKS.ts
│ │ │ └── index.ts
│ │ └── ui
│ │ │ ├── query-results
│ │ │ ├── charts
│ │ │ │ ├── index.ts
│ │ │ │ └── ChartCard.tsx
│ │ │ ├── analytics-table-context.ts
│ │ │ └── analytics-query-ui-utils.ts
│ │ │ ├── history
│ │ │ ├── analytics-history-table-context.ts
│ │ │ ├── TestnetBadge.tsx
│ │ │ ├── FilterQueryByRepetition.tsx
│ │ │ └── AnalyticsQueryStatusBadge.tsx
│ │ │ ├── index.ts
│ │ │ └── utils.ts
│ ├── invoices
│ │ ├── index.ts
│ │ ├── models
│ │ │ ├── interfaces
│ │ │ │ ├── invoices-webhook.ts
│ │ │ │ ├── invoices-project-form.ts
│ │ │ │ ├── invoice-form.ts
│ │ │ │ ├── invoices-app.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── invoices-statistics.ts
│ │ │ ├── index.ts
│ │ │ └── INVOICES_LINKS.ts
│ │ └── ui
│ │ │ ├── table
│ │ │ ├── invoices-table-context.ts
│ │ │ ├── index.ts
│ │ │ ├── RefreshInvoicesTableButton.tsx
│ │ │ ├── FilterInvoiceByOverpayment.tsx
│ │ │ └── InvoiceOverpayment.tsx
│ │ │ ├── ViewInvoiceModal.tsx
│ │ │ └── index.ts
│ ├── app-messages
│ │ ├── index.ts
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ ├── interfaces
│ │ │ │ ├── app-messages-stats.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── app-messages-package.ts
│ │ │ │ └── app-messages-payment.ts
│ │ │ └── APP_MESSAGES_LINKS.ts
│ │ └── ui
│ │ │ ├── index.ts
│ │ │ └── MessagesPaymentConfirmationModal.tsx
│ ├── feedback
│ │ └── interfaces
│ │ │ └── form.ts
│ ├── stores.ts
│ └── index.ts
├── shared
│ ├── lib
│ │ ├── form
│ │ │ ├── index.ts
│ │ │ └── radio.ts
│ │ ├── number.ts
│ │ ├── currency
│ │ │ ├── FIAT_CURRENCY.ts
│ │ │ ├── CRYPTO_CURRENCY.ts
│ │ │ ├── CURRENCY.ts
│ │ │ ├── usd-currency-amount.ts
│ │ │ ├── index.ts
│ │ │ ├── ton-currency-amount.ts
│ │ │ └── currency-amount.ts
│ │ ├── react
│ │ │ ├── index.ts
│ │ │ ├── elements.ts
│ │ │ └── merge-refs.ts
│ │ ├── validators
│ │ │ ├── masks
│ │ │ │ ├── index.ts
│ │ │ │ ├── ton-mask.ts
│ │ │ │ └── number-mask.ts
│ │ │ ├── index.ts
│ │ │ ├── number-validator.ts
│ │ │ └── address-validator.ts
│ │ ├── format
│ │ │ ├── index.ts
│ │ │ └── address.ts
│ │ ├── env.ts
│ │ ├── mobx
│ │ │ ├── create-effect.ts
│ │ │ ├── create-reaction.ts
│ │ │ ├── create-immediate-reaction.ts
│ │ │ ├── await-value-resolved.ts
│ │ │ ├── index.ts
│ │ │ └── create-async-action.ts
│ │ ├── blockchain
│ │ │ ├── index.ts
│ │ │ ├── network.ts
│ │ │ ├── wei.ts
│ │ │ ├── address.ts
│ │ │ └── explorer.ts
│ │ ├── file.ts
│ │ ├── address.ts
│ │ ├── object.ts
│ │ ├── url.ts
│ │ ├── index.ts
│ │ ├── copy-to-clipboard.ts
│ │ └── types.ts
│ ├── stores
│ │ ├── index.ts
│ │ └── app.store.ts
│ ├── ui
│ │ ├── input
│ │ │ ├── index.ts
│ │ │ └── eject-register-props.ts
│ │ ├── typography
│ │ │ ├── h3
│ │ │ │ ├── index.tsx
│ │ │ │ ├── h3.tsx
│ │ │ │ └── h3-thin.tsx
│ │ │ ├── index.ts
│ │ │ ├── h4
│ │ │ │ └── index.tsx
│ │ │ ├── h1
│ │ │ │ └── index.tsx
│ │ │ └── h2
│ │ │ │ └── index.tsx
│ │ ├── Span.tsx
│ │ ├── checkbox
│ │ │ └── index.ts
│ │ ├── tooltip
│ │ │ ├── index.ts
│ │ │ └── InfoTooltip.tsx
│ │ ├── code-area
│ │ │ ├── index.tsx
│ │ │ ├── CodeAreaFooter.tsx
│ │ │ └── CodeAreaGroup.tsx
│ │ ├── textarea
│ │ │ ├── index.ts
│ │ │ ├── textarea-group-context.ts
│ │ │ └── TextareaRight.tsx
│ │ ├── options-input
│ │ │ ├── index.ts
│ │ │ └── context.ts
│ │ ├── dropdown-menu
│ │ │ ├── index.tsx
│ │ │ └── DropDownMenu.tsx
│ │ ├── MenuButtonDefault.tsx
│ │ ├── MenuButtonIcon.tsx
│ │ ├── image
│ │ │ └── index.tsx
│ │ ├── Pad.tsx
│ │ ├── ButtonLink.tsx
│ │ ├── Overlay.tsx
│ │ ├── icons
│ │ │ ├── DocsLogo32.tsx
│ │ │ ├── ChevronRightIcon16.tsx
│ │ │ ├── PlusIcon16.tsx
│ │ │ ├── ArrowIcon.tsx
│ │ │ ├── DoneIcon16.tsx
│ │ │ ├── CancelIcon24.tsx
│ │ │ ├── ConsoleDocsIcon32.tsx
│ │ │ ├── VerticalDotsIcon16.tsx
│ │ │ └── TickIcon.tsx
│ │ ├── index.ts
│ │ ├── IconButton.tsx
│ │ ├── async-input
│ │ │ └── index.tsx
│ │ └── StatusIndicator.tsx
│ ├── constants
│ │ ├── index.ts
│ │ └── EXTERNAL_LINKS.ts
│ ├── api
│ │ ├── index.ts
│ │ ├── airdrop-api.ts
│ │ ├── streaming-api.ts
│ │ ├── tonconsole.ts
│ │ └── tonapi.ts
│ ├── index.ts
│ ├── hooks
│ │ ├── usePrevious.ts
│ │ ├── useIntervalUpdate.ts
│ │ ├── useDebounce.ts
│ │ ├── index.ts
│ │ ├── useIsTextTruncated.ts
│ │ ├── useSearchParams.ts
│ │ ├── useCountdown.ts
│ │ └── useCountup.ts
│ └── components
│ │ └── StoresInitializer.tsx
├── vite-env.d.ts
├── entities
│ ├── user
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ └── user.ts
│ │ ├── index.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── balance
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ ├── portfolio.ts
│ │ │ │ └── refill.ts
│ │ ├── index.ts
│ │ └── ui
│ │ │ ├── index.ts
│ │ │ └── RefillModal.tsx
│ ├── project
│ │ ├── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ │ ├── create-project-form-values.ts
│ │ │ │ ├── add-project-participant-form-values.ts
│ │ │ │ ├── update-project-form-values.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── project.ts
│ │ ├── index.ts
│ │ └── ui
│ │ │ ├── index.ts
│ │ │ └── DeleteProjectConfirmation.tsx
│ ├── service
│ │ ├── index.ts
│ │ └── SERVICES.ts
│ ├── dapp
│ │ ├── index.ts
│ │ ├── model
│ │ │ ├── interfaces
│ │ │ │ ├── create-dapp-form.ts
│ │ │ │ ├── index.ts
│ │ │ │ ├── dapp.ts
│ │ │ │ └── pending-dapp.ts
│ │ │ ├── index.ts
│ │ │ └── links.ts
│ │ └── ui
│ │ │ ├── index.ts
│ │ │ └── CurrentDappCard.tsx
│ ├── rates
│ │ ├── index.ts
│ │ ├── ui
│ │ │ └── index.ts
│ │ └── model
│ │ │ ├── interfaces
│ │ │ ├── index.ts
│ │ │ └── rates.ts
│ │ │ ├── index.ts
│ │ │ └── rates.api.ts
│ ├── index.ts
│ └── stats
│ │ └── Card.tsx
├── pages
│ ├── layouts
│ │ ├── index.ts
│ │ ├── Layout.tsx
│ │ ├── LayoutSolid.tsx
│ │ └── ui
│ │ │ └── ErrorPage.tsx
│ ├── subscriptions
│ │ └── index.tsx
│ ├── nft
│ │ └── index.tsx
│ ├── settings
│ │ └── index.tsx
│ ├── app-messages
│ │ └── index.tsx
│ ├── tonapi
│ │ ├── webhooks
│ │ │ ├── EmptyWebhooks.tsx
│ │ │ ├── view
│ │ │ │ └── EmptySubscriptions.tsx
│ │ │ └── SelectPlanFirstly.tsx
│ │ ├── pricing
│ │ │ └── index.tsx
│ │ ├── api-keys
│ │ │ ├── SelectPlanFirstly.tsx
│ │ │ └── EmptyApiKeys.tsx
│ │ └── liteservers
│ │ │ └── EmptyLiteservers.tsx
│ ├── jetton
│ │ ├── airdrops
│ │ │ └── create
│ │ │ │ └── InfoComponent.tsx
│ │ ├── index.tsx
│ │ └── minter
│ │ │ └── index.tsx
│ ├── dashboard
│ │ └── index.tsx
│ ├── invoices
│ │ └── dashboard
│ │ │ └── index.tsx
│ └── analytics
│ │ └── graph
│ │ └── GraphHome.tsx
├── widgets
│ ├── billing
│ │ ├── index.ts
│ │ ├── ui
│ │ │ ├── index.ts
│ │ │ └── BillingHistoryTableContext.ts
│ │ └── model
│ │ │ ├── index.ts
│ │ │ └── interfaces
│ │ │ ├── index.ts
│ │ │ ├── payment.ts
│ │ │ └── billing-history.ts
│ ├── subscriptions
│ │ ├── index.ts
│ │ ├── model
│ │ │ ├── interfaces
│ │ │ │ ├── index.ts
│ │ │ │ └── subscription.ts
│ │ │ └── index.ts
│ │ └── ui
│ │ │ └── index.ts
│ ├── index.ts
│ ├── header
│ │ ├── ui
│ │ │ ├── logo
│ │ │ │ └── index.tsx
│ │ │ └── DocumentationButton.tsx
│ │ └── index.tsx
│ └── footer
│ │ └── index.tsx
├── app
│ ├── providers
│ │ ├── with-chakra
│ │ │ ├── theme
│ │ │ │ ├── components
│ │ │ │ │ ├── input
│ │ │ │ │ │ ├── defaultProps.ts
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ ├── sizes.ts
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── variants.ts
│ │ │ │ │ ├── textarea
│ │ │ │ │ │ ├── defaultProps.ts
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── variants.ts
│ │ │ │ │ ├── card
│ │ │ │ │ │ ├── defaultProps.ts
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── variants.ts
│ │ │ │ │ ├── text
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── button
│ │ │ │ │ │ ├── defaultProps.ts
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ ├── sizes.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── divider
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── heading
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── code
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── link
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── badge
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ ├── form
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ ├── menu
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ ├── radio
│ │ │ │ │ │ ├── variants.ts
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── skeleton
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── variants.ts
│ │ │ │ │ ├── tooltip
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ ├── checkbox
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── parts.ts
│ │ │ │ │ ├── popover
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── baseStyle.ts
│ │ │ │ │ │ └── parts.ts
│ │ │ │ │ ├── form-error
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ ├── modal
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ ├── sizes.ts
│ │ │ │ │ │ ├── defaultProps.ts
│ │ │ │ │ │ └── index.ts
│ │ │ │ │ ├── table
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ ├── tabs
│ │ │ │ │ │ ├── parts.ts
│ │ │ │ │ │ ├── sizes.ts
│ │ │ │ │ │ ├── index.ts
│ │ │ │ │ │ ├── variants.ts
│ │ │ │ │ │ └── baseStyle.ts
│ │ │ │ │ └── index.ts
│ │ │ │ ├── foundations
│ │ │ │ │ ├── borders.ts
│ │ │ │ │ ├── shadows.ts
│ │ │ │ │ ├── radius.ts
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── spacing.ts
│ │ │ │ │ └── layerStyles.ts
│ │ │ │ ├── typography
│ │ │ │ │ ├── index.ts
│ │ │ │ │ └── fonts.ts
│ │ │ │ ├── breakpoints
│ │ │ │ │ └── breakpoints.ts
│ │ │ │ ├── index.ts
│ │ │ │ └── global-styles.ts
│ │ │ └── index.tsx
│ │ ├── with-mobx.ts
│ │ ├── with-router.tsx
│ │ ├── index.ts
│ │ ├── with-i18.ts
│ │ └── with-ton-connect-ui.tsx
│ └── index.tsx
├── processes
│ ├── index.ts
│ └── ApplyQueryParams.tsx
└── main.tsx
├── .lintstagedrc.cjs
├── .husky
└── pre-commit
├── tsconfig.vite.json
├── vitest.config.ts
├── tests
├── app
│ └── app.spec.tsx
└── setup.ts
├── .prettierrc.json
├── .gitignore
├── tsconfig.test.json
├── .env.production
├── scripts
├── swagger.ts
├── airdrop.ts
├── airdrop2.ts
└── webhooks.ts
├── .env.staging
├── .env.staging2
├── .env.development
├── tsconfig.json
├── patches
└── ton-core+0.49.1.patch
└── README.md
/.nvmrc:
--------------------------------------------------------------------------------
1 | v18.1.0
2 |
--------------------------------------------------------------------------------
/public/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow:
3 |
--------------------------------------------------------------------------------
/src/features/airdrop/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 |
--------------------------------------------------------------------------------
/src/features/dashboard/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 |
--------------------------------------------------------------------------------
/src/features/marketing/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 |
--------------------------------------------------------------------------------
/src/features/nft/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from './cnft';
2 |
--------------------------------------------------------------------------------
/src/shared/lib/form/index.ts:
--------------------------------------------------------------------------------
1 | export * from './radio';
2 |
--------------------------------------------------------------------------------
/src/features/jetton/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from './minter';
2 |
--------------------------------------------------------------------------------
/src/shared/stores/index.ts:
--------------------------------------------------------------------------------
1 | export * from './root.store';
2 |
--------------------------------------------------------------------------------
/src/vite-env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 |
--------------------------------------------------------------------------------
/public/locales/en/translation.json:
--------------------------------------------------------------------------------
1 | {
2 | "app": "App"
3 | }
4 |
--------------------------------------------------------------------------------
/src/entities/user/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 |
--------------------------------------------------------------------------------
/src/features/nft/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './cnft.store';
2 |
--------------------------------------------------------------------------------
/src/features/tonapi/liteproxy/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 |
--------------------------------------------------------------------------------
/src/pages/layouts/index.ts:
--------------------------------------------------------------------------------
1 | export { Layout } from './Layout';
2 |
--------------------------------------------------------------------------------
/public/locales/ru/translation.json:
--------------------------------------------------------------------------------
1 | {
2 | "app": "Приложение"
3 | }
4 |
--------------------------------------------------------------------------------
/src/entities/balance/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 |
--------------------------------------------------------------------------------
/src/entities/project/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 |
--------------------------------------------------------------------------------
/src/entities/service/index.ts:
--------------------------------------------------------------------------------
1 | export { SERVICE } from './SERVICES';
2 |
--------------------------------------------------------------------------------
/src/features/jetton/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './jetton.store';
2 |
--------------------------------------------------------------------------------
/src/shared/ui/input/index.ts:
--------------------------------------------------------------------------------
1 | export * from './eject-register-props';
2 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 |
--------------------------------------------------------------------------------
/src/entities/dapp/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './model';
3 |
--------------------------------------------------------------------------------
/src/entities/rates/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/entities/user/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/entities/user/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { User } from './user';
2 |
--------------------------------------------------------------------------------
/src/entities/user/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { TgUserButton } from './TgUserButton';
2 |
--------------------------------------------------------------------------------
/src/features/faucet/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/features/jetton/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/features/nft/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './model';
3 |
--------------------------------------------------------------------------------
/src/features/tonapi/statistics/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 |
--------------------------------------------------------------------------------
/src/widgets/billing/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/entities/balance/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './model';
3 |
--------------------------------------------------------------------------------
/src/entities/project/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/features/analytics/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/features/invoices/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './models';
3 |
--------------------------------------------------------------------------------
/src/shared/constants/index.ts:
--------------------------------------------------------------------------------
1 | export { EXTERNAL_LINKS } from './EXTERNAL_LINKS';
2 |
--------------------------------------------------------------------------------
/.lintstagedrc.cjs:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | '*.{ts,js,tsx,jsx}': 'eslint ./ --fix'
3 | }
4 |
--------------------------------------------------------------------------------
/public/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/favicon.ico
--------------------------------------------------------------------------------
/src/entities/rates/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CurrencyRate } from './CurrencyRate';
2 |
--------------------------------------------------------------------------------
/src/features/app-messages/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './model';
3 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './model';
3 |
--------------------------------------------------------------------------------
/src/shared/lib/number.ts:
--------------------------------------------------------------------------------
1 | export const mod = (n: number, m: number) => ((n % m) + m) % m;
2 |
--------------------------------------------------------------------------------
/src/widgets/subscriptions/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/public/icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/icon-192.png
--------------------------------------------------------------------------------
/public/icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/icon-512.png
--------------------------------------------------------------------------------
/public/og-image.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/og-image.png
--------------------------------------------------------------------------------
/src/entities/rates/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Rates, Rates$ } from './rates';
2 |
--------------------------------------------------------------------------------
/src/features/tonapi/statistics/index.ts:
--------------------------------------------------------------------------------
1 | export * from './model';
2 | export * from './ui';
3 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/FIAT_CURRENCY.ts:
--------------------------------------------------------------------------------
1 | export enum FIAT_CURRENCY {
2 | USD = 'USD'
3 | }
4 |
--------------------------------------------------------------------------------
/src/shared/lib/react/index.ts:
--------------------------------------------------------------------------------
1 | export * from './merge-refs';
2 | export * from './elements';
3 |
--------------------------------------------------------------------------------
/src/features/dashboard/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as DashboardCardsList } from './DashboardCardsList';
2 |
--------------------------------------------------------------------------------
/src/shared/lib/validators/masks/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ton-mask';
2 | export * from './number-mask';
3 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/h3/index.tsx:
--------------------------------------------------------------------------------
1 | export { H3 } from './h3';
2 | export { H3Thin } from './h3-thin';
3 |
--------------------------------------------------------------------------------
/src/widgets/billing/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as BillingHistoryTable } from './BillingHistoryTable';
2 |
--------------------------------------------------------------------------------
/src/widgets/subscriptions/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Subscription } from './subscription';
2 |
--------------------------------------------------------------------------------
/public/apple-touch-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/apple-touch-icon.png
--------------------------------------------------------------------------------
/src/features/airdrop/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './airdrop.store';
2 | export * from './airdrops.store';
3 |
--------------------------------------------------------------------------------
/src/features/airdrop/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from './AirdropForm';
2 | export * from './AirdropsHistoryTable';
3 |
--------------------------------------------------------------------------------
/src/features/tonapi/statistics/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { TonApiStats } from './ton-api-stats';
2 |
--------------------------------------------------------------------------------
/src/shared/ui/Span.tsx:
--------------------------------------------------------------------------------
1 | import { chakra } from '@chakra-ui/react';
2 |
3 | export const Span = chakra.span;
4 |
--------------------------------------------------------------------------------
/src/widgets/subscriptions/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as SubscriptionsTable } from './SubscriptionsTable';
2 |
--------------------------------------------------------------------------------
/src/entities/rates/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 | export { ratesStore } from './rates.store';
3 |
--------------------------------------------------------------------------------
/src/features/faucet/model/index.ts:
--------------------------------------------------------------------------------
1 | export { faucetStore } from './faucet.store';
2 | export * from './interfaces';
3 |
--------------------------------------------------------------------------------
/public/assets/images/tonapi.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonapi.webp
--------------------------------------------------------------------------------
/src/shared/lib/format/index.ts:
--------------------------------------------------------------------------------
1 | export * from './date';
2 | export * from './number';
3 | export * from './address';
4 |
--------------------------------------------------------------------------------
/src/widgets/billing/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 | export { billingStore } from './billing.store';
3 |
--------------------------------------------------------------------------------
/public/assets/images/invoices.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/invoices.webp
--------------------------------------------------------------------------------
/public/assets/images/tonapi-m.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonapi-m.webp
--------------------------------------------------------------------------------
/src/shared/api/index.ts:
--------------------------------------------------------------------------------
1 | export * from './api.generated';
2 | export * from './tonapi';
3 | export * from './tonconsole';
4 |
--------------------------------------------------------------------------------
/public/assets/images/invoices-m.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/invoices-m.webp
--------------------------------------------------------------------------------
/public/assets/images/partnerships.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/partnerships.webp
--------------------------------------------------------------------------------
/public/assets/videos/find-user-id.webm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/videos/find-user-id.webm
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/input/defaultProps.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | variant: 'primary'
3 | } as const;
4 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/foundations/borders.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | none: 0,
3 | '1px': '1px solid'
4 | };
5 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/charts/pie-chart-options.ts:
--------------------------------------------------------------------------------
1 | export interface PieChartOptions {
2 | type: 'pie';
3 | }
4 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 | export { webhooksStore } from './webhooks.store';
3 |
--------------------------------------------------------------------------------
/src/shared/lib/env.ts:
--------------------------------------------------------------------------------
1 | export function isDevelopmentMode(): boolean {
2 | return import.meta.env.MODE === 'development';
3 | }
4 |
--------------------------------------------------------------------------------
/public/assets/images/partnerships-m.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/partnerships-m.webp
--------------------------------------------------------------------------------
/public/assets/images/tonkeeper-NFT.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonkeeper-NFT.webp
--------------------------------------------------------------------------------
/public/assets/images/tonkeeper-swap.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonkeeper-swap.webp
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/typography/index.ts:
--------------------------------------------------------------------------------
1 | import fonts from './fonts';
2 |
3 | export default {
4 | fonts
5 | };
6 |
--------------------------------------------------------------------------------
/src/shared/ui/checkbox/index.ts:
--------------------------------------------------------------------------------
1 | export { RadioCard } from './RadioCard';
2 | export { ejectRadioProps } from './eject-radio-props';
3 |
--------------------------------------------------------------------------------
/src/shared/ui/tooltip/index.ts:
--------------------------------------------------------------------------------
1 | export { InfoTooltip } from './InfoTooltip';
2 | export { TooltipHoverable } from './TooltipHoverable';
3 |
--------------------------------------------------------------------------------
/src/widgets/subscriptions/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 | export { subscriptionsStore } from './subscriptions.store';
3 |
--------------------------------------------------------------------------------
/public/assets/images/tonkeeper-browser.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonkeeper-browser.webp
--------------------------------------------------------------------------------
/public/assets/images/tonkeeper-on-ramp.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonkeeper-on-ramp.webp
--------------------------------------------------------------------------------
/public/assets/images/tonviewer-pages-m.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonviewer-pages-m.webp
--------------------------------------------------------------------------------
/public/assets/images/tonviewer-pages.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonviewer-pages.webp
--------------------------------------------------------------------------------
/public/assets/images/tonviewer-widget.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonviewer-widget.webp
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/foundations/shadows.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | dropdown: '0px 4px 16px rgba(0, 0, 0, 0.12);'
3 | };
4 |
--------------------------------------------------------------------------------
/src/entities/balance/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Refill } from './refill';
2 | export type { Portfolio } from './portfolio';
3 |
--------------------------------------------------------------------------------
/public/assets/images/tonkeeper-activity.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonkeeper-activity.webp
--------------------------------------------------------------------------------
/public/assets/images/tonviewer-widget-m.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonviewer-widget-m.webp
--------------------------------------------------------------------------------
/src/features/invoices/models/interfaces/invoices-webhook.ts:
--------------------------------------------------------------------------------
1 | export interface InvoicesWebhook {
2 | id: string;
3 | value: string;
4 | }
5 |
--------------------------------------------------------------------------------
/src/features/marketing/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { FeatureCard } from './FeatureCard';
2 | export { default as FeaturesList } from './FeaturesList';
3 |
--------------------------------------------------------------------------------
/src/shared/lib/validators/index.ts:
--------------------------------------------------------------------------------
1 | export * from './number-validator';
2 | export * from './address-validator';
3 | export * from './masks';
4 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname -- "$0")/_/husky.sh"
3 |
4 | npx lint-staged --config .lintstagedrc.cjs
5 | npx tsc --noEmit
6 |
--------------------------------------------------------------------------------
/public/assets/images/tonkeeper-price-graph.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tonkeeper/ton-console/HEAD/public/assets/images/tonkeeper-price-graph.webp
--------------------------------------------------------------------------------
/src/features/nft/ui/cnft/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CNFTAddModal } from './CNFTAddModal';
2 | export { default as CNFTTable } from './CNFTTable';
3 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/textarea/defaultProps.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | variant: 'primary',
3 | size: 'md'
4 | } as const;
5 |
--------------------------------------------------------------------------------
/src/entities/project/model/interfaces/create-project-form-values.ts:
--------------------------------------------------------------------------------
1 | export interface ProjectFormValues {
2 | name: string;
3 | icon?: File;
4 | }
5 |
--------------------------------------------------------------------------------
/src/features/jetton/ui/minter/index.ts:
--------------------------------------------------------------------------------
1 | export { default as JettonForm } from './JettonForm';
2 | export { default as JettonCard } from './JettonCard';
3 |
--------------------------------------------------------------------------------
/src/features/tonapi/index.ts:
--------------------------------------------------------------------------------
1 | export * from './pricing';
2 | export * from './statistics';
3 | export * from './api-keys';
4 | export * from './webhooks';
5 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/card/defaultProps.ts:
--------------------------------------------------------------------------------
1 | const defaultProps = {
2 | size: 'md'
3 | } as const;
4 | export default defaultProps;
5 |
--------------------------------------------------------------------------------
/src/entities/project/model/interfaces/add-project-participant-form-values.ts:
--------------------------------------------------------------------------------
1 | export interface AddProjectParticipantFormValues {
2 | userId: number;
3 | }
4 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/charts/area-chart-options.ts:
--------------------------------------------------------------------------------
1 | export interface AreaChartOptions {
2 | type: 'area';
3 | xAxisKey?: string;
4 | }
5 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/charts/bar-chart-options.ts:
--------------------------------------------------------------------------------
1 | export interface BarChartOptions {
2 | type: 'bar';
3 | xAxisKey?: string;
4 | }
5 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/charts/line-chart-options.ts:
--------------------------------------------------------------------------------
1 | export interface LineChartOptions {
2 | type: 'line';
3 | xAxisKey?: string;
4 | }
5 |
--------------------------------------------------------------------------------
/src/shared/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ui';
2 | export * from './lib';
3 | export * from './api';
4 | export * from './constants';
5 | export * from './hooks';
6 |
--------------------------------------------------------------------------------
/public/tonconnect-manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "url": "https://tonconsole.com",
3 | "name": "Ton Console",
4 | "iconUrl": "https://tonconsole.com/icon-192.png"
5 | }
6 |
--------------------------------------------------------------------------------
/src/features/invoices/models/interfaces/invoices-project-form.ts:
--------------------------------------------------------------------------------
1 | export interface InvoicesProjectForm {
2 | name: string;
3 | receiverAddress: string;
4 | }
5 |
--------------------------------------------------------------------------------
/src/processes/index.ts:
--------------------------------------------------------------------------------
1 | export { default as AppInitialization } from './AppInitialization';
2 | export { default as ApplyQueryParams } from './ApplyQueryParams';
3 |
--------------------------------------------------------------------------------
/src/entities/dapp/model/interfaces/create-dapp-form.ts:
--------------------------------------------------------------------------------
1 | export interface CreateDappForm {
2 | url: string;
3 | image?: string;
4 |
5 | name?: string;
6 | }
7 |
--------------------------------------------------------------------------------
/src/features/faucet/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { RequestFaucetForm } from './request-faucet-form';
2 | export type { FaucetPayment } from './faucet-payment';
3 |
--------------------------------------------------------------------------------
/src/features/feedback/interfaces/form.ts:
--------------------------------------------------------------------------------
1 | export interface FeedbackFromI {
2 | name: string;
3 | company: string;
4 | tg: string;
5 | information: string;
6 | }
7 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/model/interfaces/create-webhooks-form.ts:
--------------------------------------------------------------------------------
1 | import { Webhook } from './webhooks';
2 |
3 | export type CreateWebhookForm = Pick;
4 |
--------------------------------------------------------------------------------
/src/shared/lib/validators/number-validator.ts:
--------------------------------------------------------------------------------
1 | export function isNumber(val: string | number): boolean {
2 | const number = Number(val);
3 | return isFinite(number);
4 | }
5 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/foundations/radius.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | none: '0',
3 | sm: '4px',
4 | md: '8px',
5 | lg: '12px',
6 | full: '9999px'
7 | };
8 |
--------------------------------------------------------------------------------
/src/entities/dapp/model/index.ts:
--------------------------------------------------------------------------------
1 | export { dappUrlValidator, fetchDappFormByManifestUrl } from './dapp-url-validator';
2 | export * from './interfaces';
3 | export * from './links';
4 |
--------------------------------------------------------------------------------
/src/shared/ui/code-area/index.tsx:
--------------------------------------------------------------------------------
1 | export { CodeArea } from './CodeArea';
2 | export { CodeAreaGroup } from './CodeAreaGroup';
3 | export { CodeAreaFooter } from './CodeAreaFooter';
4 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/text/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default defineStyle({
4 | m: 0,
5 | mt: 0
6 | });
7 |
--------------------------------------------------------------------------------
/src/entities/project/model/interfaces/update-project-form-values.ts:
--------------------------------------------------------------------------------
1 | export interface UpdateProjectFormValues {
2 | projectId: number;
3 | name?: string;
4 | icon?: File;
5 | }
6 |
--------------------------------------------------------------------------------
/src/features/faucet/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { FaucetForm, type FaucetFormInternal } from './FaucetForm';
2 | export { default as FaucetPaymentDetailsModal } from './FaucetPaymentDetailsModal';
3 |
--------------------------------------------------------------------------------
/src/shared/ui/textarea/index.ts:
--------------------------------------------------------------------------------
1 | export { TextareaGroup } from './TextareaGroup';
2 | export { TextareaBody } from './TextareaBody';
3 | export { TextareaFooter } from './TextareaFooter';
4 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/button/defaultProps.ts:
--------------------------------------------------------------------------------
1 | const defaultProps = {
2 | variant: 'primary',
3 | size: 'md'
4 | } as const;
5 |
6 | export default defaultProps;
7 |
--------------------------------------------------------------------------------
/src/features/app-messages/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 | export { appMessagesStore } from 'src/shared/stores';
3 | export { APP_MESSAGES_LINKS } from './APP_MESSAGES_LINKS';
4 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/model/interfaces/add-subscriptions-form.ts:
--------------------------------------------------------------------------------
1 | import { Address } from '@ton/core';
2 |
3 | export type AddSubscriptionsForm = {
4 | accounts: Address[];
5 | };
6 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/breakpoints/breakpoints.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | sm: '320px',
3 | md: '640px',
4 | lg: '1024px',
5 | xl: '1240px',
6 | '2xl': '1536px'
7 | };
8 |
--------------------------------------------------------------------------------
/src/entities/dapp/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Dapp } from './dapp';
2 | export type { CreateDappForm } from './create-dapp-form';
3 | export type { PendingDapp } from './pending-dapp';
4 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/table/invoices-table-context.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 |
3 | export const InvoicesTableContext = createContext<{ rawHeight: string }>({ rawHeight: '12' });
4 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/divider/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default defineStyle({
4 | borderColor: 'separator.common'
5 | });
6 |
--------------------------------------------------------------------------------
/src/shared/lib/mobx/create-effect.ts:
--------------------------------------------------------------------------------
1 | import { autorun } from 'mobx';
2 |
3 | export function createEffect(...args: Parameters): void {
4 | setTimeout(() => autorun(...args));
5 | }
6 |
--------------------------------------------------------------------------------
/public/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "icons": [
3 | { "src": "/icon-192.png", "type": "image/png", "sizes": "192x192" },
4 | { "src": "/icon-512.png", "type": "image/png", "sizes": "512x512" }
5 | ]
6 | }
7 |
--------------------------------------------------------------------------------
/src/features/stores.ts:
--------------------------------------------------------------------------------
1 | import { DappStore } from 'src/entities/dapp/model/dapp.store';
2 | import { projectsStore } from 'src/shared/stores';
3 |
4 | export const dappStore = new DappStore(projectsStore);
5 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/model/interfaces/create-api-key-form.ts:
--------------------------------------------------------------------------------
1 | import { ApiKey } from './api-key';
2 |
3 | export type CreateApiKeyForm = Pick;
4 |
--------------------------------------------------------------------------------
/src/shared/ui/options-input/index.ts:
--------------------------------------------------------------------------------
1 | export { OptionsInput } from './OptionsInput';
2 | export { OptionsInputOption } from './OptionsInputOption';
3 | export { OptionsInputText } from './OptionsInputText';
4 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/heading/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default defineStyle({
4 | color: 'text.primary',
5 | margin: 0
6 | });
7 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/index.ts:
--------------------------------------------------------------------------------
1 | export { H1 } from './h1';
2 | export { H2 } from './h2';
3 | export * from './h3';
4 | export { H4 } from './h4';
5 | export { default as TextWithSkeleton } from './TextWithSkeleton';
6 |
--------------------------------------------------------------------------------
/src/widgets/billing/ui/BillingHistoryTableContext.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 |
3 | export const BillingHistoryTableContext = createContext<{ rowHeight: string }>({
4 | rowHeight: '48px'
5 | });
6 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/card/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default definePartsStyle({
4 | container: {
5 | borderRadius: 'md'
6 | }
7 | });
8 |
--------------------------------------------------------------------------------
/src/app/providers/with-mobx.ts:
--------------------------------------------------------------------------------
1 | import { configure } from 'mobx';
2 |
3 | setTimeout(() => {
4 | configure({
5 | enforceActions: 'never',
6 | reactionScheduler: f => setTimeout(f)
7 | });
8 | }, 1);
9 |
--------------------------------------------------------------------------------
/src/entities/dapp/model/interfaces/dapp.ts:
--------------------------------------------------------------------------------
1 | export interface Dapp {
2 | id: number;
3 |
4 | url: string;
5 |
6 | creationDate: Date;
7 |
8 | name?: string;
9 |
10 | image?: string;
11 | }
12 |
--------------------------------------------------------------------------------
/src/features/app-messages/model/interfaces/app-messages-stats.ts:
--------------------------------------------------------------------------------
1 | export interface AppMessagesStats {
2 | totalUsers: number;
3 | usersWithEnabledNotifications: number;
4 | sentNotificationsLastWeek: number;
5 | }
6 |
--------------------------------------------------------------------------------
/src/shared/ui/dropdown-menu/index.tsx:
--------------------------------------------------------------------------------
1 | export { DropDownMenu } from './DropDownMenu';
2 | export { DropDownMenuItem } from './DropDownMenuItem';
3 | export { DropDownMenuItemExpandable } from './DropDownMenuItemExpandable';
4 |
--------------------------------------------------------------------------------
/src/entities/balance/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as RefillModal } from './RefillModal';
2 | export { default as RefillModalContent } from './RefillModalContent';
3 | export { default as PromoCodeModal } from './PromoCodeModal';
4 |
--------------------------------------------------------------------------------
/src/entities/dapp/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as DappRegistrationForm } from './DappRegistrationForm';
2 | export { default as DappCard } from './DappCard';
3 | export { default as CurrentDappCard } from './CurrentDappCard';
4 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { ApiKey } from './api-key';
2 | export type { EditApiKeyForm } from './edit-api-key-form';
3 | export type { CreateApiKeyForm } from './create-api-key-form';
4 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Webhook } from './webhooks';
2 | export type { EditWebhookForm } from './edit-webhooks-form';
3 | export type { CreateWebhookForm } from './create-webhooks-form';
4 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/code/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default defineStyle({
4 | backgroundColor: 'background.contentTint',
5 | fontFamily: 'mono'
6 | });
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/link/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default defineStyle({
4 | apply: 'textStyles.body2',
5 | m: 0,
6 | color: 'text.secondary'
7 | });
8 |
--------------------------------------------------------------------------------
/src/entities/dapp/model/interfaces/pending-dapp.ts:
--------------------------------------------------------------------------------
1 | export interface PendingDapp {
2 | url: string;
3 |
4 | name?: string;
5 |
6 | image?: string;
7 |
8 | token: string;
9 |
10 | validUntil: Date;
11 | }
12 |
--------------------------------------------------------------------------------
/src/features/airdrop/model/interfaces/AirdropMetadata.ts:
--------------------------------------------------------------------------------
1 | export interface AirdropMetadata {
2 | name: string;
3 | address: string;
4 | fee: string;
5 | vesting: { unlockTime?: string; fraction?: number }[] | null;
6 | }
7 |
--------------------------------------------------------------------------------
/src/features/faucet/model/interfaces/request-faucet-form.ts:
--------------------------------------------------------------------------------
1 | import { TokenCurrencyAmount } from 'src/shared';
2 |
3 | export interface RequestFaucetForm {
4 | amount: TokenCurrencyAmount;
5 |
6 | receiverAddress: string;
7 | }
8 |
--------------------------------------------------------------------------------
/src/features/invoices/models/index.ts:
--------------------------------------------------------------------------------
1 | export * from './interfaces';
2 | export { invoicesAppStore } from 'src/shared/stores';
3 | export { invoicesTableStore } from 'src/shared/stores';
4 | export { INVOICES_LINKS } from './INVOICES_LINKS';
5 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/model/interfaces/edit-api-key-form.ts:
--------------------------------------------------------------------------------
1 | import { ApiKey } from './api-key';
2 | import { CreateApiKeyForm } from './create-api-key-form';
3 |
4 | export type EditApiKeyForm = Pick & CreateApiKeyForm;
5 |
--------------------------------------------------------------------------------
/src/features/tonapi/statistics/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { DashboardTierCard } from './DashboardTierCard';
2 | export { default as DashboardChart } from './DashboardChart';
3 | export { default as LiteproxyStatsModal } from './LiteproxyStatsModal';
4 |
--------------------------------------------------------------------------------
/tsconfig.vite.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "composite": true,
4 | "module": "ESNext",
5 | "moduleResolution": "Node",
6 | "allowSyntheticDefaultImports": true
7 | },
8 | "include": ["vite.config.ts"]
9 | }
10 |
--------------------------------------------------------------------------------
/src/features/tonapi/liteproxy/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CreateLiteproxyModal } from './CreateLiteproxyModal';
2 | export { default as LiteproxysTable } from './LiteproxyView';
3 | export { default as LiteproxyView } from './LiteproxyView';
4 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/model/interfaces/edit-webhooks-form.ts:
--------------------------------------------------------------------------------
1 | import { Webhook } from './webhooks';
2 | import { CreateWebhookForm } from './create-webhooks-form';
3 |
4 | export type EditWebhookForm = Pick & CreateWebhookForm;
5 |
--------------------------------------------------------------------------------
/src/entities/balance/model/interfaces/portfolio.ts:
--------------------------------------------------------------------------------
1 | import { CurrencyAmount } from 'src/shared';
2 | import { Refill } from 'src/entities';
3 |
4 | export interface Portfolio {
5 | balances: CurrencyAmount[];
6 |
7 | refills: Refill[];
8 | }
9 |
--------------------------------------------------------------------------------
/src/features/app-messages/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { AppMessagesPackage } from './app-messages-package';
2 | export type { AppMessagesPayment } from './app-messages-payment';
3 | export type { AppMessagesStats } from './app-messages-stats';
4 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/query-results/charts/index.ts:
--------------------------------------------------------------------------------
1 | export { AreaChartCard } from './AreaChartCard';
2 | export { LineChartCard } from './LineChartCard';
3 | export { BarChartCard } from './BarChartCard';
4 | export { PieChartCard } from './PieChartCard';
5 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { TonApiTier } from './ton-api-tier';
2 | export { type TonApiSelectedTier, isTonApiSelectedTier } from './ton-api-seleced-tier';
3 | export type { TonApiPayment } from './ton-api-payment';
4 |
--------------------------------------------------------------------------------
/src/widgets/billing/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Payment } from './payment';
2 | export type {
3 | BillingHistory,
4 | BillingHistoryItem,
5 | BillingHistoryPaymentItem,
6 | BillingHistoryRefillItem
7 | } from './billing-history';
8 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/charts/index.ts:
--------------------------------------------------------------------------------
1 | export * from './area-chart-options';
2 | export * from './line-chart-options';
3 | export * from './bar-chart-options';
4 | export * from './pie-chart-options';
5 | export * from './analytics-charts-config';
6 |
--------------------------------------------------------------------------------
/src/features/app-messages/model/APP_MESSAGES_LINKS.ts:
--------------------------------------------------------------------------------
1 | export enum APP_MESSAGES_LINKS {
2 | BUSINESS_DESCRIPTION = 'https://docs.tonconsole.com/tonconsole/tonkeeper-messages',
3 | USAGE = 'https://docs.tonconsole.com/tonconsole/tonkeeper-messages'
4 | }
5 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/badge/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const badgeConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default badgeConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/code/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const codeConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default codeConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/form/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineMultiStyleConfig } from './parts';
3 |
4 | const formConfig = defineMultiStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default formConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/link/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const linkConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default linkConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/menu/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const menuConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default menuConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/radio/variants.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default {
4 | withDescription: definePartsStyle({
5 | control: {
6 | mt: '3px'
7 | }
8 | })
9 | };
10 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/text/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const textConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default textConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/divider/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const dividerConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default dividerConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/heading/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const headingConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default headingConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/skeleton/index.ts:
--------------------------------------------------------------------------------
1 | import variants from './variants';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const skeletonConfig = defineStyleConfig({
5 | variants
6 | });
7 |
8 | export default skeletonConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tooltip/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineStyleConfig } from '@chakra-ui/react';
3 |
4 | const tooltipConfig = defineStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default tooltipConfig;
9 |
--------------------------------------------------------------------------------
/src/entities/index.ts:
--------------------------------------------------------------------------------
1 | export * from './project';
2 | export * from './user';
3 | export * from './dapp';
4 | export * from './balance';
5 | export * from './service';
6 | export * from './rates';
7 | export * from './empty-page';
8 | export * from './confirmation-dialog';
9 |
--------------------------------------------------------------------------------
/src/entities/project/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { SelectProject } from './SelectProject';
2 | export { ProjectForm } from './ProjectForm';
3 | export { CreateProjectModal } from './CreateProjectModal';
4 | export { DeleteProjectConfirmation } from './DeleteProjectConfirmation';
5 |
--------------------------------------------------------------------------------
/src/features/tonapi/statistics/model/interfaces/ton-api-stats.ts:
--------------------------------------------------------------------------------
1 | export interface TonApiStats {
2 | chart: {
3 | time: number;
4 | requests?: number;
5 | liteproxyRequests?: number;
6 | liteproxyConnections?: number;
7 | }[];
8 | }
9 |
--------------------------------------------------------------------------------
/src/shared/lib/blockchain/index.ts:
--------------------------------------------------------------------------------
1 | export { shortAddress } from './address';
2 | export { fromWei, toWei } from './wei';
3 | export { explorer, testnetExplorer } from './explorer';
4 | export { createTransferLink } from './transfer';
5 | export { Network } from './network';
6 |
--------------------------------------------------------------------------------
/src/shared/ui/MenuButtonDefault.tsx:
--------------------------------------------------------------------------------
1 | import { Button, forwardRef, MenuButton } from '@chakra-ui/react';
2 |
3 | export const MenuButtonDefault = forwardRef((props, ref) => (
4 |
5 | ));
6 |
--------------------------------------------------------------------------------
/src/shared/ui/MenuButtonIcon.tsx:
--------------------------------------------------------------------------------
1 | import { forwardRef, MenuButton } from '@chakra-ui/react';
2 | import { IconButton } from './IconButton';
3 |
4 | export const MenuButtonIcon = forwardRef((props, ref) => (
5 |
6 | ));
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/checkbox/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineMultiStyleConfig } from './parts';
3 |
4 | const checkboxConfig = defineMultiStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default checkboxConfig;
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/popover/index.ts:
--------------------------------------------------------------------------------
1 | import { defineMultiStyleConfig } from './parts';
2 | import baseStyle from './baseStyle';
3 |
4 | const popoverConfig = defineMultiStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default popoverConfig;
9 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/gpt-generation-pricing.ts:
--------------------------------------------------------------------------------
1 | import { TonCurrencyAmount } from 'src/shared';
2 |
3 | export interface GptGenerationPricing {
4 | freeRequestsNumber: number;
5 | usedFreeRequest: number;
6 | requestPrice: TonCurrencyAmount;
7 | }
8 |
--------------------------------------------------------------------------------
/src/features/app-messages/model/interfaces/app-messages-package.ts:
--------------------------------------------------------------------------------
1 | import { UsdCurrencyAmount } from 'src/shared';
2 |
3 | export interface AppMessagesPackage {
4 | id: number;
5 | price: UsdCurrencyAmount;
6 | messagesIncluded: number;
7 | name: string;
8 | }
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/form-error/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineMultiStyleConfig } from './parts';
3 |
4 | const formErrorConfig = defineMultiStyleConfig({
5 | baseStyle
6 | });
7 |
8 | export default formErrorConfig;
9 |
--------------------------------------------------------------------------------
/src/pages/subscriptions/index.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { EmptyPage } from 'src/pages/subscriptions/ui/empty-page';
3 |
4 | const SubscriptionsPage: FunctionComponent = () => {
5 | return ;
6 | };
7 |
8 | export default SubscriptionsPage;
9 |
--------------------------------------------------------------------------------
/src/shared/lib/mobx/create-reaction.ts:
--------------------------------------------------------------------------------
1 | import { reaction } from 'mobx';
2 |
3 | export function createReaction(
4 | ...args: Parameters>
5 | ): void {
6 | setTimeout(() => reaction(...args));
7 | }
8 |
--------------------------------------------------------------------------------
/src/widgets/index.ts:
--------------------------------------------------------------------------------
1 | export { Header } from './header';
2 | export { Footer } from './footer';
3 | export { default as Aside } from './aside';
4 | export { CreateSubscriptionsPlan } from './create-subscriptions-plan';
5 | export * from './subscriptions';
6 | export * from './billing';
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/popover/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default definePartsStyle({
4 | popper: {
5 | maxW: '100%',
6 | w: 'fit-content',
7 | minW: 'unset !important'
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/src/app/providers/with-router.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/display-name */
2 |
3 | import { ReactNode } from 'react';
4 | import { BrowserRouter } from 'react-router-dom';
5 |
6 | export const withRouter = (component: () => ReactNode) => () =>
7 | {component()};
8 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/CRYPTO_CURRENCY.ts:
--------------------------------------------------------------------------------
1 | export enum CRYPTO_CURRENCY {
2 | TON = 'TON',
3 | USDT = 'USDT'
4 | }
5 |
6 | export const CRYPTO_CURRENCY_DECIMALS: Record = {
7 | [CRYPTO_CURRENCY.TON]: 9,
8 | [CRYPTO_CURRENCY.USDT]: 6
9 | } as const;
10 |
--------------------------------------------------------------------------------
/src/shared/lib/mobx/create-immediate-reaction.ts:
--------------------------------------------------------------------------------
1 | import { reaction } from 'mobx';
2 |
3 | export function createImmediateReaction(...args: Parameters>): void {
4 | setTimeout(() => reaction(args[0], args[1], { fireImmediately: true, ...(args[2] || {}) }));
5 | }
6 |
--------------------------------------------------------------------------------
/src/shared/lib/validators/masks/ton-mask.ts:
--------------------------------------------------------------------------------
1 | export const tonMask = {
2 | mask: Number,
3 | scale: 9,
4 | signed: false,
5 | thousandsSeparator: '',
6 | padFractionalZeros: false,
7 | normalizeZeros: true,
8 | radix: '.',
9 | mapToRadix: ['.', ',']
10 | };
11 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/h4/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const H4: FunctionComponent> = props => (
5 |
6 | );
7 |
--------------------------------------------------------------------------------
/src/entities/user/model/interfaces/user.ts:
--------------------------------------------------------------------------------
1 | export interface User {
2 | id: number;
3 |
4 | firstName?: string;
5 |
6 | lastName?: string;
7 |
8 | name: string;
9 |
10 | imageUrl?: string;
11 |
12 | referralId: string;
13 |
14 | referralCount: number;
15 | }
16 |
--------------------------------------------------------------------------------
/src/features/jetton/model/interfaces/JettonMetadata.ts:
--------------------------------------------------------------------------------
1 | import { Address } from '@ton/core';
2 |
3 | export interface JettonMetadata {
4 | address: Address;
5 | name: string;
6 | symbol: string;
7 | decimals: number;
8 | image: string;
9 | description: string;
10 | }
11 |
--------------------------------------------------------------------------------
/vitest.config.ts:
--------------------------------------------------------------------------------
1 | import react from '@vitejs/plugin-react';
2 | import { defineConfig } from 'vitest/config';
3 |
4 | export default defineConfig({
5 | plugins: [react()],
6 | test: {
7 | include: ['**/*.test.tsx', '**/*.test.ts'],
8 | globals: true
9 | }
10 | });
11 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/h1/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const H1: FunctionComponent> = ({ ...props }) => (
5 |
6 | );
7 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/h3/h3.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const H3: FunctionComponent> = ({ ...props }) => (
5 |
6 | );
7 |
--------------------------------------------------------------------------------
/src/widgets/billing/model/interfaces/payment.ts:
--------------------------------------------------------------------------------
1 | import { CurrencyAmount, UsdCurrencyAmount } from 'src/shared';
2 |
3 | export interface Payment {
4 | id: string;
5 | name: string;
6 | date: Date;
7 | amount: CurrencyAmount;
8 | amountUsdEquivalent?: UsdCurrencyAmount;
9 | }
10 |
--------------------------------------------------------------------------------
/tests/app/app.spec.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from '@testing-library/react';
3 |
4 | import App from '../../src/app';
5 |
6 | describe('App', () => {
7 | it('Should be rendered', () => {
8 | expect(() => render()).not.toThrow();
9 | });
10 | });
11 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CreateApiKeyModal } from './CreateApiKeyModal';
2 | export { default as EditApiKeyModal } from './EditApiKeyModal';
3 | export { default as DeleteApiKeyModal } from './DeleteApiKeyModal';
4 | export { default as ApiKeysTable } from './ApiKeysTable';
5 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as TonApiTiers } from './TonApiTiers';
2 | export { default as TonApiPaymentDetailsModal } from './TonApiPaymentDetailsModal';
3 | export { TonApiTierCard } from './TonApiTierCard';
4 | export { TonApiUnlimitedTierCard } from './TonApiUnlimitedTierCard';
5 |
--------------------------------------------------------------------------------
/tests/setup.ts:
--------------------------------------------------------------------------------
1 | import '@testing-library/jest-dom';
2 | import { expect, afterEach } from 'vitest';
3 | import { cleanup } from '@testing-library/react';
4 | import matchers from '@testing-library/jest-dom/matchers';
5 |
6 | expect.extend(matchers);
7 |
8 | afterEach(() => {
9 | cleanup();
10 | });
11 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/card/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { cardAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/form/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { formAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/input/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { inputAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/input/sizes.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default {
4 | md: definePartsStyle({
5 | field: {
6 | h: '44px'
7 | },
8 | element: {
9 | h: '44px'
10 | }
11 | })
12 | };
13 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/modal/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { modalAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/radio/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { radioAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/table/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { tableAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tabs/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { tabsAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/checkbox/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { checkboxAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/popover/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { popoverAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/shared/hooks/usePrevious.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useRef } from 'react';
2 |
3 | export function usePrevious(prop: T): T | undefined {
4 | const prev = useRef();
5 |
6 | useEffect(() => {
7 | prev.current = prop;
8 | }, [prop]);
9 |
10 | return prev.current;
11 | }
12 |
--------------------------------------------------------------------------------
/src/widgets/subscriptions/model/interfaces/subscription.ts:
--------------------------------------------------------------------------------
1 | import { CurrencyAmount } from 'src/shared';
2 |
3 | export interface Subscription {
4 | id: string;
5 | plan: string;
6 | interval: 'Monthly';
7 | renewsDate: Date;
8 | price: CurrencyAmount;
9 |
10 | // onCancel(): void;
11 | }
12 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/form-error/parts.ts:
--------------------------------------------------------------------------------
1 | import { createMultiStyleConfigHelpers } from '@chakra-ui/react';
2 | import { formErrorAnatomy as parts } from '@chakra-ui/anatomy';
3 |
4 | export const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(
5 | parts.keys
6 | );
7 |
--------------------------------------------------------------------------------
/src/features/invoices/models/interfaces/invoice-form.ts:
--------------------------------------------------------------------------------
1 | import { CRYPTO_CURRENCY, TokenCurrencyAmount } from 'src/shared';
2 |
3 | export interface InvoiceForm {
4 | amount: TokenCurrencyAmount;
5 |
6 | lifeTimeSeconds: number;
7 |
8 | description: string;
9 |
10 | currency: CRYPTO_CURRENCY;
11 | }
12 |
--------------------------------------------------------------------------------
/src/main.tsx:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import App from 'src/app';
3 |
4 | import { createRoot } from 'react-dom/client';
5 | const container = document.getElementById('root')!;
6 | const root = createRoot(container);
7 | root.render(
8 |
9 |
10 |
11 | );
12 |
--------------------------------------------------------------------------------
/src/shared/hooks/useIntervalUpdate.ts:
--------------------------------------------------------------------------------
1 | import { useEffect } from 'react';
2 | import { useInterval } from '@chakra-ui/react';
3 |
4 | export function useIntervalUpdate(callback: () => void, delay = 10_000): void {
5 | useEffect(() => {
6 | callback();
7 | }, []);
8 | useInterval(callback, delay);
9 | }
10 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/radio/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import variants from './variants';
3 | import { defineMultiStyleConfig } from './parts';
4 |
5 | const radioConfig = defineMultiStyleConfig({
6 | baseStyle,
7 | variants
8 | });
9 |
10 | export default radioConfig;
11 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/table/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import variants from './variants';
3 | import { defineMultiStyleConfig } from './parts';
4 |
5 | const tableConfig = defineMultiStyleConfig({
6 | baseStyle,
7 | variants
8 | });
9 |
10 | export default tableConfig;
11 |
--------------------------------------------------------------------------------
/src/entities/project/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { Project } from './project';
2 | export type { ProjectFormValues } from './create-project-form-values';
3 | export type { UpdateProjectFormValues } from './update-project-form-values';
4 | export type { AddProjectParticipantFormValues } from './add-project-participant-form-values';
5 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export * from './analytics-query';
2 | export * from './analytics-graph-query';
3 | export * from './analytics-payment';
4 | export * from './analytics-tables-schema';
5 | export * from './gpt-generation-pricing';
6 | export * from './charts';
7 | export * from './analytics-dashboard-widget';
8 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/history/analytics-history-table-context.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 |
3 | export const AnalyticsHistoryTableContext = createContext<{
4 | rowHeight: string;
5 | setQueryForModal: (value: string) => void;
6 | }>({
7 | rowHeight: '68px',
8 | setQueryForModal: () => {}
9 | });
10 |
--------------------------------------------------------------------------------
/src/features/faucet/model/interfaces/faucet-payment.ts:
--------------------------------------------------------------------------------
1 | import { TonCurrencyAmount, UsdCurrencyAmount } from 'src/shared';
2 |
3 | export interface FaucetPayment {
4 | id: string;
5 | boughtAmount: TonCurrencyAmount;
6 | amount: TonCurrencyAmount;
7 | amountUsdEquivalent: UsdCurrencyAmount;
8 | date: Date;
9 | }
10 |
--------------------------------------------------------------------------------
/src/features/index.ts:
--------------------------------------------------------------------------------
1 | export * from './tonapi';
2 | export * from './dashboard';
3 | export * from './app-messages';
4 | export * from './invoices';
5 | export * from './faucet';
6 | export * from './marketing';
7 | export * from './analytics';
8 | export * from './nft';
9 | export * from './jetton';
10 | export * from './airdrop';
11 |
--------------------------------------------------------------------------------
/src/features/nft/model/interfaces/CnftCollection.ts:
--------------------------------------------------------------------------------
1 | import { Address } from 'ton-core';
2 |
3 | export interface CnftCollection {
4 | account: Address;
5 | name: string;
6 | description?: string;
7 | image?: string;
8 | nft_count: number;
9 | minted_count: number;
10 | paid_indexing_count: number;
11 | }
12 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/CURRENCY.ts:
--------------------------------------------------------------------------------
1 | import { CRYPTO_CURRENCY } from './CRYPTO_CURRENCY';
2 | import { FIAT_CURRENCY } from './FIAT_CURRENCY';
3 |
4 | export const CURRENCY = { ...CRYPTO_CURRENCY, ...FIAT_CURRENCY };
5 | // eslint-disable-next-line @typescript-eslint/no-redeclare
6 | export type CURRENCY = CRYPTO_CURRENCY | FIAT_CURRENCY;
7 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/h2/index.tsx:
--------------------------------------------------------------------------------
1 | import { Box, forwardRef } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const H2: FunctionComponent> = forwardRef((props, ref) => (
5 |
6 | ));
7 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/index.tsx:
--------------------------------------------------------------------------------
1 | /* eslint-disable react/display-name */
2 |
3 | import { ReactNode } from 'react';
4 | import theme from './theme';
5 | import { ChakraProvider } from '@chakra-ui/react';
6 |
7 | export const withChakra = (component: () => ReactNode) => () =>
8 | {component()};
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/input/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import textStyles from 'src/app/providers/with-chakra/theme/foundations/textStyles';
2 | import { definePartsStyle } from './parts';
3 |
4 | export default definePartsStyle({
5 | field: {
6 | color: 'text.primary',
7 | ...textStyles.body2
8 | }
9 | });
10 |
--------------------------------------------------------------------------------
/src/entities/dapp/model/links.ts:
--------------------------------------------------------------------------------
1 | import { EXTERNAL_LINKS } from 'src/shared';
2 |
3 | export const DAPPS_LINKS = {
4 | GET_HELP: EXTERNAL_LINKS.SUPPORT,
5 | APP_URL_DOCUMENTATION: 'https://docs.tonconsole.com/tonconsole/tonkeeper-messages',
6 | VALIDATION_DOCUMENTATION: 'https://docs.tonconsole.com/tonconsole/tonkeeper-messages'
7 | };
8 |
--------------------------------------------------------------------------------
/src/entities/rates/model/interfaces/rates.ts:
--------------------------------------------------------------------------------
1 | import { CRYPTO_CURRENCY, Loadable } from 'src/shared';
2 | import BigNumber from 'bignumber.js';
3 |
4 | export type Rates = {
5 | [key in keyof typeof CRYPTO_CURRENCY]: BigNumber;
6 | };
7 |
8 | export type Rates$ = {
9 | [key in keyof typeof CRYPTO_CURRENCY]: Loadable;
10 | };
11 |
--------------------------------------------------------------------------------
/src/features/invoices/models/INVOICES_LINKS.ts:
--------------------------------------------------------------------------------
1 | export enum INVOICES_LINKS { // TODO
2 | BUSINESS_DESCRIPTION = 'https://docs.tonconsole.com/tonconsole/invoices',
3 | WEBHOOKS = 'https://docs.tonconsole.com/tonconsole/invoices',
4 | USAGE = 'https://docs.tonconsole.com/tonconsole/invoices',
5 | JOIN_CONTACT = 'https://t.me/tonrostislav'
6 | }
7 |
--------------------------------------------------------------------------------
/src/features/invoices/models/interfaces/invoices-app.ts:
--------------------------------------------------------------------------------
1 | import { InvoicesWebhook } from './invoices-webhook';
2 | import { TonAddress } from 'src/shared';
3 |
4 | export interface InvoicesApp {
5 | id: number;
6 | name: string;
7 | receiverAddress: TonAddress;
8 | creationDate: Date;
9 | webhooks: InvoicesWebhook[];
10 | }
11 |
--------------------------------------------------------------------------------
/src/features/tonapi/api-keys/model/interfaces/api-key.ts:
--------------------------------------------------------------------------------
1 | import { DTOTokenCapability } from 'src/shared';
2 |
3 | export interface ApiKey {
4 | id: number;
5 | name: string;
6 | value: string;
7 | limitRps: number | null;
8 | origins?: string[];
9 | creationDate: Date;
10 | capabilities: DTOTokenCapability[];
11 | }
12 |
--------------------------------------------------------------------------------
/src/shared/lib/blockchain/network.ts:
--------------------------------------------------------------------------------
1 | import { DTOChain } from 'src/shared/api';
2 |
3 | export enum Network {
4 | MAINNET = 'mainnet',
5 | TESTNET = 'testnet'
6 | }
7 |
8 | export const DTOChainNetworkMap: Record = {
9 | [DTOChain.DTOMainnet]: Network.MAINNET,
10 | [DTOChain.DTOTestnet]: Network.TESTNET
11 | };
12 |
--------------------------------------------------------------------------------
/src/shared/ui/image/index.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Box, Image as ChakraImage } from '@chakra-ui/react';
3 |
4 | export const Image: FunctionComponent> = props => (
5 | } {...props} />
6 | );
7 |
--------------------------------------------------------------------------------
/src/entities/project/model/interfaces/project.ts:
--------------------------------------------------------------------------------
1 | export interface Project {
2 | id: number;
3 | name: string;
4 | imgUrl?: string;
5 | fallbackBackground: string;
6 | creationDate: Date;
7 | capabilities: {
8 | invoices: boolean;
9 | stats: {
10 | query: boolean;
11 | };
12 | };
13 | }
14 |
--------------------------------------------------------------------------------
/.prettierrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/prettierrc",
3 | "arrowParens": "avoid",
4 | "bracketSpacing": true,
5 | "printWidth": 100,
6 | "proseWrap": "always",
7 | "quoteProps": "as-needed",
8 | "semi": true,
9 | "singleQuote": true,
10 | "tabWidth": 4,
11 | "trailingComma": "none",
12 | "useTabs": false
13 | }
14 |
--------------------------------------------------------------------------------
/src/app/providers/index.ts:
--------------------------------------------------------------------------------
1 | import compose from 'compose-function';
2 | import { withRouter } from './with-router';
3 | import { withChakra } from './with-chakra';
4 | import { withTonConnectUI } from './with-ton-connect-ui';
5 | // import './with-i18';
6 | import './with-mobx';
7 |
8 | export const withProviders = compose(withChakra, withRouter, withTonConnectUI);
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tabs/sizes.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default {
4 | md: definePartsStyle({
5 | tab: {
6 | pb: '2.5',
7 | px: '0',
8 | pt: '0'
9 | },
10 | tablist: {
11 | gap: '5'
12 | }
13 | })
14 | };
15 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/textarea/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import textStyles from 'src/app/providers/with-chakra/theme/foundations/textStyles';
2 | import { defineStyle } from '@chakra-ui/react';
3 |
4 | const { minHeight: _, ...typo } = textStyles.body2;
5 |
6 | export default defineStyle({
7 | color: 'text.primary',
8 | typo
9 | });
10 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/analytics-payment.ts:
--------------------------------------------------------------------------------
1 | import { TonCurrencyAmount, UsdCurrencyAmount } from 'src/shared';
2 |
3 | export interface AnalyticsPayment {
4 | id: string;
5 | amount: TonCurrencyAmount;
6 | amountUsdEquivalent: UsdCurrencyAmount;
7 | date: Date;
8 | subservice: 'query' | 'graph' | 'gpt generation';
9 | }
10 |
--------------------------------------------------------------------------------
/src/shared/ui/typography/h3/h3-thin.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from '@chakra-ui/react';
2 | import { ComponentProps, forwardRef } from 'react';
3 |
4 | export const H3Thin = forwardRef>((props, ref) => (
5 |
6 | ));
7 |
8 | H3Thin.displayName = 'H3Thin';
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/modal/sizes.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default {
4 | md: definePartsStyle({
5 | dialog: {
6 | maxWidth: '480px'
7 | }
8 | }),
9 | lg: definePartsStyle({
10 | dialog: {
11 | maxWidth: '560px'
12 | }
13 | })
14 | };
15 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/analytics-tables-schema.ts:
--------------------------------------------------------------------------------
1 | export type AnalyticsTablesSchema = Record;
2 |
3 | export type AnalyticsTablePagination = {
4 | filter: {
5 | type?: AnalyticsQueryType[];
6 | onlyRepeating: boolean;
7 | };
8 | };
9 |
10 | export type AnalyticsQueryType = 'sql' | 'gpt' | 'graph';
11 |
--------------------------------------------------------------------------------
/src/shared/api/airdrop-api.ts:
--------------------------------------------------------------------------------
1 | import { Api } from './airdrop.generated';
2 |
3 | export * from './airdrop.generated';
4 |
5 | export const apiAirdropBaseURL = import.meta.env.VITE_BASE_URL;
6 |
7 | export const airdropApiClient = new Api({
8 | baseURL: apiAirdropBaseURL + 'airdrop-api',
9 | paramsSerializer: {
10 | indexes: null
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/src/shared/lib/mobx/await-value-resolved.ts:
--------------------------------------------------------------------------------
1 | import { Loadable } from 'src/shared';
2 | import { when } from 'mobx';
3 |
4 | export async function awaitValueResolved(value$: Loadable): Promise {
5 | if (value$.isResolved) {
6 | return value$.value;
7 | }
8 |
9 | await when(() => value$.isResolved);
10 | return value$.value;
11 | }
12 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tabs/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineMultiStyleConfig } from './parts';
3 | import sizes from './sizes';
4 | import variants from './variants';
5 |
6 | const tabsConfig = defineMultiStyleConfig({
7 | baseStyle,
8 | sizes,
9 | variants
10 | });
11 |
12 | export default tabsConfig;
13 |
--------------------------------------------------------------------------------
/src/features/analytics/model/ANALYTICS_LINKS.ts:
--------------------------------------------------------------------------------
1 | export const ANALYTICS_LINKS = {
2 | INTRO: 'https://docs.tonconsole.com/tonconsole/analytics',
3 | GRAPH: {
4 | HOW_IT_WORKS: 'https://docs.tonconsole.com/tonconsole/analytics#building-graph'
5 | },
6 | QUERY: {
7 | INTRO: 'https://docs.tonconsole.com/tonconsole/analytics#query'
8 | }
9 | };
10 |
--------------------------------------------------------------------------------
/src/features/analytics/model/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ANALYTICS_LINKS';
2 |
3 | export {
4 | analyticsQueryStore,
5 | analyticsQuerySQLRequestStore,
6 | analyticsQueryGPTRequestStore,
7 | analyticsHistoryTableStore,
8 | analyticsGPTGenerationStore,
9 | analyticsGraphQueryStore
10 | } from 'src/shared/stores';
11 |
12 | export * from './interfaces';
13 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/model/interfaces/ton-api-payment.ts:
--------------------------------------------------------------------------------
1 | import { TonApiTier } from './ton-api-tier';
2 | import { TonCurrencyAmount, UsdCurrencyAmount } from 'src/shared';
3 |
4 | export interface TonApiPayment {
5 | id: string;
6 | tier: TonApiTier;
7 | amount: TonCurrencyAmount;
8 | amountUsdEquivalent: UsdCurrencyAmount;
9 |
10 | date: Date;
11 | }
12 |
--------------------------------------------------------------------------------
/src/shared/api/streaming-api.ts:
--------------------------------------------------------------------------------
1 | import { Api } from './rt.tonapi.generated';
2 |
3 | export * from './rt.tonapi.generated';
4 |
5 | export const rtTonApiClientBaseURL = import.meta.env.VITE_BASE_URL;
6 |
7 | export const rtTonApiClient = new Api({
8 | baseURL: rtTonApiClientBaseURL + 'streaming-api',
9 | paramsSerializer: {
10 | indexes: null
11 | }
12 | });
13 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/modal/defaultProps.ts:
--------------------------------------------------------------------------------
1 | const defaultProps = {
2 | isCentered: true,
3 | size: 'lg'
4 | } as unknown as
5 | | {
6 | size?: 'lg' | 'md' | undefined;
7 | variant?: string | number | undefined;
8 | colorScheme?: string | undefined;
9 | }
10 | | undefined;
11 |
12 | export default defaultProps;
13 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/modal/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import defaultProps from './defaultProps';
3 | import { defineMultiStyleConfig } from './parts';
4 | import sizes from './sizes';
5 |
6 | const modalConfig = defineMultiStyleConfig({
7 | baseStyle,
8 | defaultProps,
9 | sizes
10 | });
11 |
12 | export default modalConfig;
13 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/badge/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 | import textStyles from '../../foundations/textStyles';
3 |
4 | export default defineStyle({
5 | ...textStyles.body2,
6 | textTransform: 'unset',
7 | backgroundColor: 'background.contentTint',
8 | fontFamily: 'mono',
9 | px: 2,
10 | py: 0.5
11 | });
12 |
--------------------------------------------------------------------------------
/src/shared/ui/Pad.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, forwardRef } from 'react';
2 | import { Box } from '@chakra-ui/react';
3 |
4 | export const Pad = forwardRef>((props, ref) => {
5 | return (
6 |
7 | );
8 | });
9 |
10 | Pad.displayName = 'Pad';
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Logs
2 | logs
3 | *.log
4 | npm-debug.log*
5 | yarn-debug.log*
6 | yarn-error.log*
7 | pnpm-debug.log*
8 | lerna-debug.log*
9 |
10 | node_modules
11 | dist
12 | dist-ssr
13 | *.local
14 |
15 | # Editor directories and files
16 | .vscode/*
17 | !.vscode/extensions.json
18 | .idea
19 | .DS_Store
20 | *.suo
21 | *.ntvs*
22 | *.njsproj
23 | *.sln
24 | *.sw?
25 |
26 | tsconfig.tsbuildinfo
27 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/form-error/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import textStyles from 'src/app/providers/with-chakra/theme/foundations/textStyles';
2 | import { definePartsStyle } from './parts';
3 |
4 | export default definePartsStyle({
5 | text: {
6 | mt: 0,
7 | position: 'absolute',
8 | color: 'accent.red',
9 | ...textStyles.label3
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/src/features/invoices/models/interfaces/index.ts:
--------------------------------------------------------------------------------
1 | export type { InvoicesProjectForm } from './invoices-project-form';
2 | export type { InvoicesApp } from './invoices-app';
3 | export type { InvoiceForm } from './invoice-form';
4 | export * from './invoice';
5 | export * from './invoice-table-pagination';
6 | export * from './invoices-statistics';
7 | export type { InvoicesWebhook } from './invoices-webhook';
8 |
--------------------------------------------------------------------------------
/src/shared/lib/file.ts:
--------------------------------------------------------------------------------
1 | export async function imageUrlToFilesList(image: string): Promise {
2 | const response = await fetch(image);
3 | const blob = await response.blob();
4 | const file = new File([blob], 'image.jpg', { type: blob.type });
5 | const dataTransfer = new DataTransfer();
6 |
7 | dataTransfer.items.add(file);
8 |
9 | return dataTransfer.files;
10 | }
11 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/button/baseStyle.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | borderRadius: 'md',
3 | border: 0,
4 | boxShadow: 'none',
5 | cursor: 'pointer',
6 | display: 'inline-flex',
7 | alignItems: 'center',
8 | _hover: {
9 | _disabled: {
10 | bg: 'initial'
11 | }
12 | },
13 | _focus: {
14 | outline: 0
15 | }
16 | };
17 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/textarea/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import defaultProps from './defaultProps';
3 | import variants from './variants';
4 | import { defineStyleConfig } from '@chakra-ui/react';
5 |
6 | const textAreaConfig = defineStyleConfig({
7 | baseStyle,
8 | defaultProps,
9 | variants
10 | });
11 |
12 | export default textAreaConfig;
13 |
--------------------------------------------------------------------------------
/src/features/app-messages/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as MessagesRefillModal } from './MessagesRefillModal';
2 | export { default as MessagesTokenRegenerateConfirmation } from './MessagesTokenRegenerateConfirmation';
3 | export { default as MessagesPaymentConfirmationModalContent } from './MessagesPaymentConfirmationModalContent';
4 | export { MessagesPaymentConfirmationModal } from './MessagesPaymentConfirmationModal';
5 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/button/sizes.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | md: {
3 | px: 4,
4 | py: 3,
5 | minW: 1,
6 | minH: '44px'
7 | },
8 | sm: {
9 | px: 3,
10 | py: 1.5,
11 | minW: 1,
12 | minH: '32px'
13 | },
14 | fit: {
15 | p: 0,
16 | h: 'fit-content',
17 | w: 'fit-content'
18 | }
19 | };
20 |
--------------------------------------------------------------------------------
/src/features/app-messages/model/interfaces/app-messages-payment.ts:
--------------------------------------------------------------------------------
1 | import { TonCurrencyAmount, UsdCurrencyAmount } from 'src/shared';
2 | import { AppMessagesPackage } from './app-messages-package';
3 |
4 | export interface AppMessagesPayment {
5 | id: string;
6 | package: AppMessagesPackage;
7 | amount: TonCurrencyAmount;
8 | amountUsdEquivalent: UsdCurrencyAmount;
9 |
10 | date: Date;
11 | }
12 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/model/interfaces/webhooks.ts:
--------------------------------------------------------------------------------
1 | import { RTWebhookList } from 'src/shared/api/streaming-api';
2 |
3 | export type Webhook = RTWebhookList['webhooks'][number];
4 |
5 | export type WebhooksStatType = 'delivered' | 'failed';
6 |
7 | export interface WebhooksStat {
8 | result: {
9 | metric: { type: WebhooksStatType };
10 | values: [number, string][];
11 | }[];
12 | }
13 |
--------------------------------------------------------------------------------
/src/shared/api/tonconsole.ts:
--------------------------------------------------------------------------------
1 | import { Api } from './api.generated';
2 |
3 | export const apiClientBaseURL = import.meta.env.VITE_BASE_URL;
4 |
5 | export const backendBaseURL =
6 | apiClientBaseURL === '/' ? import.meta.env.VITE_BASE_PROXY_URL : apiClientBaseURL;
7 |
8 | export const apiClient = new Api({
9 | baseURL: apiClientBaseURL,
10 | paramsSerializer: {
11 | indexes: null
12 | }
13 | });
14 |
--------------------------------------------------------------------------------
/src/shared/ui/dropdown-menu/DropDownMenu.tsx:
--------------------------------------------------------------------------------
1 | import { Box } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent, PropsWithChildren } from 'react';
3 |
4 | export const DropDownMenu: FunctionComponent<
5 | ComponentProps & PropsWithChildren
6 | > = props => {
7 | return (
8 |
9 | {props.children}
10 |
11 | );
12 | };
13 |
--------------------------------------------------------------------------------
/src/shared/ui/options-input/context.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 | import { useRadioGroup } from '@chakra-ui/react';
3 |
4 | export const OptionsInputContext = createContext<{
5 | getRadioProps?: ReturnType['getRadioProps'];
6 | setInputValue?: (value: string) => void;
7 | inputType?: 'radio' | 'text';
8 | setInputType?: (value: 'radio' | 'text') => void;
9 | }>({});
10 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/model/interfaces/ton-api-seleced-tier.ts:
--------------------------------------------------------------------------------
1 | import { TonApiTier } from 'src/features';
2 |
3 | export interface TonApiSelectedTier extends TonApiTier {
4 | active: true;
5 | subscriptionDate: Date;
6 |
7 | renewsDate?: Date;
8 | }
9 |
10 | export function isTonApiSelectedTier(value: TonApiTier): value is TonApiSelectedTier {
11 | return 'active' in value && !!value.active;
12 | }
13 |
--------------------------------------------------------------------------------
/src/widgets/billing/model/interfaces/billing-history.ts:
--------------------------------------------------------------------------------
1 | import { Payment } from './payment';
2 | import { Refill } from 'src/entities';
3 |
4 | export type BillingHistoryPaymentItem = Payment & { action: 'payment' };
5 | export type BillingHistoryRefillItem = Refill & { action: 'refill' };
6 | export type BillingHistoryItem = BillingHistoryPaymentItem | BillingHistoryRefillItem;
7 | export type BillingHistory = BillingHistoryItem[];
8 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/analytics-dashboard-widget.ts:
--------------------------------------------------------------------------------
1 | import { AnalyticsChartOptions, AnalyticsQuery } from 'src/features';
2 |
3 | export type AnalyticsDashboardWidgetOptions =
4 | | AnalyticsChartOptions
5 | | {
6 | type: 'table';
7 | };
8 |
9 | export interface AnalyticsDashboardWidget {
10 | options: AnalyticsDashboardWidgetOptions;
11 | queryId: AnalyticsQuery['id'];
12 | }
13 |
--------------------------------------------------------------------------------
/src/shared/lib/blockchain/wei.ts:
--------------------------------------------------------------------------------
1 | import BigNumber from 'bignumber.js';
2 |
3 | export function toWei(value: string | number | BigNumber, decimals: number): BigNumber {
4 | return new BigNumber(value).multipliedBy(new BigNumber(10).pow(decimals));
5 | }
6 |
7 | export function fromWei(value: string | number | BigNumber, decimals: number): BigNumber {
8 | return new BigNumber(value).div(new BigNumber(10).pow(decimals));
9 | }
10 |
--------------------------------------------------------------------------------
/tsconfig.test.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "./tsconfig.json",
3 | "compilerOptions": {
4 | "strict": false,
5 | "composite": true,
6 | "isolatedModules": false,
7 | "types": ["vitest/globals"],
8 | "paths": {
9 | "tests/*": ["./tests/*"],
10 | "src/*": ["./src/*"]
11 | }
12 | },
13 | "include": ["tests"],
14 | "exclude": ["src"],
15 | "references": [{ "path": "./tsconfig.vite.json" }]
16 | }
17 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/card/index.ts:
--------------------------------------------------------------------------------
1 | import { defineMultiStyleConfig } from './parts';
2 | import baseStyle from './baseStyle';
3 | import defaultProps from './defaultProps';
4 | import sizes from './sizes';
5 | import variants from './variants';
6 |
7 | const cardConfig = defineMultiStyleConfig({
8 | baseStyle,
9 | defaultProps,
10 | sizes,
11 | variants
12 | });
13 |
14 | export default cardConfig;
15 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/input/index.ts:
--------------------------------------------------------------------------------
1 | import baseStyle from './baseStyle';
2 | import { defineMultiStyleConfig } from './parts';
3 | import defaultProps from './defaultProps';
4 | import variants from './variants';
5 | import sizes from './sizes';
6 |
7 | const inputConfig = defineMultiStyleConfig({
8 | baseStyle,
9 | defaultProps,
10 | variants,
11 | sizes
12 | });
13 |
14 | export default inputConfig;
15 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/button/index.ts:
--------------------------------------------------------------------------------
1 | import defaultProps from './defaultProps';
2 | import sizes from './sizes';
3 | import baseStyle from './baseStyle';
4 | import variants from './variants';
5 | import { defineStyleConfig } from '@chakra-ui/react';
6 |
7 | const buttonConfig = defineStyleConfig({
8 | sizes,
9 | baseStyle,
10 | variants,
11 | defaultProps
12 | });
13 |
14 | export default buttonConfig;
15 |
--------------------------------------------------------------------------------
/src/shared/hooks/useDebounce.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 |
3 | export function useDebounce(value: T, delayMS?: number): T {
4 | const [debouncedValue, setDebouncedValue] = useState(value);
5 |
6 | useEffect(() => {
7 | const timer = setTimeout(() => setDebouncedValue(value), delayMS || 500);
8 |
9 | return () => clearTimeout(timer);
10 | }, [value, delayMS]);
11 |
12 | return debouncedValue;
13 | }
14 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/usd-currency-amount.ts:
--------------------------------------------------------------------------------
1 | import { Amount } from '../types';
2 | import { BasicCurrencyAmount } from './basic-currency-amount';
3 | import { CURRENCY } from './CURRENCY';
4 |
5 | export class UsdCurrencyAmount extends BasicCurrencyAmount {
6 | get stringCurrencyAmount(): string {
7 | return `$${this.stringAmount}`;
8 | }
9 |
10 | constructor(amount: Amount) {
11 | super({ amount, currency: CURRENCY.USD });
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/typography/fonts.ts:
--------------------------------------------------------------------------------
1 | const fonts = {
2 | heading:
3 | "-apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, Tahoma, Verdana, sans-serif",
4 | body: "-apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, Tahoma, Verdana, sans-serif",
5 | mono: 'ui-monospace, SF Mono, monospace, Roboto Mono, Menlo, Consolas, Courier'
6 | };
7 |
8 | export type Fonts = typeof fonts;
9 | export default fonts;
10 |
--------------------------------------------------------------------------------
/src/features/tonapi/pricing/model/interfaces/ton-api-tier.ts:
--------------------------------------------------------------------------------
1 | import { UsdCurrencyAmount } from 'src/shared';
2 |
3 | export interface TonApiTier {
4 | id: number;
5 | name: string;
6 | description: {
7 | requestsPerSecondLimit: number;
8 | realtimeConnectionsLimit: number;
9 | entitiesPerRealtimeConnectionLimit: number;
10 | mempool: boolean;
11 | };
12 | price: UsdCurrencyAmount;
13 | unspentMoney?: UsdCurrencyAmount;
14 | }
15 |
--------------------------------------------------------------------------------
/src/features/tonapi/webhooks/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as CreateWebhookModal } from './CreateWebhookModal';
2 | export { default as DeleteWebhookModal } from './DeleteWebhookModal';
3 | export { default as WebhooksTable } from './WebhooksTable';
4 |
5 | export { default as CreateSubscriptionsModal } from './AddSubscriptionsModal';
6 | export { default as DeleteSubscriptionsModal } from './DeleteSubscriptionModal';
7 | export { default as SubscriptionsTable } from './SubscriptionsTable';
8 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/index.ts:
--------------------------------------------------------------------------------
1 | export { CURRENCY } from './CURRENCY';
2 | export { CRYPTO_CURRENCY } from './CRYPTO_CURRENCY';
3 | export { FIAT_CURRENCY } from './FIAT_CURRENCY';
4 | export type { CurrencyAmount } from './currency-amount';
5 | export { TokenCurrencyAmount } from './token-currency-amount';
6 | export { TonCurrencyAmount } from './ton-currency-amount';
7 | export { BasicCurrencyAmount } from './basic-currency-amount';
8 | export { UsdCurrencyAmount } from './usd-currency-amount';
9 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/skeleton/variants.ts:
--------------------------------------------------------------------------------
1 | import { cssVar, defineStyle } from '@chakra-ui/react';
2 |
3 | const $startColor = cssVar('skeleton-start-color');
4 | const $endColor = cssVar('skeleton-end-color');
5 |
6 | export default {
7 | dark: defineStyle({
8 | [$startColor.variable]: 'rgba(255, 255, 255, 0.24)', //changing startColor to red.800
9 | [$endColor.variable]: 'rgba(255, 255, 255, 0.08)' // changing endColor to red.600
10 | })
11 | };
12 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tabs/variants.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | const variants = {
4 | line: definePartsStyle({
5 | tab: {
6 | color: 'text.secondary',
7 | borderBottom: 'none'
8 | },
9 | tablist: {
10 | pb: '1px',
11 | borderBottomWidth: '1px',
12 | borderBottomColor: 'separator.common'
13 | }
14 | })
15 | };
16 |
17 | export default variants;
18 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tooltip/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 | import textStyles from '../../foundations/textStyles';
3 |
4 | export default defineStyle({
5 | border: 'none',
6 | borderRadius: 'md',
7 | whiteSpace: 'normal',
8 | background: 'background.content',
9 | color: 'text.primary',
10 | filter: 'drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.04)) drop-shadow(0px 4px 20px rgba(0, 0, 0, 0.12))',
11 | ...textStyles.label2
12 | });
13 |
--------------------------------------------------------------------------------
/src/entities/balance/model/interfaces/refill.ts:
--------------------------------------------------------------------------------
1 | import { CurrencyAmount, TonAddress } from 'src/shared';
2 |
3 | export interface RefillBasic {
4 | id: number;
5 | date: Date;
6 | amount: CurrencyAmount;
7 | }
8 |
9 | export interface RefillDeposit extends RefillBasic {
10 | type: 'deposit';
11 | fromAddress?: TonAddress;
12 | }
13 |
14 | export interface RefillPromoCode extends RefillBasic {
15 | type: 'promoCode';
16 | }
17 |
18 | export type Refill = RefillDeposit | RefillPromoCode;
19 |
--------------------------------------------------------------------------------
/src/pages/layouts/Layout.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Flex } from '@chakra-ui/react';
2 | import { Header } from 'src/widgets';
3 | import { Outlet } from 'react-router-dom';
4 | import { FunctionComponent } from 'react';
5 |
6 | export const Layout: FunctionComponent = () => {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 | );
15 | };
16 |
--------------------------------------------------------------------------------
/src/shared/hooks/index.ts:
--------------------------------------------------------------------------------
1 | export { useAsyncValidator, type AsyncValidationState } from './useAsyncValidator';
2 | export { usePrevious } from './usePrevious';
3 | export { useCountdown } from './useCountdown';
4 | export { useCountup } from './useCountup';
5 | export { useDebounce } from './useDebounce';
6 | export { useIntervalUpdate } from './useIntervalUpdate';
7 | export { useLocalStorage } from './useLocalStorage';
8 | export { useSearchParams } from './useSearchParams';
9 | export * from './useIsTextTruncated';
10 |
--------------------------------------------------------------------------------
/src/pages/layouts/LayoutSolid.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Flex } from '@chakra-ui/react';
2 | import { Header } from 'src/widgets';
3 | import { Outlet } from 'react-router-dom';
4 | import { FunctionComponent } from 'react';
5 |
6 | export const LayoutSolid: FunctionComponent = () => {
7 | return (
8 |
9 |
10 |
11 |
12 |
13 |
14 | );
15 | };
16 |
--------------------------------------------------------------------------------
/src/features/invoices/models/interfaces/invoices-statistics.ts:
--------------------------------------------------------------------------------
1 | import { CRYPTO_CURRENCY, CurrencyAmount } from 'src/shared';
2 |
3 | export interface InvoicesAllStatistics {
4 | [CRYPTO_CURRENCY.TON]: InvoicesStatistics;
5 | [CRYPTO_CURRENCY.USDT]: InvoicesStatistics;
6 | }
7 |
8 | export interface InvoicesStatistics {
9 | totalInvoices: number;
10 | earnedTotal: CurrencyAmount;
11 | earnedLastWeek: CurrencyAmount;
12 | invoicesInProgress: number;
13 | awaitingForPaymentAmount: CurrencyAmount;
14 | }
15 |
--------------------------------------------------------------------------------
/src/shared/lib/mobx/index.ts:
--------------------------------------------------------------------------------
1 | export { createReaction } from './create-reaction';
2 | export { createImmediateReaction } from './create-immediate-reaction';
3 | export { createEffect } from './create-effect';
4 | export { createAsyncAction } from './create-async-action';
5 | export { Loadable } from './loadable';
6 | export {
7 | deserializeState,
8 | serializeState,
9 | serializeLoadableState,
10 | deserializeLoadableState
11 | } from './serialize';
12 | export { awaitValueResolved } from './await-value-resolved';
13 |
--------------------------------------------------------------------------------
/src/widgets/header/ui/logo/index.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { HStack } from '@chakra-ui/react';
3 | import { H4, TonConsoleIcon } from 'src/shared';
4 | import { Link } from 'react-router-dom';
5 |
6 | export const Logo: FunctionComponent> = props => {
7 | return (
8 |
9 |
10 | Ton Console
11 |
12 | );
13 | };
14 |
--------------------------------------------------------------------------------
/src/shared/lib/blockchain/address.ts:
--------------------------------------------------------------------------------
1 | import { TonAddress } from 'src/shared';
2 |
3 | export function shortAddress(
4 | address: string | TonAddress,
5 | options?: { maxLength: number }
6 | ): string {
7 | if (address instanceof TonAddress) {
8 | address = address.userFriendly;
9 | }
10 |
11 | const maxLength = options?.maxLength || 13;
12 | return (
13 | address.slice(0, Math.ceil((maxLength - 1) / 2)) +
14 | '…' +
15 | address.slice(-Math.floor((maxLength - 1) / 2))
16 | );
17 | }
18 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/form/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import textStyles from 'src/app/providers/with-chakra/theme/foundations/textStyles';
2 | import { definePartsStyle } from './parts';
3 |
4 | export default definePartsStyle({
5 | container: {
6 | mb: '4',
7 | color: 'text.primary',
8 | '> label': {
9 | mb: '2',
10 | ...textStyles.label2
11 | },
12 | ...textStyles.label2
13 | },
14 | requiredIndicator: {
15 | color: 'accent.red'
16 | }
17 | });
18 |
--------------------------------------------------------------------------------
/src/shared/lib/address.ts:
--------------------------------------------------------------------------------
1 | import { Address } from 'ton-core';
2 |
3 | export class TonAddress extends Address {
4 | static parse(source: string): TonAddress {
5 | const parsed = super.parse(source);
6 | return new TonAddress(parsed.workChain, parsed.hash);
7 | }
8 |
9 | public readonly userFriendly: string;
10 |
11 | constructor(...args: ConstructorParameters) {
12 | super(...args);
13 |
14 | this.userFriendly = this.toString({ urlSafe: true, bounceable: false });
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/foundations/index.ts:
--------------------------------------------------------------------------------
1 | import borders from './borders';
2 | import colors from './colors';
3 | import layerStyles from './layerStyles';
4 | import radii from './radius';
5 | import shadows from './shadows';
6 | import space from './spacing';
7 | import textStyles from './textStyles';
8 | import semanticTokens from './semanticTokens';
9 |
10 | export default {
11 | space,
12 | colors,
13 | textStyles,
14 | radii,
15 | shadows,
16 | borders,
17 | layerStyles,
18 | semanticTokens
19 | };
20 |
--------------------------------------------------------------------------------
/src/shared/api/tonapi.ts:
--------------------------------------------------------------------------------
1 | import { TonApiClient } from '@ton-api/client';
2 |
3 | const authToken = import.meta.env.VITE_TONAPI_TOKEN;
4 |
5 | export const tonapiMainnet = new TonApiClient({
6 | baseUrl: 'https://tonapi.io',
7 | apiKey: authToken
8 | });
9 |
10 | export const tonapiTestnet = new TonApiClient({
11 | baseUrl: 'https://testnet.tonapi.io',
12 | apiKey: authToken
13 | });
14 |
15 | export const isTestnet = import.meta.env.VITE_TESTNET === 'true';
16 | export const tonapiClient = isTestnet ? tonapiTestnet : tonapiMainnet;
17 |
--------------------------------------------------------------------------------
/src/shared/lib/object.ts:
--------------------------------------------------------------------------------
1 | export function replaceIfNotEqual(
2 | object: T,
3 | property: P,
4 | value: T[P],
5 | comparator?: (a: T[P], b: T[P]) => boolean
6 | ): void {
7 | comparator ||= (a, b) => a === b;
8 |
9 | if (comparator(object[property], value)) {
10 | return;
11 | }
12 |
13 | object[property] = value;
14 | }
15 |
16 | export function isObject(value: unknown): value is Record {
17 | return typeof value === 'object' && value !== null;
18 | }
19 |
--------------------------------------------------------------------------------
/.env.production:
--------------------------------------------------------------------------------
1 | VITE_BASE_URL=https://tonconsole.com/
2 | VITE_TG_OAUTH_BOT_ID=5741272273
3 | VITE_TG_OAUTH_BOT_NAME=ton_console_bot
4 | VITE_CD_CHECK_STRING=29f47bfa9f7e022f
5 | VITE_GTM_ID=G-RZKWC3V5LH
6 |
7 | # QUERY ID FOR TON TRANSFER IN TONCONSOLE
8 | VITE_DEPLOY_JETTON_QUERY_ID=8223237811436166228
9 |
10 | # NOTE THAT IT HAS IP AND DOMAIN LIMIT RESTRICTIONS.
11 | # THE USE OF THIS TOKEN IS NOT PERMITTED IN YOUR PROJECT. YOU HAVE TO CREATE YOUR OWN TOKEN.
12 | VITE_TONAPI_TOKEN=AEW557REB3RXFIQAAAAPCJMD5KWORXNJ3XGLMQNGJB2EVS2QXO7VDFMLCOX4CFPEI43U3QI
13 |
--------------------------------------------------------------------------------
/src/shared/lib/react/elements.ts:
--------------------------------------------------------------------------------
1 | export function setNativeElementValue(element: HTMLElement, value: string): void {
2 | const valueSetter = Object.getOwnPropertyDescriptor(element, 'value')?.set;
3 | const prototype = Object.getPrototypeOf(element);
4 | const prototypeValueSetter = Object.getOwnPropertyDescriptor(prototype, 'value')?.set;
5 |
6 | if (valueSetter && valueSetter !== prototypeValueSetter) {
7 | prototypeValueSetter?.call(element, value);
8 | } else {
9 | valueSetter?.call(element, value);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/shared/lib/validators/masks/number-mask.ts:
--------------------------------------------------------------------------------
1 | export const numberMask = numberMaskWithPrecision(2);
2 |
3 | // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
4 | export function numberMaskWithPrecision(precision: number) {
5 | return {
6 | mask: Number,
7 | scale: precision,
8 | signed: false,
9 | thousandsSeparator: '',
10 | padFractionalZeros: false,
11 | normalizeZeros: true,
12 | radix: '.',
13 | mapToRadix: ['.', ','],
14 | min: 0
15 | };
16 | }
17 |
--------------------------------------------------------------------------------
/src/app/providers/with-i18.ts:
--------------------------------------------------------------------------------
1 | import i18n from 'i18next';
2 | import { initReactI18next } from 'react-i18next';
3 |
4 | import Backend from 'i18next-http-backend';
5 | import LanguageDetector from 'i18next-browser-languagedetector';
6 |
7 | i18n.use(Backend)
8 | .use(LanguageDetector)
9 | .use(initReactI18next)
10 | .init({
11 | supportedLngs: ['en', 'ru'],
12 | fallbackLng: 'en',
13 | debug: true,
14 | interpolation: {
15 | escapeValue: false
16 | }
17 | });
18 |
19 | export default i18n;
20 |
--------------------------------------------------------------------------------
/src/shared/ui/textarea/textarea-group-context.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 |
3 | export const TextareaGroupContext = createContext<{
4 | hasFooter: boolean;
5 | hasRight: boolean;
6 | showScrollDivider: boolean;
7 | setShowScrollDivider: (value: boolean) => void;
8 | focused: boolean;
9 | setFocused: (value: boolean) => void;
10 | }>({
11 | hasFooter: false,
12 | hasRight: false,
13 | showScrollDivider: false,
14 | setShowScrollDivider: () => {},
15 | focused: false,
16 | setFocused: () => {}
17 | });
18 |
--------------------------------------------------------------------------------
/scripts/swagger.ts:
--------------------------------------------------------------------------------
1 | import { GenerateApiParams, generateApi } from 'swagger-typescript-api'
2 | import path from 'path';
3 |
4 | const generateApiParams: GenerateApiParams = {
5 | name: 'api.generated.ts',
6 | output: path.resolve(process.cwd(), './src/shared/api'),
7 | input: path.resolve(process.cwd(), './scripts/swagger.yaml'),
8 | typePrefix: 'DTO',
9 | enumKeyPrefix: 'DTO',
10 | extractEnums: true,
11 | generateUnionEnums: false,
12 | httpClientType: 'axios',
13 | templates: undefined
14 | };
15 |
16 | generateApi(generateApiParams);
17 |
--------------------------------------------------------------------------------
/src/shared/lib/url.ts:
--------------------------------------------------------------------------------
1 | export function addPath(url: string, path: string): string {
2 | const urlWithoutSlash = url.endsWith('/') ? url.slice(0, -1) : url;
3 | return `${urlWithoutSlash}/${path}`;
4 | }
5 |
6 | export function eqPaths(url1: string | undefined, url2: string | undefined): boolean {
7 | if (!url1 || !url2) {
8 | return false;
9 | }
10 |
11 | if (!url1.startsWith('/')) {
12 | url1 = `/${url1}`;
13 | }
14 |
15 | if (!url2.startsWith('/')) {
16 | url2 = `/${url2}`;
17 | }
18 | return url1 === url2;
19 | }
20 |
--------------------------------------------------------------------------------
/.env.staging:
--------------------------------------------------------------------------------
1 | NODE_ENV=production
2 | VITE_BASE_URL=https://dev.tonconsole.com/
3 | VITE_TG_OAUTH_BOT_ID=6270539504
4 | VITE_TG_OAUTH_BOT_NAME=ton_console_dev_bot
5 | VITE_CD_CHECK_STRING=29f47bfa9f7e022f
6 | VITE_TESTNET=true
7 |
8 | # QUERY ID FOR TON TRANSFER IN TONCONSOLE
9 | VITE_DEPLOY_JETTON_QUERY_ID=8223237811436166228
10 |
11 | # NOTE THAT IT HAS IP AND DOMAIN LIMIT RESTRICTIONS.
12 | # THE USE OF THIS TOKEN IS NOT PERMITTED IN YOUR PROJECT. YOU HAVE TO CREATE YOUR OWN TOKEN.
13 | VITE_TONAPI_TOKEN=AEW557REB3RXFIQAAAAPCJMD5KWORXNJ3XGLMQNGJB2EVS2QXO7VDFMLCOX4CFPEI43U3QI
14 |
--------------------------------------------------------------------------------
/.env.staging2:
--------------------------------------------------------------------------------
1 | NODE_ENV=production
2 | VITE_BASE_URL=https://dev.tonconsole.com/
3 | VITE_TG_OAUTH_BOT_ID=6260501474
4 | VITE_TG_OAUTH_BOT_NAME=ton_console_dev2_bot
5 | VITE_CD_CHECK_STRING=29f47bfa9f7e022f
6 | VITE_TESTNET=true
7 |
8 | # QUERY ID FOR TON TRANSFER IN TONCONSOLE
9 | VITE_DEPLOY_JETTON_QUERY_ID=8223237811436166228
10 |
11 | # NOTE THAT IT HAS IP AND DOMAIN LIMIT RESTRICTIONS.
12 | # THE USE OF THIS TOKEN IS NOT PERMITTED IN YOUR PROJECT. YOU HAVE TO CREATE YOUR OWN TOKEN.
13 | VITE_TONAPI_TOKEN=AEW557REB3RXFIQAAAAPCJMD5KWORXNJ3XGLMQNGJB2EVS2QXO7VDFMLCOX4CFPEI43U3QI
14 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/table/index.ts:
--------------------------------------------------------------------------------
1 | export { default as InvoicesTable } from './InvoicesTable';
2 | export { default as FilterInvoiceByStatus } from './FilterInvoiceByStatus';
3 | export { default as FilterInvoiceByPeriod } from './FilterInvoiceByPeriod';
4 | export { default as RefreshInvoicesTableButton } from './RefreshInvoicesTableButton';
5 | export { default as InvoicesSearchInput } from './InvoicesSearchInput';
6 | export { default as FilterInvoiceByOverpayment } from './FilterInvoiceByOverpayment';
7 | export { default as FilterInvoiceByCurrency } from './FilterInvoiceByCurrency';
8 |
--------------------------------------------------------------------------------
/src/shared/constants/EXTERNAL_LINKS.ts:
--------------------------------------------------------------------------------
1 | export enum EXTERNAL_LINKS {
2 | SUPPORT = 'https://t.me/ton_console_bot',
3 | TG_CHANNEL = 'https://t.me/tonconsole_com',
4 | TONCONNECT_MANIFEST = 'https://tonconsole.com/tonconnect-manifest.json',
5 |
6 | DOCUMENTATION = 'https://docs.tonconsole.com',
7 | DOCUMENTATION_WEBHOOKS = 'https://docs.tonconsole.com/tonapi/webhooks-api',
8 | DOCUMENTATION_LITESERVERS = 'https://docs.tonconsole.com/tonapi/liteservers',
9 | DOCUMENTATION_CNFT = 'https://docs.tonconsole.com/tonconsole/nft/cnft#cnft-indexing-service'
10 | }
11 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/charts/analytics-charts-config.ts:
--------------------------------------------------------------------------------
1 | import { AreaChartOptions } from './area-chart-options';
2 | import { BarChartOptions } from './bar-chart-options';
3 | import { PieChartOptions } from './pie-chart-options';
4 | import { LineChartOptions } from './line-chart-options';
5 |
6 | export type AnalyticsChart = AnalyticsChartOptions['type'];
7 |
8 | export type AnalyticsChartOptions =
9 | | AreaChartOptions
10 | | LineChartOptions
11 | | PieChartOptions
12 | | BarChartOptions;
13 |
14 | export type AnalyticsChartsConfig = AnalyticsChartOptions[];
15 |
--------------------------------------------------------------------------------
/scripts/airdrop.ts:
--------------------------------------------------------------------------------
1 | import { GenerateApiParams, generateApi } from 'swagger-typescript-api';
2 | import path from 'path';
3 |
4 | const generateApiParams: GenerateApiParams = {
5 | name: 'airdrop.generated.ts',
6 | output: path.resolve(process.cwd(), './src/shared/api'),
7 | input: path.resolve(process.cwd(), './scripts/airdrops.yaml'),
8 | apiClassName: 'ApiV1',
9 | typePrefix: 'AD',
10 | enumKeyPrefix: 'AD',
11 | extractEnums: true,
12 | generateUnionEnums: false,
13 | httpClientType: 'axios',
14 | templates: undefined
15 | };
16 |
17 | generateApi(generateApiParams);
18 |
--------------------------------------------------------------------------------
/scripts/airdrop2.ts:
--------------------------------------------------------------------------------
1 | import { GenerateApiParams, generateApi } from 'swagger-typescript-api';
2 | import path from 'path';
3 |
4 | const generateApiParams: GenerateApiParams = {
5 | name: 'airdrop2.generated.ts',
6 | output: path.resolve(process.cwd(), './src/shared/api'),
7 | input: path.resolve(process.cwd(), './scripts/airdrop2.yaml'),
8 | apiClassName: 'Api',
9 | typePrefix: 'AD',
10 | enumKeyPrefix: 'AD',
11 | extractEnums: true,
12 | generateUnionEnums: false,
13 | httpClientType: 'axios',
14 | templates: undefined
15 | };
16 |
17 | generateApi(generateApiParams);
18 |
--------------------------------------------------------------------------------
/scripts/webhooks.ts:
--------------------------------------------------------------------------------
1 | import { GenerateApiParams, generateApi } from 'swagger-typescript-api';
2 | import path from 'path';
3 |
4 | const generateApiParams: GenerateApiParams = {
5 | name: 'rt.tonapi.generated.ts',
6 | output: path.resolve(process.cwd(), './src/shared/api'),
7 | url: 'https://raw.githubusercontent.com/tonkeeper/opentonapi/refs/heads/master/api/rt.yml',
8 | typePrefix: 'RT',
9 | enumKeyPrefix: 'RT',
10 | extractEnums: true,
11 | generateUnionEnums: false,
12 | httpClientType: 'axios',
13 | templates: undefined
14 | };
15 |
16 | generateApi(generateApiParams);
17 |
--------------------------------------------------------------------------------
/src/shared/lib/index.ts:
--------------------------------------------------------------------------------
1 | export * from './window';
2 | export * from './types';
3 | export * from './mobx';
4 | export { imageUrlToFilesList } from './file';
5 | export { copyToClipboard } from './copy-to-clipboard';
6 | export * from './blockchain';
7 | export * from './format';
8 | export * from './css';
9 | export * from './object';
10 | export * from './currency';
11 | export * from './url';
12 | export * from './validators';
13 | export * from './react';
14 | export * from './form';
15 | export * from './env';
16 | export * from './address';
17 | export * from './number';
18 | export * from './decimals';
19 |
--------------------------------------------------------------------------------
/src/shared/ui/code-area/CodeAreaFooter.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent, PropsWithChildren } from 'react';
2 | import { Box } from '@chakra-ui/react';
3 |
4 | export const CodeAreaFooter: FunctionComponent>> = ({
5 | children,
6 | ...rest
7 | }) => {
8 | return (
9 |
16 | {children}
17 |
18 | );
19 | };
20 |
--------------------------------------------------------------------------------
/src/shared/ui/tooltip/InfoTooltip.tsx:
--------------------------------------------------------------------------------
1 | import { FC, PropsWithChildren } from 'react';
2 | import { IconProps, PopoverProps } from '@chakra-ui/react';
3 | import { TooltipHoverable } from './TooltipHoverable';
4 | import { InfoIcon16 } from '../icons';
5 |
6 | export const InfoTooltip: FC>> = ({
7 | children,
8 | placement,
9 | ...rest
10 | }) => {
11 | return (
12 | }>
13 | {children}
14 |
15 | );
16 | };
17 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/textarea/variants.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default {
4 | primary: defineStyle({
5 | backgroundColor: 'field.background',
6 | border: '1px',
7 | borderColor: 'field.border',
8 | _placeholder: {
9 | color: 'text.secondary'
10 | },
11 | _focus: {
12 | borderColor: 'field.activeBorder'
13 | },
14 | _invalid: {
15 | backgroundColor: 'field.errorBackground',
16 | borderColor: 'field.errorBorder'
17 | }
18 | })
19 | };
20 |
--------------------------------------------------------------------------------
/src/app/index.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 |
3 | import { withProviders } from './providers';
4 | import Routing from 'src/pages';
5 | import { AppInitialization, ApplyQueryParams } from 'src/processes';
6 | import FeedbackModal from 'src/features/feedback/FeedbackModal';
7 |
8 | const App: FunctionComponent = () => {
9 | return (
10 |
11 |
12 |
13 |
14 |
15 |
16 | );
17 | };
18 |
19 | export default withProviders(App);
20 |
--------------------------------------------------------------------------------
/public/icon.svg:
--------------------------------------------------------------------------------
1 |
9 |
--------------------------------------------------------------------------------
/src/shared/ui/ButtonLink.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Button } from '@chakra-ui/react';
3 |
4 | const externalLinkProps = {
5 | rel: 'noopener',
6 | target: '_blank'
7 | };
8 |
9 | const enabledLinkProps = {
10 | as: 'a'
11 | } as const;
12 |
13 | export const ButtonLink: FunctionComponent<
14 | ComponentProps & { isExternal?: boolean }
15 | > = ({ isExternal, ...rest }) => (
16 |
21 | );
22 |
--------------------------------------------------------------------------------
/src/entities/dapp/ui/CurrentDappCard.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Card } from '@chakra-ui/react';
3 | import { observer } from 'mobx-react-lite';
4 | import { DappCard } from 'src/entities';
5 | import { dappStore } from 'src/shared/stores';
6 |
7 | const CurrentDappCard: FunctionComponent<
8 | ComponentProps & { withMenu?: boolean }
9 | > = props => {
10 | const dapp = dappStore.dapps$.value[0];
11 |
12 | if (!dapp) {
13 | return null;
14 | }
15 |
16 | return ;
17 | };
18 |
19 | export default observer(CurrentDappCard);
20 |
--------------------------------------------------------------------------------
/.env.development:
--------------------------------------------------------------------------------
1 | VITE_BASE_URL=/
2 | VITE_BASE_PROXY_URL=https://dev.tonconsole.com/
3 | VITE_TG_OAUTH_BOT_ID=6278874595
4 | VITE_TG_OAUTH_BOT_NAME=ton_console_local_bot
5 | VITE_CD_CHECK_STRING=29f47bfa9f7e022f
6 | VITE_TESTNET=true
7 |
8 | # QUERY ID FOR TON TRANSFER IN TONCONSOLE
9 | VITE_DEPLOY_JETTON_QUERY_ID=8223237811436166228
10 |
11 | # NOTE THAT IT HAS IP AND DOMAIN LIMIT RESTRICTIONS.
12 | # THE USE OF THIS TOKEN IS NOT PERMITTED IN YOUR PROJECT. YOU HAVE TO CREATE YOUR OWN TOKEN.
13 | VITE_TONAPI_TOKEN=AEW557REB3RXFIQAAAAPCJMD5KWORXNJ3XGLMQNGJB2EVS2QXO7VDFMLCOX4CFPEI43U3QI
14 |
15 | # FEATURE FLAGS
16 | VITE_AVAILABLE_DELETE_PROJECT=true
17 |
--------------------------------------------------------------------------------
/src/widgets/footer/index.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Flex, Link } from '@chakra-ui/react';
3 | import { EXTERNAL_LINKS } from 'src/shared';
4 |
5 | export const Footer: FunctionComponent> = props => {
6 | return (
7 |
8 |
9 | Support
10 |
11 |
12 | Telegram Channel
13 |
14 |
15 | );
16 | };
17 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/foundations/spacing.ts:
--------------------------------------------------------------------------------
1 | const space = {
2 | 0: '0',
3 | 0.5: '2px',
4 | 1: '4px',
5 | 1.5: '6px',
6 | 2: '8px',
7 | 2.5: '10px',
8 | 3: '12px',
9 | 3.5: '14px',
10 | 4: '16px',
11 | 4.5: '18px',
12 | 5: '20px',
13 | 6: '24px',
14 | 7: '28px',
15 | 8: '32px',
16 | 9: '36px',
17 | 10: '40px',
18 | 11: '44px',
19 | 12: '48px',
20 | 14: '56px',
21 | 15: '60px',
22 | 16: '64px',
23 | 17: '68px',
24 | 18: '72px',
25 | 19: '76px',
26 | 20: '80px'
27 | } as const;
28 |
29 | export type Space = typeof space;
30 | export default space;
31 |
--------------------------------------------------------------------------------
/src/entities/balance/ui/RefillModal.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { Modal, ModalOverlay } from '@chakra-ui/react';
3 | import { observer } from 'mobx-react-lite';
4 | import RefillModalContent from 'src/entities/balance/ui/RefillModalContent';
5 |
6 | const RefillModal: FunctionComponent<{
7 | isOpen: boolean;
8 | onClose: () => void;
9 | }> = props => {
10 | return (
11 |
12 |
13 |
14 |
15 | );
16 | };
17 |
18 | export default observer(RefillModal);
19 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/query-results/analytics-table-context.ts:
--------------------------------------------------------------------------------
1 | import { createContext } from 'react';
2 | import { AnalyticsTableSource } from '../../model';
3 |
4 | type AnalyticsTableContextType = {
5 | columnsWidths: number[];
6 | setColumnsWidths: (widths: number[] | ((widths: number[]) => number[])) => void;
7 | isResizingProcess: boolean;
8 | setIsResizingProcess: (v: boolean) => void;
9 | source: AnalyticsTableSource;
10 | setIColumnWidth: (i: number, width: number) => void;
11 | };
12 |
13 | export const AnalyticsTableContext = createContext(
14 | {} as unknown as AnalyticsTableContextType
15 | );
16 |
--------------------------------------------------------------------------------
/src/pages/nft/index.tsx:
--------------------------------------------------------------------------------
1 | import { lazy } from '@loadable/component';
2 | import { Suspense } from 'react';
3 | import { Navigate, Route } from 'react-router-dom';
4 |
5 | const CNFTPage = lazy(() => import('./cnft'));
6 |
7 | const NftRouting = (
8 | <>
9 |
13 |
14 |
15 | }
16 | />
17 |
18 | } />
19 | } />
20 | >
21 | );
22 |
23 | export default NftRouting;
24 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { default as AnalyticsQueryCode } from './AnalyticsQueryCode';
2 | export { default as AnalyticsQueryResults } from './query-results/AnalyticsQueryResults';
3 | export { default as AnalyticsHistoryTable } from './history/AnalyticsHistoryTable';
4 | export { default as FilterQueryByType } from './history/FilterQueryByType';
5 | export { default as FilterQueryByRepetition } from './history/FilterQueryByRepetition';
6 | export { default as GraphAnalyticsForm } from './graph/GraphAnalyticsForm';
7 | export { default as AnalyticsQueryGTPGeneration } from './AnalyticsQueryGPTGeneration';
8 | export { GraphAddressesList } from './graph/GraphAddressesList';
9 |
--------------------------------------------------------------------------------
/src/shared/lib/validators/address-validator.ts:
--------------------------------------------------------------------------------
1 | import { Address } from '@ton/core';
2 |
3 | export function isAddressValid(
4 | address: string,
5 | { acceptTestnet = false, acceptRaw = false } = {}
6 | ): boolean {
7 | if (!Address.isRaw(address) && !Address.isFriendly(address)) {
8 | return false;
9 | }
10 |
11 | if (Address.isRaw(address) && !acceptRaw) {
12 | return false;
13 | }
14 |
15 | if (Address.isFriendly(address) && !acceptTestnet) {
16 | const { isTestOnly } = Address.parseFriendly(address);
17 | if (isTestOnly) {
18 | return false;
19 | }
20 | }
21 |
22 | return true;
23 | }
24 |
--------------------------------------------------------------------------------
/src/shared/lib/form/radio.ts:
--------------------------------------------------------------------------------
1 | import { FieldPath, FieldValues, Noop, RefCallBack, ControllerRenderProps } from 'react-hook-form';
2 |
3 | export function toBinaryRadio<
4 | TFieldValues extends FieldValues = FieldValues,
5 | TName extends FieldPath = FieldPath
6 | >(
7 | field: ControllerRenderProps
8 | ): {
9 | value: 'true' | 'false';
10 | onChange: (v: 'true' | 'false') => void;
11 | onBlur: Noop;
12 | name: TName;
13 | ref: RefCallBack;
14 | } {
15 | return {
16 | ...field,
17 | value: field.value ? 'true' : 'false',
18 | onChange: v => field.onChange(v === 'true')
19 | };
20 | }
21 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/input/variants.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | export default {
4 | primary: definePartsStyle({
5 | field: {
6 | backgroundColor: 'field.background',
7 | border: '1px',
8 | borderColor: 'field.border',
9 | _placeholder: {
10 | color: 'text.secondary'
11 | },
12 | _focus: {
13 | borderColor: 'field.activeBorder'
14 | },
15 | _invalid: {
16 | backgroundColor: 'field.errorBackground',
17 | borderColor: 'field.errorBorder'
18 | }
19 | }
20 | })
21 | };
22 |
--------------------------------------------------------------------------------
/src/entities/service/SERVICES.ts:
--------------------------------------------------------------------------------
1 | export enum SERVICE {
2 | TONAPI = 'tonapi',
3 | TONKEEPER_MESSAGES = 'tonkeeper-messages',
4 | INVOICES = 'invoices',
5 | ANALYTICS = 'analytics',
6 | NFT = 'nft',
7 | JETTON = 'jetton',
8 | FAUCET = 'faucet',
9 | DASHBOARD = 'dashboard'
10 | }
11 |
12 | export const SERVICE_NAMES: Record = {
13 | [SERVICE.TONAPI]: 'TonApi',
14 | [SERVICE.TONKEEPER_MESSAGES]: 'Tonkeeper Messages',
15 | [SERVICE.INVOICES]: 'Invoices',
16 | [SERVICE.ANALYTICS]: 'Analytics',
17 | [SERVICE.NFT]: 'NFT',
18 | [SERVICE.JETTON]: 'Jetton',
19 | [SERVICE.FAUCET]: 'Faucet',
20 | [SERVICE.DASHBOARD]: 'Dashboard'
21 | } as const;
22 |
--------------------------------------------------------------------------------
/src/pages/settings/index.tsx:
--------------------------------------------------------------------------------
1 | import { Navigate, Route } from 'react-router-dom';
2 | import { Suspense } from 'react';
3 | import { lazy } from '@loadable/component';
4 |
5 | const EditProjectPage = lazy(() => import('./edit-project'));
6 |
7 | const SettingsRouting = (
8 | <>
9 |
13 |
14 |
15 | }
16 | />
17 | } />
18 | } />
19 | >
20 | );
21 |
22 | export default SettingsRouting;
23 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/ViewInvoiceModal.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { Modal, ModalOverlay } from '@chakra-ui/react';
3 | import { Invoice } from 'src/features';
4 | import { ViewInvoiceModalContent } from 'src/features/invoices/ui/ViewInvoiceModalContent';
5 |
6 | export const ViewInvoiceModal: FunctionComponent<{
7 | isOpen: boolean;
8 | onClose: () => void;
9 | invoice: Invoice;
10 | }> = ({ isOpen, onClose, invoice }) => {
11 | return (
12 |
13 |
14 |
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/history/TestnetBadge.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Box, Flex } from '@chakra-ui/react';
3 | import { Span } from 'src/shared';
4 |
5 | export const TestnetBadge: FunctionComponent> = props => {
6 | return (
7 |
17 |
18 | Testnet
19 |
20 |
21 | );
22 | };
23 |
--------------------------------------------------------------------------------
/src/shared/lib/blockchain/explorer.ts:
--------------------------------------------------------------------------------
1 | import { TonAddress } from 'src/shared';
2 |
3 | class Explorer {
4 | constructor(private readonly baseUrl: string) {}
5 |
6 | public accountLink(userFriendlyAddress: string | TonAddress): string {
7 | if (userFriendlyAddress instanceof TonAddress) {
8 | userFriendlyAddress = userFriendlyAddress.userFriendly;
9 | }
10 |
11 | return `${this.baseUrl}/${userFriendlyAddress}`;
12 | }
13 |
14 | public transactionLink(hash: string): string {
15 | return `${this.baseUrl}/transaction/${hash}`;
16 | }
17 | }
18 |
19 | export const explorer = new Explorer('https://tonviewer.com');
20 |
21 | export const testnetExplorer = new Explorer('https://testnet.tonviewer.com');
22 |
--------------------------------------------------------------------------------
/src/shared/lib/react/merge-refs.ts:
--------------------------------------------------------------------------------
1 | import { RefCallBack } from 'react-hook-form';
2 | import { ForwardedRef, MutableRefObject, Ref } from 'react';
3 |
4 | export function mergeRefs(
5 | ...refs: (
6 | | RefCallBack
7 | | MutableRefObject
8 | | ForwardedRef
9 | | Ref
10 | | undefined
11 | )[]
12 | ): RefCallBack {
13 | return ref => {
14 | refs.forEach(item => {
15 | if (!item) {
16 | return;
17 | }
18 |
19 | if ('current' in item) {
20 | (item as unknown as MutableRefObject).current = ref;
21 | } else {
22 | item(ref);
23 | }
24 | });
25 | };
26 | }
27 |
--------------------------------------------------------------------------------
/src/shared/ui/Overlay.tsx:
--------------------------------------------------------------------------------
1 | import { Box, BoxProps } from '@chakra-ui/react';
2 | import { FC } from 'react';
3 |
4 | interface OverlayProps extends BoxProps {
5 | breadcrumbs?: React.ReactNode;
6 | }
7 |
8 | export const Overlay: FC = ({ breadcrumbs, children, ...rest }) => {
9 | return (
10 | <>
11 | {breadcrumbs}
12 |
21 | {children}
22 |
23 | >
24 | );
25 | };
26 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/index.ts:
--------------------------------------------------------------------------------
1 | export { EditInvoicesProjectForm } from './EditInvoicesProjectForm';
2 | export { default as CreateInvoicesProjectModal } from './CreateInvoicesProjectModal';
3 | export { default as InvoicesProjectInfo } from './InvoicesProjectInfo';
4 | export { default as EditInvoicesProjectModal } from './EditInvoicesProjectModal';
5 | export { default as CreateInvoiceModal } from './CreateInvoiceModal';
6 | export { CreateInvoiceFrom } from './CreateInvoiceFrom';
7 | export * from './table';
8 | export { default as InvoicesTokenRegenerateConfirmation } from './InvoicesTokenRegenerateConfirmation';
9 | export { default as CancelInvoiceConfirmation } from './CancelInvoiceConfirmation';
10 | export { default as AddWebhookModal } from './AddWebhookModal';
11 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/utils.ts:
--------------------------------------------------------------------------------
1 | import { toStructTimeLeft } from 'src/shared/lib/format/date';
2 |
3 | export function formatRepeatInterval(frequencyMS?: number): string {
4 | let repeatInterval = '';
5 | if (frequencyMS) {
6 | const repTimeStruct = toStructTimeLeft(frequencyMS);
7 | const hours = repTimeStruct.hours + repTimeStruct.days * 24;
8 | const minutes = repTimeStruct.seconds ? repTimeStruct.minutes + 1 : repTimeStruct.minutes;
9 |
10 | if (!hours) {
11 | repeatInterval = `${minutes} min`;
12 | } else if (minutes) {
13 | repeatInterval = `${hours}h ${minutes}min`;
14 | } else {
15 | repeatInterval = `${hours}h`;
16 | }
17 | }
18 |
19 | return repeatInterval;
20 | }
21 |
--------------------------------------------------------------------------------
/src/features/app-messages/ui/MessagesPaymentConfirmationModal.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { Modal, ModalOverlay } from '@chakra-ui/react';
3 | import MessagesPaymentConfirmationModalContent from './MessagesPaymentConfirmationModalContent';
4 | import { AppMessagesPackage } from '../model';
5 |
6 | export const MessagesPaymentConfirmationModal: FunctionComponent<{
7 | isOpen: boolean;
8 | onClose: () => void;
9 | pkg: AppMessagesPackage;
10 | }> = ({ pkg, isOpen, onClose }) => {
11 | return (
12 |
13 |
14 |
15 |
16 | );
17 | };
18 |
--------------------------------------------------------------------------------
/src/shared/components/StoresInitializer.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent, PropsWithChildren, useEffect, useState } from 'react';
2 | import { projectsStore } from '../stores/root.store';
3 | import { awaitValueResolved } from '../lib/mobx/await-value-resolved';
4 |
5 | export const StoresInitializer: FunctionComponent = ({ children }) => {
6 | const [isInitialized, setIsInitialized] = useState(false);
7 |
8 | useEffect(() => {
9 | const initialize = async () => {
10 | await awaitValueResolved(projectsStore.projects$);
11 | setIsInitialized(true);
12 | };
13 |
14 | initialize();
15 | }, []);
16 |
17 | if (!isInitialized) {
18 | return null;
19 | }
20 |
21 | return <>{children}>;
22 | };
23 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/card/variants.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 |
3 | const variants = {
4 | elevated: {
5 | container: {
6 | border: 'none',
7 | backgroundColor: 'background.contentTint',
8 | boxShadow: 'none'
9 | }
10 | },
11 | outline: definePartsStyle({
12 | container: {
13 | border: '1px',
14 | borderColor: 'separator.common',
15 | borderTopColor: 'separator.common',
16 | borderBottomColor: 'separator.common',
17 | borderRightColor: 'separator.common',
18 | borderLeftColor: 'separator.common',
19 | boxShadow: 'none'
20 | }
21 | })
22 | };
23 |
24 | export default variants;
25 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/table/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { definePartsStyle } from './parts';
2 | import Fonts from '../../typography/fonts';
3 | import textStyles from '../../foundations/textStyles';
4 |
5 | export default definePartsStyle({
6 | thead: {
7 | backgroundColor: 'background.contentTint'
8 | },
9 | th: {
10 | fontFamily: Fonts.mono,
11 | color: 'text.secondary',
12 | letterSpacing: 'unset',
13 | textTransform: 'unset',
14 | ...textStyles.body2
15 | },
16 | td: {
17 | borderTopColor: 'background.contentTint',
18 | borderBottomColor: 'background.contentTint',
19 | fontFamily: Fonts.mono,
20 | ...textStyles.body2,
21 | color: 'text.primary'
22 | }
23 | });
24 |
--------------------------------------------------------------------------------
/src/pages/app-messages/index.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { RegisterApp } from './RegisterApp';
3 | import { observer } from 'mobx-react-lite';
4 | import { dappStore } from 'src/shared/stores';
5 | import { Center, Spinner } from '@chakra-ui/react';
6 | import { AppMessagesDashboard } from './dashboard/AppMessagesDashboard';
7 |
8 | const AppMessagesPage: FunctionComponent = () => {
9 | if (!dappStore.dapps$.isResolved) {
10 | return (
11 |
12 |
13 |
14 | );
15 | }
16 |
17 | if (dappStore.dapps$.value.length) {
18 | return ;
19 | }
20 |
21 | return ;
22 | };
23 |
24 | export default observer(AppMessagesPage);
25 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/foundations/layerStyles.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | customScrollbar: {
3 | '::-webkit-scrollbar': {
4 | width: '2'
5 | },
6 | '::-webkit-scrollbar-track': {
7 | background: 'transparent'
8 | },
9 | '::-webkit-scrollbar-thumb': {
10 | borderRadius: '10',
11 | background: 'scrollbar.primary',
12 | transition: 'background 0.15s linear'
13 | },
14 | '::-webkit-scrollbar-thumb:hover': {
15 | background: 'scrollbar.hover'
16 | }
17 | },
18 | textEllipse: {
19 | overflow: 'hidden',
20 | textOverflow: 'ellipsis',
21 | _after: {
22 | content: '""',
23 | display: 'block'
24 | }
25 | }
26 | };
27 |
--------------------------------------------------------------------------------
/src/shared/lib/copy-to-clipboard.ts:
--------------------------------------------------------------------------------
1 | export function copyToClipboard(text: string): Promise {
2 | if (navigator?.clipboard) {
3 | return navigator.clipboard.writeText(text);
4 | }
5 |
6 | fallbackCopyTextToClipboard(text);
7 | return Promise.resolve();
8 | }
9 |
10 | function fallbackCopyTextToClipboard(text: string): void {
11 | const textArea = document.createElement('textarea');
12 | textArea.value = text;
13 |
14 | textArea.style.top = '0';
15 | textArea.style.left = '0';
16 | textArea.style.position = 'fixed';
17 |
18 | document.body.appendChild(textArea);
19 | textArea.focus();
20 | textArea.select();
21 |
22 | try {
23 | document.execCommand('copy');
24 | } finally {
25 | document.body.removeChild(textArea);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/table/RefreshInvoicesTableButton.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Button } from '@chakra-ui/react';
3 | import { observer } from 'mobx-react-lite';
4 | import { IconButton, RefreshIcon16 } from 'src/shared';
5 | import { invoicesTableStore } from 'src/features';
6 |
7 | const RefreshInvoicesTableButton: FunctionComponent> = props => {
8 | return (
9 |
11 | invoicesTableStore.loadFirstPageWithNewParams({ cancelPreviousCall: true })
12 | }
13 | icon={}
14 | aria-label="refresh table"
15 | {...props}
16 | />
17 | );
18 | };
19 |
20 | export default observer(RefreshInvoicesTableButton);
21 |
--------------------------------------------------------------------------------
/src/pages/layouts/ui/ErrorPage.tsx:
--------------------------------------------------------------------------------
1 | import { Flex, Text } from '@chakra-ui/react';
2 | import { INVOICES_LINKS } from 'src/features';
3 | import { ButtonLink, H3, Overlay } from 'src/shared';
4 |
5 | const ErrorPage = () => {
6 | return (
7 |
8 | Something went wrong
9 |
10 |
11 | We are sorry, but something went wrong. Please try again later.
12 |
13 |
14 |
15 |
16 | Contact Us
17 |
18 |
19 |
20 | );
21 | };
22 |
23 | export default ErrorPage;
24 |
--------------------------------------------------------------------------------
/src/pages/tonapi/webhooks/EmptyWebhooks.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react';
2 | import { CreateIcon96, H4 } from 'src/shared';
3 | import { Button, Flex, Text } from '@chakra-ui/react';
4 |
5 | export const EmptyWebhooks: FC<{
6 | onOpenCreate: () => void;
7 | }> = ({ onOpenCreate }) => {
8 | return (
9 |
10 |
11 |
12 | Your Webhooks will be shown here
13 |
14 | Create your first Webhook
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/src/widgets/header/ui/DocumentationButton.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react';
2 | import { observer } from 'mobx-react-lite';
3 | import { userStore } from 'src/shared/stores';
4 | import { useBreakpointValue } from '@chakra-ui/react';
5 | import { ButtonLink, DocsLogo32, EXTERNAL_LINKS } from 'src/shared';
6 |
7 | export const DocumentationButton: FC = observer(() => {
8 | const buttonText = useBreakpointValue({
9 | base: 'Docs',
10 | md: 'Documentation'
11 | });
12 |
13 | return userStore.isAuthorized() ? (
14 | }
18 | variant="secondary"
19 | >
20 | {buttonText}
21 |
22 | ) : null;
23 | });
24 |
--------------------------------------------------------------------------------
/src/entities/rates/model/rates.api.ts:
--------------------------------------------------------------------------------
1 | import { CRYPTO_CURRENCY, tonapiMainnet } from 'src/shared';
2 | import BigNumber from 'bignumber.js';
3 |
4 | const backendCurrenciesMapping = {
5 | [CRYPTO_CURRENCY.TON]: {
6 | request: 'ton',
7 | response: 'TON'
8 | },
9 | [CRYPTO_CURRENCY.USDT]: {
10 | request: 'usdt',
11 | response: 'USDT'
12 | }
13 | };
14 |
15 | export async function fetchRate(currency: CRYPTO_CURRENCY): Promise {
16 | const token = backendCurrenciesMapping[currency];
17 |
18 | const data = await tonapiMainnet.rates.getRates({
19 | tokens: [token.request],
20 | currencies: ['usd']
21 | });
22 |
23 | const tokenRate = data.rates[token.response].prices?.USD;
24 | return tokenRate ? new BigNumber(tokenRate) : new BigNumber(0);
25 | }
26 |
--------------------------------------------------------------------------------
/src/app/providers/with-ton-connect-ui.tsx:
--------------------------------------------------------------------------------
1 | import { ReactNode } from 'react';
2 | import { TonConnectUIProvider, THEME } from '@tonconnect/ui-react';
3 | import { EXTERNAL_LINKS } from 'src/shared';
4 |
5 | export const withTonConnectUI = (component: () => ReactNode) => {
6 | const WithTonConnectUI = () => (
7 |
19 | {component()}
20 |
21 | );
22 |
23 | return WithTonConnectUI;
24 | };
25 |
--------------------------------------------------------------------------------
/src/pages/tonapi/webhooks/view/EmptySubscriptions.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react';
2 | import { CreateIcon96, H4 } from 'src/shared';
3 | import { Button, Flex, Text } from '@chakra-ui/react';
4 |
5 | export const EmptySubscriptions: FC<{
6 | onOpenCreate: () => void;
7 | }> = ({ onOpenCreate }) => {
8 | return (
9 |
10 |
11 |
12 | Your Subscriptions will be shown here
13 |
14 | Add your first Subscription
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/table/FilterInvoiceByOverpayment.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Checkbox } from '@chakra-ui/react';
3 | import { observer } from 'mobx-react-lite';
4 | import { invoicesTableStore } from 'src/features';
5 |
6 | const FilterInvoiceByOverpayment: FunctionComponent> = props => {
7 | return (
8 | invoicesTableStore.toggleFilterByOverpayment()}
13 | {...props}
14 | >
15 | Overpayment
16 |
17 | );
18 | };
19 |
20 | export default observer(FilterInvoiceByOverpayment);
21 |
--------------------------------------------------------------------------------
/src/processes/ApplyQueryParams.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent, PropsWithChildren, useEffect } from 'react';
2 | import { useSearchParams } from 'react-router-dom';
3 | import { projectsStore } from 'src/shared/stores';
4 | import { observer } from 'mobx-react-lite';
5 |
6 | const ApplyQueryParams: FunctionComponent = ({ children }) => {
7 | const [searchParams, setSearchParams] = useSearchParams();
8 |
9 | useEffect(() => {
10 | const projectId = searchParams.get('project_id');
11 | if (projectId !== null) {
12 | searchParams.delete('project_id');
13 | setSearchParams(searchParams);
14 | setTimeout(() => projectsStore.selectProject(Number(projectId)));
15 | }
16 | }, []);
17 |
18 | return <>{children}>;
19 | };
20 |
21 | export default observer(ApplyQueryParams);
22 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/ton-currency-amount.ts:
--------------------------------------------------------------------------------
1 | import { TokenCurrencyAmount } from './token-currency-amount';
2 | import { CURRENCY } from './CURRENCY';
3 | import BigNumber from 'bignumber.js';
4 | import { toWei } from '../blockchain';
5 | import { CRYPTO_CURRENCY_DECIMALS } from './CRYPTO_CURRENCY';
6 |
7 | export class TonCurrencyAmount extends TokenCurrencyAmount {
8 | static fromRelativeAmount(amount: number | string | BigNumber): TonCurrencyAmount {
9 | return new TonCurrencyAmount(toWei(amount, CRYPTO_CURRENCY_DECIMALS[CURRENCY.TON]));
10 | }
11 |
12 | constructor(nanoAmount: number | string | BigNumber) {
13 | super({
14 | currency: CURRENCY.TON,
15 | decimals: CRYPTO_CURRENCY_DECIMALS[CURRENCY.TON],
16 | weiAmount: new BigNumber(nanoAmount).toString()
17 | });
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/shared/lib/types.ts:
--------------------------------------------------------------------------------
1 | import BigNumber from 'bignumber.js';
2 |
3 | export type Amount = string | number | BigNumber;
4 |
5 | export function hasProperties(
6 | value: unknown,
7 | propertyKeys: T[]
8 | ): value is Record {
9 | if (!value || typeof value !== 'object') {
10 | return false;
11 | }
12 |
13 | return propertyKeys.every(propertyKey => propertyKey in value);
14 | }
15 |
16 | export function hasProperty(
17 | value: unknown,
18 | propertyKey: T
19 | ): value is Record {
20 | return hasProperties(value, [propertyKey]);
21 | }
22 |
23 | export function exhaustiveCheck(val: never): void {
24 | console.error('Case', val, 'was not included to the switch-case');
25 | }
26 |
27 | export function notNull(val: T | null): val is T {
28 | return !!val;
29 | }
30 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/menu/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import { defineStyle } from '@chakra-ui/react';
2 |
3 | export default defineStyle({
4 | list: {
5 | p: '2',
6 | borderRadius: 'lg',
7 | border: 'none',
8 | bg: 'background.content',
9 | boxShadow: 'dropdown',
10 | minWidth: 'unset'
11 | },
12 | item: {
13 | pl: 2,
14 | py: 2,
15 | pr: 3,
16 | apply: 'textStyles.label2',
17 | color: 'text.primary',
18 | borderRadius: 'md',
19 | bg: 'background.content',
20 | _focus: {
21 | bg: 'background.content'
22 | },
23 | _hover: {
24 | bg: 'button.secondary.backgroundHover',
25 | _disabled: {
26 | bg: 'background.content !important'
27 | }
28 | }
29 | }
30 | });
31 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/history/FilterQueryByRepetition.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Checkbox } from '@chakra-ui/react';
3 | import { observer } from 'mobx-react-lite';
4 | import { analyticsHistoryTableStore } from 'src/features';
5 |
6 | const FilterQueryByRepetition: FunctionComponent> = props => {
7 | return (
8 | analyticsHistoryTableStore.toggleFilterByRepeating()}
13 | {...props}
14 | >
15 | Only Repetitive
16 |
17 | );
18 | };
19 |
20 | export default observer(FilterQueryByRepetition);
21 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/index.ts:
--------------------------------------------------------------------------------
1 | import { extendTheme, theme as defaultTheme } from '@chakra-ui/react';
2 | import breakpoints from './breakpoints/breakpoints';
3 | import components from './components';
4 | import typography from './typography';
5 | import foundations from './foundations';
6 | import styles from './global-styles';
7 |
8 | const theme = extendTheme(
9 | {
10 | ...typography,
11 | ...foundations,
12 | styles,
13 | components
14 | },
15 | {
16 | config: defaultTheme.config,
17 | direction: defaultTheme.direction,
18 | transition: defaultTheme.transition,
19 | breakpoints,
20 | zIndices: defaultTheme.zIndices,
21 | sizes: {},
22 | fontSizes: {},
23 | fontWeights: {},
24 | letterSpacings: {},
25 | lineHeights: {}
26 | }
27 | );
28 |
29 | export default theme;
30 |
--------------------------------------------------------------------------------
/src/shared/ui/input/eject-register-props.ts:
--------------------------------------------------------------------------------
1 | import { UseFormRegisterReturn } from 'react-hook-form';
2 |
3 | export function ejectRegisterProps(
4 | props: UseFormRegisterReturn
5 | ): {
6 | register: Omit;
7 | rest?: T;
8 | } {
9 | const {
10 | onChange,
11 | onBlur,
12 | name,
13 | min,
14 | max,
15 | maxLength,
16 | minLength,
17 | pattern,
18 | required,
19 | disabled,
20 | ...rest
21 | } = props;
22 |
23 | return {
24 | register: {
25 | onChange,
26 | onBlur,
27 | name,
28 | min,
29 | max,
30 | maxLength,
31 | minLength,
32 | pattern,
33 | required,
34 | disabled
35 | },
36 | rest: rest as T
37 | };
38 | }
39 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/DocsLogo32.tsx:
--------------------------------------------------------------------------------
1 | import { Icon, IconProps } from '@chakra-ui/react';
2 | import { FC } from 'react';
3 |
4 | export const DocsLogo32: FC = props => {
5 | return (
6 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | );
22 | };
23 |
--------------------------------------------------------------------------------
/src/shared/hooks/useIsTextTruncated.ts:
--------------------------------------------------------------------------------
1 | import { useCallback, useLayoutEffect, useState } from 'react';
2 | import useResizeObserver from '@react-hook/resize-observer';
3 |
4 | export function useIsTextTruncated(): {
5 | isTruncated: boolean;
6 | ref: (node: HTMLElement | null) => void;
7 | } {
8 | const [isTruncated, setIsTruncated] = useState(false);
9 | const [node, ref] = useState(null);
10 |
11 | const computeIsEllipseActive = useCallback(() => {
12 | setIsTruncated(
13 | node
14 | ? node.offsetWidth < node.scrollWidth || node.offsetHeight < node.scrollHeight
15 | : false
16 | );
17 | }, [node]);
18 |
19 | useLayoutEffect(() => {
20 | computeIsEllipseActive();
21 | }, [computeIsEllipseActive]);
22 |
23 | useResizeObserver(node, computeIsEllipseActive);
24 | return { isTruncated, ref };
25 | }
26 |
--------------------------------------------------------------------------------
/src/shared/hooks/useSearchParams.ts:
--------------------------------------------------------------------------------
1 | import { useCallback } from 'react';
2 | import { useSearchParams as useSearchParamsRRD } from 'react-router-dom';
3 |
4 | export const useSearchParams = () => {
5 | const [searchParams, setSearchParams] = useSearchParamsRRD();
6 | const updateSearchParams = useCallback(
7 | (params: Record) => {
8 | const updatedParams = new URLSearchParams(searchParams);
9 | Object.entries(params).forEach(([key, value]) => {
10 | if (value === null) {
11 | updatedParams.delete(key);
12 | return;
13 | }
14 | updatedParams.set(key, value);
15 | });
16 | setSearchParams(updatedParams);
17 | },
18 | [searchParams, setSearchParams]
19 | );
20 | return { searchParams, setSearchParams, updateSearchParams };
21 | };
22 |
--------------------------------------------------------------------------------
/src/pages/tonapi/pricing/index.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react';
2 | import { H4, Overlay, TgChannelCardLink } from 'src/shared';
3 | import { Box, Divider, Flex, Text } from '@chakra-ui/react';
4 | import { TonApiTiers } from 'src/features';
5 | import { Link } from 'react-router-dom';
6 |
7 | const PricingPage: FC = () => {
8 | return (
9 |
10 |
11 |
12 | Pricing
13 |
14 | All bills
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | );
23 | };
24 |
25 | export default PricingPage;
26 |
--------------------------------------------------------------------------------
/src/widgets/header/index.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Logo } from 'src/widgets/header/ui/logo';
3 | import { Flex } from '@chakra-ui/react';
4 | import { TgUserButton, SelectProject } from 'src/entities';
5 | import { DocumentationButton } from './ui/DocumentationButton';
6 |
7 | export const Header: FunctionComponent> = props => {
8 | return (
9 |
20 |
21 |
22 |
23 |
24 |
25 | );
26 | };
27 |
--------------------------------------------------------------------------------
/src/shared/ui/index.ts:
--------------------------------------------------------------------------------
1 | export * from './icons';
2 | export * from './typography';
3 | export { MenuButtonDefault } from './MenuButtonDefault';
4 | export { MenuButtonIcon } from './MenuButtonIcon';
5 | export { Overlay } from './Overlay';
6 | export * from './dropdown-menu';
7 | export * from './image-input';
8 | export * from './image';
9 | export { Pad } from './Pad';
10 | export { CopyPad } from './CopyPad';
11 | export { ButtonLink } from './ButtonLink';
12 | export * from './async-input';
13 | export * from './tooltip';
14 | export { Span } from './Span';
15 | export * from './checkbox';
16 | export { CardLink } from './CardLink';
17 | export * from './options-input';
18 | export { IconButton } from './IconButton';
19 | export * from './code-area';
20 | export { NumberedTextArea } from './NumberedTextArea';
21 | export * from './textarea';
22 | export * from './TgChannelCardLink';
23 | export { default as Pagination } from './Pagination';
24 |
--------------------------------------------------------------------------------
/src/pages/tonapi/api-keys/SelectPlanFirstly.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { CreateIcon96, H4, Overlay } from 'src/shared';
3 | import { Button, Flex, Text } from '@chakra-ui/react';
4 | import { Link } from 'react-router-dom';
5 |
6 | export const SelectPlanFirstly: FunctionComponent = () => {
7 | return (
8 |
9 |
10 |
11 | Your API keys will be shown here
12 |
13 | For start choose your TON API plan.
14 |
15 |
16 |
17 |
18 |
19 |
20 | );
21 | };
22 |
--------------------------------------------------------------------------------
/src/pages/tonapi/webhooks/SelectPlanFirstly.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { CreateIcon96, H4, Overlay } from 'src/shared';
3 | import { Button, Flex, Text } from '@chakra-ui/react';
4 | import { Link } from 'react-router-dom';
5 |
6 | export const SelectPlanFirstly: FunctionComponent = () => {
7 | return (
8 |
9 |
10 |
11 | Your API keys will be shown here
12 |
13 | For start choose your TON API plan.
14 |
15 |
16 |
17 |
18 |
19 |
20 | );
21 | };
22 |
--------------------------------------------------------------------------------
/src/shared/stores/app.store.ts:
--------------------------------------------------------------------------------
1 | import { makeAutoObservable } from 'mobx';
2 | import { awaitValueResolved } from 'src/shared';
3 | import { ProjectsStore } from 'src/entities/project/model/projects.store';
4 | import { UserStore } from 'src/entities/user/model/user.store';
5 |
6 | interface AppStoreDependencies {
7 | userStore: UserStore;
8 | projectsStore: ProjectsStore;
9 | }
10 |
11 | export class AppStore {
12 | isInitialized = false;
13 |
14 | constructor(dependencies: AppStoreDependencies) {
15 | makeAutoObservable(this);
16 | this.waitForInitialization(dependencies);
17 | }
18 |
19 | private async waitForInitialization({ userStore, projectsStore }: AppStoreDependencies) {
20 | await awaitValueResolved(userStore.user$);
21 |
22 | if (userStore.user$.value) {
23 | await awaitValueResolved(projectsStore.projects$);
24 | }
25 |
26 | this.isInitialized = true;
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "allowImportingTsExtensions": true,
4 | "target": "ESNext",
5 | "useDefineForClassFields": true,
6 | "lib": ["DOM", "DOM.Iterable", "ESNext"],
7 | "allowJs": false,
8 | "skipLibCheck": true,
9 | "esModuleInterop": false,
10 | "allowSyntheticDefaultImports": true,
11 | "strict": true,
12 | "forceConsistentCasingInFileNames": true,
13 | "module": "ESNext",
14 | "moduleResolution": "Node",
15 | "resolveJsonModule": true,
16 | "isolatedModules": true,
17 | "noEmit": true,
18 | "jsx": "react-jsx",
19 | "baseUrl": "./",
20 | "rootDir": ".",
21 | "paths": {
22 | "src/*": ["./src/*"]
23 | },
24 | "incremental": true
25 | },
26 | "include": ["src"],
27 | "exclude": ["tests"],
28 | "references": [{ "path": "./tsconfig.vite.json" }]
29 | }
30 |
--------------------------------------------------------------------------------
/src/pages/jetton/airdrops/create/InfoComponent.tsx:
--------------------------------------------------------------------------------
1 | import { Card, Flex, Text } from '@chakra-ui/react';
2 | import { InfoIcon16 } from 'src/shared';
3 |
4 | export const InfoComponent = () => {
5 | return (
6 |
7 |
8 |
9 |
10 | Wallet connection is done through TON Connect. Only wallet version W5 is
11 | supported. The address of the connected wallet will be considered the
12 | administrator's address, and all subsequent actions will be available
13 | only from it.
14 |
15 |
16 |
17 |
18 |
19 | );
20 | };
21 |
--------------------------------------------------------------------------------
/src/shared/hooks/useCountdown.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 | import { usePrevious } from 'src/shared';
3 |
4 | export function useCountdown(value: number, options?: { frequencyMS?: number }): number {
5 | const prevValue = usePrevious(value);
6 | const [count, setCount] = useState(value < 0 ? 0 : value);
7 | const frequencyMS = options?.frequencyMS || 1000;
8 |
9 | const shouldComplete = count === 0;
10 |
11 | useEffect(() => {
12 | if (shouldComplete) {
13 | return;
14 | }
15 |
16 | const timer = setInterval(() => {
17 | setCount(val => val - 1);
18 | }, frequencyMS);
19 | return () => clearInterval(timer);
20 | }, [shouldComplete, frequencyMS]);
21 |
22 | useEffect(() => {
23 | if (prevValue !== undefined && value !== prevValue) {
24 | setCount(value < 0 ? 0 : value);
25 | }
26 | }, [value, prevValue]);
27 |
28 | return count;
29 | }
30 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/global-styles.ts:
--------------------------------------------------------------------------------
1 | export default {
2 | global: {
3 | 'html, body, #root': {
4 | height: '100%'
5 | },
6 | body: {
7 | backgroundColor: 'background.page',
8 | WebkitTouchCallout: 'none'
9 | },
10 | img: {
11 | WebkitUserSelect: 'none',
12 | KhtmlUserSelect: 'none',
13 | MozUserSelect: 'none',
14 | OUserSelect: 'none',
15 | userSelect: 'none'
16 | },
17 | '[data-tc-dropdown-button="true"]': {
18 | backgroundColor: 'background.contentTint',
19 | boxShadow: 'none',
20 | _hover: {
21 | transform: 'none'
22 | },
23 | _active: {
24 | transform: 'none'
25 | }
26 | },
27 | '[data-popper-arrow] > div': {
28 | backgroundColor: 'background.content !important'
29 | }
30 | }
31 | };
32 |
--------------------------------------------------------------------------------
/src/pages/dashboard/index.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { H4, Overlay, TgChannelCardLink } from 'src/shared';
3 | import { DashboardCardsList, DashboardChart, FeaturesList } from 'src/features';
4 | import { Flex, Text } from '@chakra-ui/react';
5 |
6 | const DashboardPage: FunctionComponent = () => {
7 | return (
8 | <>
9 |
10 |
11 | Dashboard
12 |
13 |
14 |
15 |
16 | Api requests on behalf
17 |
18 |
19 |
20 |
21 | >
22 | );
23 | };
24 |
25 | export default DashboardPage;
26 |
--------------------------------------------------------------------------------
/src/pages/jetton/index.tsx:
--------------------------------------------------------------------------------
1 | import { lazy } from '@loadable/component';
2 | import { Suspense } from 'react';
3 | import { Navigate, Route, Routes } from 'react-router-dom';
4 |
5 | const MinterRouting = lazy(() => import('./minter'));
6 | const AirdropsRouting = lazy(() => import('./airdrops'));
7 |
8 | const JettonRouting = () => (
9 |
10 |
14 |
15 |
16 | }
17 | />
18 |
22 |
23 |
24 | }
25 | />
26 | } />
27 | } />
28 |
29 | );
30 |
31 | export default JettonRouting;
32 |
--------------------------------------------------------------------------------
/src/shared/lib/currency/currency-amount.ts:
--------------------------------------------------------------------------------
1 | import { CURRENCY } from './CURRENCY';
2 | import BigNumber from 'bignumber.js';
3 |
4 | export interface CurrencyAmount {
5 | readonly currency: CURRENCY;
6 |
7 | readonly amount: BigNumber;
8 |
9 | stringCurrency: string;
10 |
11 | stringAmount: string;
12 |
13 | stringCurrencyAmount: string;
14 |
15 | stringAmountWithoutRound: string;
16 |
17 | toStringAmount(options?: { decimalPlaces?: number; thousandSeparators?: boolean }): string;
18 |
19 | toStringCurrencyAmount(options?: {
20 | decimalPlaces?: number;
21 | thousandSeparators?: boolean;
22 | }): string;
23 |
24 | toJSON(): unknown;
25 |
26 | isGTE(currencyAmount: CurrencyAmount): boolean;
27 |
28 | isGT(currencyAmount: CurrencyAmount): boolean;
29 |
30 | isEQ(currencyAmount: CurrencyAmount): boolean;
31 |
32 | isLTE(currencyAmount: CurrencyAmount): boolean;
33 |
34 | isLT(currencyAmount: CurrencyAmount): boolean;
35 | }
36 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/ChevronRightIcon16.tsx:
--------------------------------------------------------------------------------
1 | import { Icon, IconProps } from '@chakra-ui/react';
2 | import { FC } from 'react';
3 |
4 | export const ChevronRightIcon16: FC = props => {
5 | return (
6 |
15 |
21 |
22 | );
23 | };
24 |
--------------------------------------------------------------------------------
/src/entities/stats/Card.tsx:
--------------------------------------------------------------------------------
1 | import { BoxProps, Card, CardBody, CardHeader, Skeleton } from '@chakra-ui/react';
2 | import { FC } from 'react';
3 | import { H4 } from 'src/shared';
4 |
5 | export const StatsCard: FC<
6 | BoxProps & {
7 | header: string;
8 | value: string | number;
9 | loading?: boolean;
10 | onClick?: () => void;
11 | }
12 | > = ({ header, value, loading = false, onClick, ...props }) => {
13 | return (
14 |
21 |
22 | {header}
23 |
24 | {loading ? : {value}
}
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/src/shared/lib/mobx/create-async-action.ts:
--------------------------------------------------------------------------------
1 | import { makeObservable, observable } from 'mobx';
2 |
3 | /* eslint-disable-next-line @typescript-eslint/no-explicit-any */
4 | export function createAsyncAction Promise>(
5 | action: T,
6 | onError?: (e: unknown) => void
7 | ): T & { isLoading: boolean; error: unknown } {
8 | const fn = (async (...args) => {
9 | fn.error = '';
10 | fn.isLoading = true;
11 |
12 | try {
13 | return await action(...args);
14 | } catch (e) {
15 | fn.error = e;
16 | onError?.(e);
17 | throw e;
18 | } finally {
19 | fn.isLoading = false;
20 | }
21 | }) as T & {
22 | isLoading: boolean;
23 | error: unknown;
24 | };
25 |
26 | fn.isLoading = false;
27 | fn.error = '';
28 | makeObservable(fn, {
29 | isLoading: observable,
30 | error: observable
31 | });
32 |
33 | return fn;
34 | }
35 |
--------------------------------------------------------------------------------
/src/features/analytics/model/interfaces/analytics-graph-query.ts:
--------------------------------------------------------------------------------
1 | import { TonAddress, TonCurrencyAmount } from 'src/shared';
2 |
3 | export interface AnalyticsGraphQueryBasic {
4 | type: 'graph';
5 | id: string;
6 | addresses: TonAddress[];
7 | isBetweenSelectedOnly: boolean;
8 | creationDate: Date;
9 | }
10 |
11 | export interface AnalyticsGraphQuerySuccess extends AnalyticsGraphQueryBasic {
12 | status: 'success';
13 | resultUrl: string;
14 | spentTimeMS: number;
15 | cost: TonCurrencyAmount;
16 | }
17 |
18 | export interface AnalyticsGraphQueryPending extends AnalyticsGraphQueryBasic {
19 | status: 'executing';
20 | }
21 |
22 | export interface AnalyticsGraphQueryError extends AnalyticsGraphQueryBasic {
23 | status: 'error';
24 | errorReason: string;
25 | spentTimeMS: number;
26 | cost: TonCurrencyAmount;
27 | }
28 |
29 | export type AnalyticsGraphQuery =
30 | | AnalyticsGraphQuerySuccess
31 | | AnalyticsGraphQueryPending
32 | | AnalyticsGraphQueryError;
33 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/PlusIcon16.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const PlusIcon16: FunctionComponent> = props => {
5 | return (
6 |
15 |
21 |
22 | );
23 | };
24 |
--------------------------------------------------------------------------------
/src/pages/tonapi/api-keys/EmptyApiKeys.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { CreateIcon96, H4, Overlay } from 'src/shared';
3 | import { Button, Flex, Text, useDisclosure } from '@chakra-ui/react';
4 | import { CreateApiKeyModal } from 'src/features';
5 |
6 | export const EmptyApiKeys: FunctionComponent = () => {
7 | const { isOpen, onClose, onOpen } = useDisclosure();
8 | return (
9 |
10 |
11 |
12 | Your API keys will be shown here
13 |
14 | Create your first API key
15 |
16 |
17 |
18 |
19 |
20 | );
21 | };
22 |
--------------------------------------------------------------------------------
/src/shared/lib/format/address.ts:
--------------------------------------------------------------------------------
1 | import { Address } from '@ton/core';
2 | import { TonAddress } from 'src/shared';
3 |
4 | export function toUserFriendlyAddress(
5 | rawAddress: string,
6 | options?: { bounceable?: boolean; testOnly?: boolean }
7 | ): string {
8 | return Address.parse(rawAddress).toString({
9 | bounceable: options?.bounceable,
10 | testOnly: options?.testOnly
11 | });
12 | }
13 |
14 | export function sliceAddress(
15 | address: string | TonAddress | Address,
16 | options?: { headLength?: number; tailLength?: number; bounceable?: boolean }
17 | ): string {
18 | const headLength = options?.headLength || 6;
19 | const tailLength = options?.headLength || 4;
20 | if (address instanceof TonAddress) {
21 | address = address.userFriendly;
22 | }
23 | if (address instanceof Address) {
24 | address = address.toString({ bounceable: options?.bounceable });
25 | }
26 | return `${address.slice(0, headLength)}…${address.slice(-tailLength)}`;
27 | }
28 |
--------------------------------------------------------------------------------
/src/shared/ui/code-area/CodeAreaGroup.tsx:
--------------------------------------------------------------------------------
1 | import {
2 | Children,
3 | ComponentProps,
4 | createContext,
5 | FunctionComponent,
6 | isValidElement,
7 | PropsWithChildren,
8 | useMemo
9 | } from 'react';
10 | import { Box } from '@chakra-ui/react';
11 | import { CodeAreaFooter } from 'src/shared/ui/code-area/CodeAreaFooter';
12 |
13 | export const CodeAreaGroupContext = createContext<{ hasFooter: boolean }>({ hasFooter: false });
14 |
15 | export const CodeAreaGroup: FunctionComponent>> = ({
16 | children,
17 | ...props
18 | }) => {
19 | const hasFooter = useMemo(
20 | () =>
21 | Children.toArray(children).some(
22 | child => isValidElement(child) && child.type === CodeAreaFooter
23 | ),
24 | [children]
25 | );
26 | return (
27 |
28 | {children}
29 |
30 | );
31 | };
32 |
--------------------------------------------------------------------------------
/src/shared/ui/IconButton.tsx:
--------------------------------------------------------------------------------
1 | import { forwardRef, IconButton as ChakraIconButton } from '@chakra-ui/react';
2 | import { ComponentProps } from 'react';
3 |
4 | export const IconButton = forwardRef<
5 | ComponentProps & {
6 | iconColor?: string;
7 | iconColorHover?: string;
8 | iconColorActive?: string;
9 | },
10 | typeof ChakraIconButton
11 | >(({ iconColor, iconColorHover, iconColorActive, ...rest }, ref) => (
12 |
31 | ));
32 |
--------------------------------------------------------------------------------
/patches/ton-core+0.49.1.patch:
--------------------------------------------------------------------------------
1 | diff --git a/node_modules/ton-core/dist/address/Address.js b/node_modules/ton-core/dist/address/Address.js
2 | index 3d8c5dd..5fdce44 100644
3 | --- a/node_modules/ton-core/dist/address/Address.js
4 | +++ b/node_modules/ton-core/dist/address/Address.js
5 | @@ -137,7 +137,6 @@ class Address {
6 | this[_a] = () => this.toString();
7 | this.workChain = workChain;
8 | this.hash = hash;
9 | - Object.freeze(this);
10 | }
11 | equals(src) {
12 | if (src.workChain !== this.workChain) {
13 | diff --git a/node_modules/ton-core/src/address/Address.ts b/node_modules/ton-core/src/address/Address.ts
14 | index c554e17..c3e33a9 100644
15 | --- a/node_modules/ton-core/src/address/Address.ts
16 | +++ b/node_modules/ton-core/src/address/Address.ts
17 | @@ -112,7 +112,6 @@ export class Address {
18 | constructor(workChain: number, hash: Buffer) {
19 | this.workChain = workChain;
20 | this.hash = hash;
21 | - Object.freeze(this);
22 | }
23 |
24 | toRawString = () => {
25 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/ArrowIcon.tsx:
--------------------------------------------------------------------------------
1 | import { forwardRef, Icon } from '@chakra-ui/react';
2 | import { ComponentProps } from 'react';
3 |
4 | export const ArrowIcon = forwardRef, typeof Icon>((props, ref) => {
5 | return (
6 |
16 |
22 |
23 | );
24 | });
25 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/history/AnalyticsQueryStatusBadge.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Badge, forwardRef } from '@chakra-ui/react';
3 | import { AnalyticsQuery } from '../../model';
4 | import { Span } from 'src/shared';
5 |
6 | const queryBadges: Record = {
7 | success: {
8 | color: 'badge.success',
9 | label: 'Success'
10 | },
11 | executing: {
12 | color: 'badge.warning',
13 | label: 'Pending'
14 | },
15 | error: {
16 | color: 'badge.danger',
17 | label: 'Error'
18 | }
19 | };
20 |
21 | export const AnalyticsQueryStatusBadge: FunctionComponent<
22 | ComponentProps & { status: AnalyticsQuery['status'] }
23 | > = forwardRef(({ status, ...rest }, ref) => {
24 | const badge = queryBadges[status];
25 |
26 | return (
27 |
28 | {badge.label}
29 |
30 | );
31 | });
32 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/query-results/charts/ChartCard.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent, PropsWithChildren } from 'react';
2 | import { Box, Flex } from '@chakra-ui/react';
3 | import { CloseIcon24, IconButton, Span } from 'src/shared';
4 |
5 | export const ChartCard: FunctionComponent<
6 | PropsWithChildren> & { label: string; onClose: () => void }
7 | > = ({ label, children, onClose, ...rest }) => {
8 | return (
9 |
18 |
19 |
20 | {label}
21 |
22 | } aria-label="Close" onClick={onClose} />
23 |
24 | {children}
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/DoneIcon16.tsx:
--------------------------------------------------------------------------------
1 | import { forwardRef, Icon } from '@chakra-ui/react';
2 | import { ComponentProps } from 'react';
3 |
4 | export const DoneIcon16 = forwardRef, typeof Icon>((props, ref) => {
5 | return (
6 |
15 |
21 |
22 | );
23 | });
24 |
25 | DoneIcon16.displayName = 'DoneIcon16';
26 |
--------------------------------------------------------------------------------
/src/shared/ui/async-input/index.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, forwardRef } from 'react';
2 | import { Input, InputGroup, InputRightElement, Spinner } from '@chakra-ui/react';
3 | import { AsyncValidationState } from '../../hooks';
4 | import { TickIcon } from '../icons';
5 |
6 | export const AsyncInput = forwardRef<
7 | HTMLInputElement,
8 | ComponentProps & {
9 | validationState: AsyncValidationState;
10 | }
11 | >(({ validationState, ...rest }, ref) => {
12 | return (
13 |
14 |
15 | {validationState !== 'idle' && (
16 |
17 | {validationState === 'validating' ? (
18 |
19 | ) : (
20 |
21 | )}
22 |
23 | )}
24 |
25 | );
26 | });
27 |
28 | AsyncInput.displayName = 'AsyncInput';
29 |
--------------------------------------------------------------------------------
/src/shared/ui/textarea/TextareaRight.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent, PropsWithChildren, useContext } from 'react';
2 | import { Box } from '@chakra-ui/react';
3 | import { TextareaGroupContext } from './textarea-group-context';
4 |
5 | export const TextareaRight: FunctionComponent>> = ({
6 | children,
7 | ...rest
8 | }) => {
9 | const { focused } = useContext(TextareaGroupContext);
10 | return (
11 |
26 | {children}
27 |
28 | );
29 | };
30 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/CancelIcon24.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const CancelIcon24: FunctionComponent> = props => {
5 | return (
6 |
14 |
20 |
21 | );
22 | };
23 |
--------------------------------------------------------------------------------
/src/features/invoices/ui/table/InvoiceOverpayment.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Box, Flex } from '@chakra-ui/react';
3 | import { Invoice } from 'src/features';
4 | import { FilledInfoIcon16, Span } from 'src/shared';
5 |
6 | export const InvoiceOverpayment: FunctionComponent<
7 | { invoice: Invoice } & ComponentProps
8 | > = props => {
9 | const { invoice, ...rest } = props;
10 |
11 | return (
12 |
22 |
23 |
24 | Overpayment:
25 | {invoice.overpayment!.toStringCurrencyAmount({ decimalPlaces: null })}
26 |
27 |
28 | );
29 | };
30 |
--------------------------------------------------------------------------------
/src/pages/tonapi/liteservers/EmptyLiteservers.tsx:
--------------------------------------------------------------------------------
1 | import { FC } from 'react';
2 | import { EXTERNAL_LINKS } from 'src/shared';
3 | import { Text } from '@chakra-ui/react';
4 | import { EmptyPage } from 'src/entities';
5 |
6 | export const EmptyLiteservers: FC<{
7 | onOpenCreate: () => void;
8 | }> = ({ onOpenCreate }) => {
9 | return (
10 |
17 |
18 | The LiteServers service allows you to create and gain direct access to LiteServers
19 | in the TON network.
20 |
21 |
22 | Enjoy seamless access to TON blockchain data without the complexity and overhead of
23 | full synchronization on your infrastructure.
24 |
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/src/shared/hooks/useCountup.ts:
--------------------------------------------------------------------------------
1 | import { useEffect, useState } from 'react';
2 | import { usePrevious } from 'src/shared';
3 |
4 | export function useCountup(
5 | value: number,
6 | options?: { frequencyMS?: number; limit: number }
7 | ): number {
8 | const prevValue = usePrevious(value);
9 | const [count, setCount] = useState(value < 0 ? 0 : value);
10 | const frequencyMS = options?.frequencyMS || 1000;
11 |
12 | const shouldComplete = options?.limit && count === options.limit;
13 |
14 | useEffect(() => {
15 | if (shouldComplete) {
16 | return;
17 | }
18 |
19 | const timer = setInterval(() => {
20 | setCount(val => val + 1);
21 | }, frequencyMS);
22 | return () => clearInterval(timer);
23 | }, [shouldComplete, frequencyMS]);
24 |
25 | useEffect(() => {
26 | if (prevValue !== undefined && value !== prevValue) {
27 | return setCount(options?.limit && value > options.limit ? options.limit : value);
28 | }
29 | }, [value, prevValue, options?.limit]);
30 |
31 | return count;
32 | }
33 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/ConsoleDocsIcon32.tsx:
--------------------------------------------------------------------------------
1 | import { Icon, forwardRef } from '@chakra-ui/react';
2 | import { ComponentProps } from 'react';
3 |
4 | export const ConsoleDocsIcon32 = forwardRef, typeof Icon>(
5 | (props, ref) => {
6 | return (
7 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | );
23 | }
24 | );
25 |
26 | ConsoleDocsIcon32.displayName = 'ConsoleDocsIcon32';
27 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Ton Console
2 | Launch a successful business with TON blockchain: manage dapps, tokens and payments in one place with powerful API and deep commercial integrations
3 |
4 | [Try it](https://tonconsole.com/)
5 |
6 | 
7 |
8 | ## Run locally
9 | 1. `nvm use`
10 | 2`npm i`
11 | 3`npm run dev`
12 |
13 | ### Generate api
14 | 1. Put new swagger.yaml to the `./scripts`
15 | 2. `npm run generate-api`
16 |
17 | ### Lint & test
18 | - lint (eslint & prettier): `npm run lint`
19 | - test (vitest): `npm run test`
20 | - check typings (vite DOESN'T do it automatically): `npx tsc --noEmit`
21 |
22 | ### Husky pre-commit hook
23 | Runs lint for staged files and checks typescript typings
24 | (You don't have to install or configure husky, it is done automatically)
25 |
26 | ## Build for dev
27 | 1. `nvm use`
28 | 2. `npm ci`
29 | 3. `npm run build:staging`
30 |
31 | ## Build for dev2
32 | 1. `nvm use`
33 | 2. `npm ci`
34 | 3. `npm run build:staging2`
35 |
36 | ## Build for prod
37 | 1. `nvm use`
38 | 2. `npm ci`
39 | 3. `npm run build`
40 |
41 |
--------------------------------------------------------------------------------
/src/entities/project/ui/DeleteProjectConfirmation.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { Text } from '@chakra-ui/react';
3 | import { ConfirmationDialog } from 'src/entities/confirmation-dialog';
4 |
5 | export const DeleteProjectConfirmation: FunctionComponent<
6 | { projectName: string } & { isOpen: boolean; onClose: () => void; onConfirm: () => void }
7 | > = props => {
8 | const { projectName, isOpen, onClose, onConfirm } = props;
9 |
10 | return (
11 | `Delete ${v}`}
16 | description={v => (
17 | <>
18 |
19 | This action cannot be canceled. To confirm, type {v} in the box
20 | below.
21 |
22 | >
23 | )}
24 | confirmValue={projectName}
25 | confirmButtonText="Delete"
26 | />
27 | );
28 | };
29 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/index.ts:
--------------------------------------------------------------------------------
1 | import Button from './button';
2 | import Heading from './heading';
3 | import Menu from './menu';
4 | import Text from './text';
5 | import Link from './link';
6 | import Modal from './modal';
7 | import Form from './form';
8 | import Input from './input';
9 | import FormError from './form-error';
10 | import Card from './card';
11 | import Divider from './divider';
12 | import Table from './table';
13 | import Popover from './popover';
14 | import Textarea from './textarea';
15 | import Checkbox from './checkbox';
16 | import Tooltip from './tooltip';
17 | import Tabs from './tabs';
18 | import Code from './code';
19 | import Badge from './badge';
20 | import Radio from './radio';
21 | import Skeleton from './skeleton';
22 |
23 | export default {
24 | Button,
25 | Heading,
26 | Menu,
27 | Text,
28 | Link,
29 | Modal,
30 | Form,
31 | Input,
32 | FormError,
33 | Card,
34 | Divider,
35 | Table,
36 | Popover,
37 | Textarea,
38 | Checkbox,
39 | Tooltip,
40 | Tabs,
41 | Code,
42 | Badge,
43 | Radio,
44 | Skeleton
45 | };
46 |
--------------------------------------------------------------------------------
/src/pages/invoices/dashboard/index.tsx:
--------------------------------------------------------------------------------
1 | import { ComponentProps, FunctionComponent } from 'react';
2 | import { Box, Divider } from '@chakra-ui/react';
3 | import { observer } from 'mobx-react-lite';
4 | import { H4, Overlay } from 'src/shared';
5 | import { InvoicesProjectInfo } from 'src/features';
6 | import InvoicesStats from './InvoicesStats';
7 | import InvoicesAuthorization from './InvoicesAuthorization';
8 | import InvoicesWebhooks from './InvoicesWebhooks';
9 | import InvoicesApi from './InvoicesApi';
10 |
11 | const InvoiceDashboardPage: FunctionComponent> = props => {
12 | return (
13 |
14 | Overview
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | );
25 | };
26 |
27 | export default observer(InvoiceDashboardPage);
28 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/VerticalDotsIcon16.tsx:
--------------------------------------------------------------------------------
1 | import { Icon } from '@chakra-ui/react';
2 | import { ComponentProps, FunctionComponent } from 'react';
3 |
4 | export const VerticalDotsIcon16: FunctionComponent> = props => {
5 | return (
6 |
15 |
21 |
22 | );
23 | };
24 |
--------------------------------------------------------------------------------
/src/pages/analytics/graph/GraphHome.tsx:
--------------------------------------------------------------------------------
1 | import { FunctionComponent } from 'react';
2 | import { Divider, Flex, Link, Text } from '@chakra-ui/react';
3 | import { H4, Overlay } from 'src/shared';
4 | import { ANALYTICS_LINKS, GraphAnalyticsForm } from 'src/features';
5 |
6 | export const GraphHome: FunctionComponent = () => {
7 | return (
8 |
9 |
10 | Graph
11 |
17 | How it works
18 |
19 |
20 |
21 | Visualization of the transaction history of the accounts you are interested in.
22 |
23 |
24 |
25 |
26 | );
27 | };
28 |
--------------------------------------------------------------------------------
/src/app/providers/with-chakra/theme/components/tabs/baseStyle.ts:
--------------------------------------------------------------------------------
1 | import textStyles from 'src/app/providers/with-chakra/theme/foundations/textStyles';
2 | import { definePartsStyle } from './parts';
3 |
4 | export default definePartsStyle({
5 | tab: {
6 | ...textStyles.label2,
7 | position: 'relative',
8 | _after: {
9 | content: '""',
10 | display: 'block',
11 | position: 'absolute',
12 | bottom: 0,
13 | left: 0,
14 | width: '100%',
15 | height: '2px',
16 | backgroundColor: 'icon.primary',
17 | transform: 'translateZ(0) scale(0)',
18 | transformOrigin: 'center',
19 | opacity: '1',
20 | transition: 'opacity 300ms, transform 300ms'
21 | },
22 | _selected: {
23 | _after: {
24 | transform: 'translateZ(0) scale(1)'
25 | },
26 | color: 'text.primary'
27 | },
28 | _active: {
29 | bg: 'transparent'
30 | }
31 | },
32 | tabpanel: {
33 | px: '0',
34 | pb: '0',
35 | pt: '4'
36 | }
37 | });
38 |
--------------------------------------------------------------------------------
/src/pages/jetton/minter/index.tsx:
--------------------------------------------------------------------------------
1 | import { lazy } from '@loadable/component';
2 | import { Suspense } from 'react';
3 | import { Navigate, Route, Routes } from 'react-router-dom';
4 |
5 | const JettonMainPage = lazy(() => import('./main'));
6 | const JettonCreatePage = lazy(() => import('./create'));
7 | const JettonViewPage = lazy(() => import('./view'));
8 |
9 | const MinterRouting = () => (
10 |
11 |
15 |
16 |
17 | }
18 | />
19 |
23 |
24 |
25 | }
26 | />
27 |
31 |
32 |
33 | }
34 | />
35 | } />
36 |
37 | );
38 |
39 | export default MinterRouting;
40 |
--------------------------------------------------------------------------------
/src/shared/ui/StatusIndicator.tsx:
--------------------------------------------------------------------------------
1 | import { Box, Flex, Text } from '@chakra-ui/react';
2 |
3 | const StatusIndicator = ({ isOnline, label = false }: { isOnline: boolean; label: boolean }) => {
4 | return (
5 |
6 |
21 | {label && (
22 |
23 | {isOnline ? 'Online' : 'Offline'}
24 |
25 | )}
26 |
27 | );
28 | };
29 |
30 | export default StatusIndicator;
31 |
--------------------------------------------------------------------------------
/src/features/analytics/ui/query-results/analytics-query-ui-utils.ts:
--------------------------------------------------------------------------------
1 | export function removeOutliers(numbers: number[]): number[] {
2 | const average = numbers.reduce((sum, num) => sum + num, 0) / numbers.length;
3 | const variance =
4 | numbers.reduce((sum, num) => sum + Math.pow(num - average, 2), 0) / numbers.length;
5 | const standardDeviation = Math.sqrt(variance);
6 | const threshold = 2 * standardDeviation;
7 |
8 | return numbers.filter(num => num <= average + threshold);
9 | }
10 |
11 | let canvas: HTMLCanvasElement | undefined;
12 | let context: CanvasRenderingContext2D | undefined;
13 | let font: string | undefined;
14 | export function getTextWidth(text: string, useFont = 'normal 12px monospace'): number {
15 | canvas ||= document.createElement('canvas');
16 | context ||= canvas.getContext('2d')!;
17 | if (font !== useFont) {
18 | context.font = useFont;
19 | }
20 | const metrics = context.measureText(text);
21 | return metrics.width;
22 | }
23 |
24 | export function getTHWidth(textWidth: number, isEdge: boolean): number {
25 | const px = 24;
26 | const edgePadding = isEdge ? 16 : 0;
27 | return textWidth + 2 * px + edgePadding;
28 | }
29 |
--------------------------------------------------------------------------------
/src/shared/ui/icons/TickIcon.tsx:
--------------------------------------------------------------------------------
1 | import { forwardRef, Icon } from '@chakra-ui/react';
2 | import { ComponentProps } from 'react';
3 |
4 | export const TickIcon = forwardRef<
5 | ComponentProps & { isIndeterminate?: unknown; isChecked?: unknown },
6 | typeof Icon
7 | >((props, ref) => {
8 | const { isIndeterminate: _, isChecked: __, ...rest } = props;
9 | return (
10 |
19 |
25 |
26 | );
27 | });
28 |
29 | TickIcon.displayName = 'TickIcon';
30 |
--------------------------------------------------------------------------------