feat(@desktop/metrics): add global variables for mixpanel credentials
Issue #15729
This commit is contained in:
parent
370d4476fe
commit
8d3a0ac415
|
@ -261,9 +261,7 @@ proc createAccountFromPrivateKey*(privateKey: string): RpcResponse[JsonNode] =
|
|||
|
||||
proc openedAccounts*(path: string): RpcResponse[JsonNode] =
|
||||
try:
|
||||
let mixPanelAppId = getEnv("MIXPANEL_APP_ID")
|
||||
let mixPanelToken = getEnv("MIXPANEL_TOKEN")
|
||||
let payload = %* {"dataDir": path, "mixpanelAppId": mixPanelAppId, "mixpanelToken": mixPanelToken}
|
||||
let payload = %* {"dataDir": path, "mixpanelAppId": MIXPANEL_APP_ID, "mixpanelToken": MIXPANEL_TOKEN}
|
||||
# Do not remove the sleep 700
|
||||
# This sleep prevents a crash on intel MacOS
|
||||
# with errors like bad flushGen 12 in prepareForSweep; sweepgen 0
|
||||
|
|
|
@ -63,6 +63,8 @@ let
|
|||
RARIBLE_TESTNET_API_KEY_RESOLVED* = desktopConfig.raribleTestnetApiKey
|
||||
TENOR_API_KEY_RESOLVED* = desktopConfig.tenorApiKey
|
||||
WALLET_CONNECT_PROJECT_ID* = BUILD_WALLET_CONNECT_PROJECT_ID
|
||||
MIXPANEL_APP_ID* = desktopConfig.mixpanelAppId
|
||||
MIXPANEL_TOKEN* = desktopConfig.mixpanelToken
|
||||
|
||||
proc hasLogLevelOption*(): bool =
|
||||
for p in cliParams:
|
||||
|
|
|
@ -27,6 +27,8 @@ const BASE_NAME_ALCHEMY_OPTIMISM_GOERLI_TOKEN = "ALCHEMY_OPTIMISM_GOERLI_TOKEN"
|
|||
const BASE_NAME_ALCHEMY_OPTIMISM_SEPOLIA_TOKEN = "ALCHEMY_OPTIMISM_SEPOLIA_TOKEN"
|
||||
const BASE_NAME_TENOR_API_KEY = "TENOR_API_KEY"
|
||||
const BASE_NAME_WALLET_CONNECT_PROJECT_ID = "WALLET_CONNECT_PROJECT_ID"
|
||||
const BASE_NAME_MIXPANEL_APP_ID = "MIXPANEL_APP_ID"
|
||||
const BASE_NAME_MIXPANEL_TOKEN = "MIXPANEL_TOKEN"
|
||||
|
||||
|
||||
################################################################################
|
||||
|
@ -40,6 +42,11 @@ const BUILD_INFURA_TOKEN_SECRET = getEnv(BUILD_TIME_PREFIX & BASE_NAME_INFURA_TO
|
|||
const
|
||||
DEFAULT_POKT_TOKEN = "849214fd2f85acead08f5184"
|
||||
BUILD_POKT_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_POKT_TOKEN, DEFAULT_POKT_TOKEN)
|
||||
const
|
||||
DEFAULT_MIXPANEL_APP_ID = "3350627"
|
||||
BUILD_MIXPANEL_APP_ID = getEnv(BUILD_TIME_PREFIX & BASE_NAME_MIXPANEL_APP_ID, DEFAULT_MIXPANEL_APP_ID)
|
||||
DEFAULT_MIXPANEL_TOKEN = "5c73bda2d36a9f688a5ee45641fb6775"
|
||||
BUILD_MIXPANEL_TOKEN = getEnv(BUILD_TIME_PREFIX & BASE_NAME_MIXPANEL_TOKEN, DEFAULT_MIXPANEL_TOKEN)
|
||||
const BUILD_OPENSEA_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_OPENSEA_API_KEY)
|
||||
const BUILD_RARIBLE_MAINNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_MAINNET_API_KEY)
|
||||
const BUILD_RARIBLE_TESTNET_API_KEY = getEnv(BUILD_TIME_PREFIX & BASE_NAME_RARIBLE_TESTNET_API_KEY)
|
||||
|
@ -106,6 +113,16 @@ type StatusDesktopConfig = object
|
|||
desc: "Sets pokt token"
|
||||
name: $BASE_NAME_POKT_TOKEN
|
||||
abbr: "pokt-token" .}: string
|
||||
mixpanelAppId* {.
|
||||
defaultValue: BUILD_MIXPANEL_APP_ID
|
||||
desc: "Sets mixpanel app id"
|
||||
name: $BASE_NAME_MIXPANEL_APP_ID
|
||||
abbr: "mixpanel-app-id" .}: string
|
||||
mixpanelToken* {.
|
||||
defaultValue: BUILD_MIXPANEL_TOKEN
|
||||
desc: "Sets mixpanel token"
|
||||
name: $BASE_NAME_MIXPANEL_TOKEN
|
||||
abbr: "mixpanel-token" .}: string
|
||||
openseaApiKey* {.
|
||||
defaultValue: BUILD_OPENSEA_API_KEY
|
||||
desc: "Sets open sea api key"
|
||||
|
|
Loading…
Reference in New Issue