From 9642901710117ae8d66fb43839a7bde15dbf1f61 Mon Sep 17 00:00:00 2001 From: hailin Date: Mon, 12 Jan 2026 06:34:46 -0800 Subject: [PATCH] fix(mining-wallet-service): remove remaining blockchain references - Remove HOT_WALLET and COLD_WALLET from initializeCoreAccounts - Remove BLOCKCHAIN from counterpartyType union Co-Authored-By: Claude Opus 4.5 --- .../services/system-account.service.ts | 24 +------------------ .../services/user-wallet.service.ts | 2 +- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/backend/services/mining-wallet-service/src/application/services/system-account.service.ts b/backend/services/mining-wallet-service/src/application/services/system-account.service.ts index 8321dd65..ee4b33b5 100644 --- a/backend/services/mining-wallet-service/src/application/services/system-account.service.ts +++ b/backend/services/mining-wallet-service/src/application/services/system-account.service.ts @@ -10,8 +10,6 @@ export interface InitializeSystemAccountsInput { headquarters: { name: string; code: string }; operation: { name: string; code: string }; fee: { name: string; code: string }; - hotWallet: { name: string; code: string; blockchainAddress?: string }; - coldWallet?: { name: string; code: string; blockchainAddress?: string }; } @Injectable() @@ -25,7 +23,7 @@ export class SystemAccountService { ) {} /** - * 初始化核心系统账户(总部、运营、手续费、热钱包) + * 初始化核心系统账户(总部、运营、手续费) */ async initializeCoreAccounts(input: InitializeSystemAccountsInput): Promise { const accounts: SystemAccount[] = []; @@ -54,26 +52,6 @@ export class SystemAccountService { }); accounts.push(fee); - // 热钱包 - const hotWallet = await this.systemAccountRepo.create({ - accountType: 'HOT_WALLET', - name: input.hotWallet.name, - code: input.hotWallet.code, - blockchainAddress: input.hotWallet.blockchainAddress, - }); - accounts.push(hotWallet); - - // 冷钱包(可选) - if (input.coldWallet) { - const coldWallet = await this.systemAccountRepo.create({ - accountType: 'COLD_WALLET', - name: input.coldWallet.name, - code: input.coldWallet.code, - blockchainAddress: input.coldWallet.blockchainAddress, - }); - accounts.push(coldWallet); - } - // 发布初始化事件 await this.outboxRepo.create({ aggregateType: 'SystemAccount', diff --git a/backend/services/mining-wallet-service/src/application/services/user-wallet.service.ts b/backend/services/mining-wallet-service/src/application/services/user-wallet.service.ts index d95cf506..43081e8d 100644 --- a/backend/services/mining-wallet-service/src/application/services/user-wallet.service.ts +++ b/backend/services/mining-wallet-service/src/application/services/user-wallet.service.ts @@ -309,7 +309,7 @@ export class UserWalletService { amount: Decimal, transactionInput: { transactionType: TransactionType; - counterpartyType?: 'USER' | 'SYSTEM_ACCOUNT' | 'POOL' | 'BLOCKCHAIN' | 'EXTERNAL'; + counterpartyType?: 'USER' | 'SYSTEM_ACCOUNT' | 'POOL' | 'EXTERNAL'; counterpartyAccountSeq?: string; counterpartyUserId?: string; counterpartyAddress?: string;