diff --git a/packages/core/src/agent/AgentConfig.ts b/packages/core/src/agent/AgentConfig.ts index 3b6297341b..5e20051ff8 100644 --- a/packages/core/src/agent/AgentConfig.ts +++ b/packages/core/src/agent/AgentConfig.ts @@ -191,8 +191,16 @@ export class AgentConfig { public toJSON() { return { ...this.initConfig, - logger: this.logger !== undefined, - agentDependencies: this.agentDependencies != undefined, + walletConfig: { + ...this.walletConfig, + key: this.walletConfig?.key ? '[*****]' : undefined, + storage: { + ...this.walletConfig?.storage, + credentials: this.walletConfig?.storage?.credentials ? '[*****]' : undefined, + }, + }, + logger: this.logger.logLevel, + agentDependencies: Boolean(this.agentDependencies), label: this.label, } } diff --git a/packages/core/src/wallet/WalletApi.ts b/packages/core/src/wallet/WalletApi.ts index a845123160..548df623cf 100644 --- a/packages/core/src/wallet/WalletApi.ts +++ b/packages/core/src/wallet/WalletApi.ts @@ -43,7 +43,14 @@ export class WalletApi { } public async initialize(walletConfig: WalletConfig): Promise { - this.logger.info(`Initializing wallet '${walletConfig.id}'`, walletConfig) + this.logger.info(`Initializing wallet '${walletConfig.id}'`, { + ...walletConfig, + key: walletConfig?.key ? '[*****]' : undefined, + storage: { + ...walletConfig?.storage, + credentials: walletConfig?.storage?.credentials ? '[*****]' : undefined, + }, + }) if (this.isInitialized) { throw new WalletError(