UNPKG

@vechain/vebetterdao-contracts

Version:

Open-source repository that houses the smart contracts powering the decentralized VeBetterDAO on the VeChain Thor blockchain.

23 lines (22 loc) 999 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getMnemonic = void 0; const contracts_1 = require("@repo/config/contracts"); const getMnemonic = (required = true) => { const appEnv = process.env.NEXT_PUBLIC_APP_ENV; let mnemonic; switch (appEnv) { case contracts_1.AppEnv.TESTNET_STAGING: mnemonic = process.env.TESTNET_STAGING_MNEMONIC; break; default: // Covers undefined appEnv or any other value mnemonic = process.env.MNEMONIC; break; } if (!mnemonic && required) { throw new Error(`Mnemonic not found for NEXT_PUBLIC_APP_ENV: ${appEnv}. Please ensure the corresponding environment variable (e.g., MNEMONIC, TESTNET_STAGING_MNEMONIC) is set.`); } // Return a dummy mnemonic for build/compile operations return mnemonic || "dummy mnemonic dummy mnemonic dummy mnemonic dummy mnemonic dummy mnemonic dummy mnemonic"; }; exports.getMnemonic = getMnemonic;