Skip to content

Commit

Permalink
chore: Undo the removal of the wallet service 'publicKey' property
Browse files Browse the repository at this point in the history
  • Loading branch information
jsanmigimeno committed May 31, 2024
1 parent 8ce5160 commit 80e31e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/wallet/wallet.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,14 @@ export class WalletService implements OnModuleInit {

private readonly queuedRequests: Record<string, WalletServiceRoutingMessage[]> = {};

readonly publicKey: Promise<string>;

constructor(
private readonly configService: ConfigService,
private readonly loggerService: LoggerService,
) {
this.defaultWorkerConfig = this.loadDefaultWorkerConfig();
this.publicKey = this.loadPublicKey();
}

async onModuleInit() {
Expand All @@ -89,6 +92,10 @@ export class WalletService implements OnModuleInit {
this.initiateIntervalStatusLog();
}

private async loadPublicKey(): Promise<string> {
return (new Wallet(await this.configService.globalConfig.privateKey)).address;
}

private async initializeWorkers(): Promise<void> {

for (const [chainId,] of this.configService.chainsConfig) {
Expand Down

0 comments on commit 80e31e6

Please sign in to comment.