feat: update settings for vault
This commit is contained in:
@@ -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')
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user