feat: 完善安装部署与数字溯源码
This commit is contained in:
@@ -8,6 +8,7 @@ function makeService(): BlockchainService {
|
||||
} as unknown as ConfigService;
|
||||
const settings = {
|
||||
getAll: async () => ({ blockchainDriver: 'mock' }),
|
||||
getAllRaw: async () => ({ blockchainDriver: 'mock' }),
|
||||
} as unknown as SettingsService;
|
||||
return new BlockchainService(config, settings);
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export class BlockchainService {
|
||||
}
|
||||
|
||||
private async buildProvider(): Promise<AttestationProvider> {
|
||||
const settings = await this.settings.getAll();
|
||||
const settings = await this.settings.getAllRaw();
|
||||
const driver = (settings.blockchainDriver || this.config.get<string>('blockchain.driver') || 'mock') as 'mock' | 'tianhe';
|
||||
if (driver !== 'tianhe') return new MockProvider();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user