Skip to content

Commit

Permalink
Fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
fewensa committed May 22, 2024
1 parent 10b2e2e commit f868e7f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions packages/cli/src/commands/oracle.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {Args, Command, Flags} from '@oclif/core'
import {Command, Flags} from '@oclif/core'
import {CommandHelper} from "../common/commander";
import {CliOracleConfig, OracleRelay, OracleRelayConfig, OracleRelayLifecycle} from "@darwinia/ormpipe-relay-oracle";
import {logger, RelayEVMClient, RelayStorage} from "@darwinia/ormpipe-common";
Expand Down Expand Up @@ -38,13 +38,13 @@ export default class Oracle extends Command {
times += 1;
const relayConfigs = await CommandHelper.buildRelayConfig(cliConfig);
for (const rc of relayConfigs) {
// @ts-ignore
if (rc.mainly == undefined) {
const orc = rc as OracleRelayConfig;
if (orc.mainly === undefined) {
const envMainly = process.env['ORMPIPE_MAINLY'];
// @ts-ignore
rc.mainly = envMainly === true || envMainly === 'true' || envMainly === '1';
orc.mainly = envMainly === 'true' || envMainly === '1';
}
const sourceToTargetLifecycle = await this.buildLifecycle(rc as OracleRelayConfig);

const sourceToTargetLifecycle = await this.buildLifecycle(orc);
sourceToTargetLifecycle.times = times;

if (rc.symbol === '-' || rc.symbol === '>') {
Expand Down Expand Up @@ -121,6 +121,7 @@ export default class Oracle extends Command {
});
return {
...config,
mainly: !!config.mainly,
storage,
sourceName: config.sourceChain.name,
targetName: config.targetChain.name,
Expand Down
2 changes: 1 addition & 1 deletion packages/relay-oracle/src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {PonderIndexOrmp, PonderIndexSigncribe} from "@darwinia/ormpipe-indexer";
export type CliOracleConfig = CliBaseConfig

export interface OracleRelayConfig extends RelayBaseConfig {
mainly: boolean,
mainly: boolean | undefined
}

export interface OracleRelayLifecycle extends RelayBaseLifecycle {
Expand Down

0 comments on commit f868e7f

Please sign in to comment.