feat: update settings for vault

This commit is contained in:
2026-05-01 20:38:06 +03:00
parent f1a68a7bf8
commit 3b013d3ba0
2 changed files with 8 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ export class VaultClient {
const [database, rabbitmq, ethereum] = await Promise.all([
this.readSecret('database'),
this.readSecret('rabbitmq'),
this.readOptionalSecret('ethereum')
this.readOptionalSecret('crypto')
]);
return {
@@ -103,7 +103,7 @@ export class VaultClient {
try {
return await this.readSecret(path);
} catch (error) {
if (error instanceof Error && error.message.includes('HTTP 404')) {
if (error instanceof Error && (error.message.includes('HTTP 404') || error.message.includes('HTTP 403'))) {
return null;
}
throw error;
@@ -152,8 +152,10 @@ function parseRabbitMqSecret(raw: Record<string, unknown>): RabbitMqSecret {
function parseEthereumSecret(raw: Record<string, unknown>): EthereumSecret {
return {
rpcUrl: optionalString(raw, 'rpc_url', 'ethereum'),
hotWalletPrivateKey: optionalString(raw, 'hot_wallet_private_key', 'ethereum'),
usdtContractAddress: optionalString(raw, 'usdt_contract_address', 'ethereum')
hotWalletPrivateKey: optionalString(raw, 'hot_wallet_private_key', 'crypto'),
usdtContractAddress:
optionalString(raw, 'usdt_contract_address', 'crypto') ??
optionalString(raw, 'usdt_contract_addres', 'crypto')
};
}