Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend env #54

Merged
merged 2 commits into from
Mar 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions interface/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PUBLIC_APP_URL=''
PUBLIC_SHOW_BAR=''
PUBLIC_BOT_ID=''
PUBLIC_OAUTH_SCOPE=''
PUBLIC_MIXIN_MESSENGER_INSTALL=''
PUBLIC_MIXIN_API_BASE_URL=''
PUBLIC_HUFI_SOCKET_URL=''
PUBLIC_HUFI_BACKEND_URL=''
PUBLIC_HUMAN_PROTOCOL_GROUP_URL=''
32 changes: 16 additions & 16 deletions interface/src/lib/helpers/constants.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import type { SupportedExchanges, SupportedPairs, SupportedTimeFrame } from "$lib/types/hufi/exchanges"
import { PUBLIC_APP_URL, PUBLIC_SHOW_BAR, PUBLIC_BOT_ID, PUBLIC_OAUTH_SCOPE, PUBLIC_MIXIN_MESSENGER_INSTALL, PUBLIC_MIXIN_API_BASE_URL, PUBLIC_HUFI_SOCKET_URL, PUBLIC_HUFI_BACKEND_URL, PUBLIC_HUMAN_PROTOCOL_GROUP_URL } from '$env/static/public'

export const AppName = "HuFi"
export const AppURL = "https://hufi-interface.vercel.app"
export const AppName = "Mr.market"
export const AppURL = PUBLIC_APP_URL || "https://mr-market-one.vercel.app"

export const SHOW_BAR = true
export const BOT_ID = '3fb68263-4f06-476e-83db-503d25d56b93'
export const OAUTH_SCOPE = 'PROFILE:READ ASSETS:READ SNAPSHOTS:READ'
export const MIXIN_MESSENGER_INSTALL = 'https://messenger.mixin.one/install'
export const MIXIN_API_BASE_URL = 'https://api.mixin.one'
export const SHOW_BAR = PUBLIC_SHOW_BAR || true
export const BOT_ID = PUBLIC_BOT_ID || '3fb68263-4f06-476e-83db-503d25d56b93'
export const OAUTH_SCOPE = PUBLIC_OAUTH_SCOPE || 'PROFILE:READ ASSETS:READ SNAPSHOTS:READ'
export const MIXIN_MESSENGER_INSTALL = PUBLIC_MIXIN_MESSENGER_INSTALL || 'https://messenger.mixin.one/install'
export const MIXIN_API_BASE_URL = PUBLIC_MIXIN_API_BASE_URL || 'https://api.mixin.one'

export const HUFI_SOCKET_URL = '//bc6e1fa0-3c5a-4235-809c-c4fcc4a5d859.mvg.fi'
// export const HUFI_BACKEND_URL = 'http://localhost:3000'
export const HUFI_BACKEND_URL = 'https://bc6e1fa0-3c5a-4235-809c-c4fcc4a5d859.mvg.fi:3000'
export const HUMAN_PROTOCOL_GROUP_URL = 'https://mixin.one/apps/5a33fc52-f445-4170-a06a-47f8be94a8f3'
export const HUFI_SOCKET_URL = PUBLIC_HUFI_SOCKET_URL || '//bc6e1fa0-3c5a-4235-809c-c4fcc4a5d859.mvg.fi'
export const HUFI_BACKEND_URL = PUBLIC_HUFI_BACKEND_URL || 'https://bc6e1fa0-3c5a-4235-809c-c4fcc4a5d859.mvg.fi:3000'
export const HUMAN_PROTOCOL_GROUP_URL = PUBLIC_HUMAN_PROTOCOL_GROUP_URL || 'https://mixin.one/apps/5a33fc52-f445-4170-a06a-47f8be94a8f3'

export const SUPPORTED_PAIRS: {
[k in SupportedExchanges] : SupportedPairs[]
[k in SupportedExchanges]: SupportedPairs[]
} = {
'binance': [
'BTC/USDT',
Expand All @@ -42,14 +42,14 @@ export const SUPPORTED_PAIRS: {
}
export const SUPPORTED_UNIQUE_PAIRS: string[] = Array.from(new Set(Object.values(SUPPORTED_PAIRS).flatMap(pairs => pairs)));
export const SUPPORTED_EXCHANGES = Object.keys(SUPPORTED_PAIRS);
export const SUPPORTED_TIMERANGES: SupportedTimeFrame[] = ['1m', '5m' ,'15m' ,'30m' ,'1h' ,'4h' ,'1d' ,'1w' ,'1M']
export const SUPPORTED_TIMERANGES: SupportedTimeFrame[] = ['1m', '5m', '15m', '30m', '1h', '4h', '1d', '1w', '1M']

// Limit needs 12, Market needs 10, use 14 to avoid data loss
export const ORDERBOOK_STREAM_LENGTH = 14
export const LIMIT_ORDERBOOK_LENGTH = 12
export const MARKET_ORDERBOOK_LENGTH = 10
export const LIMIT_ORDERBOOK_HALF_LENGTH = LIMIT_ORDERBOOK_LENGTH/2
export const MARKET_ORDERBOOK_HALF_LENGTH = MARKET_ORDERBOOK_LENGTH/2
export const LIMIT_ORDERBOOK_HALF_LENGTH = LIMIT_ORDERBOOK_LENGTH / 2
export const MARKET_ORDERBOOK_HALF_LENGTH = MARKET_ORDERBOOK_LENGTH / 2

export const BTC_UUID = 'c6d0c728-2624-429b-8e0d-d9d19b6592fa'

Expand All @@ -60,7 +60,7 @@ export const DownColorText = "text-red-600"
export const FocusUpColorBg = "focus:bg-green-500"
export const FocusDownColorBg = "focus:bg-red-500"

export const CoinsTypeTabs = [ "favorites", "all", "mainstream", "layer1", "layer2", "inscription", "ai", "meme", "defi", "game_fi", "nft" ]
export const CoinsTypeTabs = ["favorites", "all", "mainstream", "layer1", "layer2", "inscription", "ai", "meme", "defi", "game_fi", "nft"]

export const maskOption = {
numeral: true,
Expand Down
2 changes: 1 addition & 1 deletion interface/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
//
// If you want to overwrite includes/excludes, make sure to copy over the relevant includes/excludes
// from the referenced tsconfig.json - TypeScript does not merge them in
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte"],
"include": ["src/**/*.d.ts", "src/**/*.ts", "src/**/*.js", "src/**/*.svelte", ".svelte-kit/ambient.d.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
}
Loading