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 <noreply@anthropic.com>
This commit is contained in:
parent
8e30438433
commit
9642901710
|
|
@ -10,8 +10,6 @@ export interface InitializeSystemAccountsInput {
|
||||||
headquarters: { name: string; code: string };
|
headquarters: { name: string; code: string };
|
||||||
operation: { name: string; code: string };
|
operation: { name: string; code: string };
|
||||||
fee: { name: string; code: string };
|
fee: { name: string; code: string };
|
||||||
hotWallet: { name: string; code: string; blockchainAddress?: string };
|
|
||||||
coldWallet?: { name: string; code: string; blockchainAddress?: string };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
@ -25,7 +23,7 @@ export class SystemAccountService {
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 初始化核心系统账户(总部、运营、手续费、热钱包)
|
* 初始化核心系统账户(总部、运营、手续费)
|
||||||
*/
|
*/
|
||||||
async initializeCoreAccounts(input: InitializeSystemAccountsInput): Promise<SystemAccount[]> {
|
async initializeCoreAccounts(input: InitializeSystemAccountsInput): Promise<SystemAccount[]> {
|
||||||
const accounts: SystemAccount[] = [];
|
const accounts: SystemAccount[] = [];
|
||||||
|
|
@ -54,26 +52,6 @@ export class SystemAccountService {
|
||||||
});
|
});
|
||||||
accounts.push(fee);
|
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({
|
await this.outboxRepo.create({
|
||||||
aggregateType: 'SystemAccount',
|
aggregateType: 'SystemAccount',
|
||||||
|
|
|
||||||
|
|
@ -309,7 +309,7 @@ export class UserWalletService {
|
||||||
amount: Decimal,
|
amount: Decimal,
|
||||||
transactionInput: {
|
transactionInput: {
|
||||||
transactionType: TransactionType;
|
transactionType: TransactionType;
|
||||||
counterpartyType?: 'USER' | 'SYSTEM_ACCOUNT' | 'POOL' | 'BLOCKCHAIN' | 'EXTERNAL';
|
counterpartyType?: 'USER' | 'SYSTEM_ACCOUNT' | 'POOL' | 'EXTERNAL';
|
||||||
counterpartyAccountSeq?: string;
|
counterpartyAccountSeq?: string;
|
||||||
counterpartyUserId?: string;
|
counterpartyUserId?: string;
|
||||||
counterpartyAddress?: string;
|
counterpartyAddress?: string;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue