add electrum config
This commit is contained in:
@@ -10,6 +10,8 @@ import {
|
||||
PostgresConfig,
|
||||
ShopSettingsConfig
|
||||
} from '../types/Config';
|
||||
import { ElectrumNetwork } from '../types/ElectrumNetwork';
|
||||
import { ElectrumWalletConfig } from '../types/ElectrumWalletConfig';
|
||||
import { MoneroNetwork } from '../types/MoneroNetwork';
|
||||
import { MoneroWalletConfig } from '../types/MoneroWalletConfig';
|
||||
import { ConfirmationTier } from '../types/ConfirmationTier';
|
||||
@@ -210,6 +212,15 @@ export const getMoneroWalletConfig = (): MoneroWalletConfig => ({
|
||||
rpcTimeoutMs: envInt('MONERO_WALLET_RPC_TIMEOUT_MS')
|
||||
});
|
||||
|
||||
export const getElectrumWalletConfig = (): ElectrumWalletConfig => ({
|
||||
network: env('ELECTRUM_NETWORK') as ElectrumNetwork,
|
||||
server: env('ELECTRUM_SERVER'),
|
||||
rpcUrl: `http://${env('ELECTRUM_DAEMON_HOST')}:${envInt('ELECTRUM_DAEMON_PORT')}`,
|
||||
username: env('ELECTRUM_DAEMON_RPC_USER'),
|
||||
password: env('ELECTRUM_DAEMON_RPC_PASSWORD'),
|
||||
rpcTimeoutMs: envInt('ELECTRUM_DAEMON_RPC_TIMEOUT_MS')
|
||||
});
|
||||
|
||||
export const getSimplexConfig = (): SimplexConfig => ({
|
||||
wsUrl: env('SIMPLEX_WS_URL'),
|
||||
botDisplayName: env('SIMPLEX_BOT_DISPLAY_NAME')
|
||||
@@ -226,5 +237,6 @@ export default () => ({
|
||||
order: getOrderConfig(),
|
||||
invoice: getInvoiceConfig(),
|
||||
moneroWallet: getMoneroWalletConfig(),
|
||||
electrumWallet: getElectrumWalletConfig(),
|
||||
simplex: getSimplexConfig()
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user