From 437ac51686bd5a5f37cf52517eb6495d8546fab6 Mon Sep 17 00:00:00 2001 From: De Facto Date: Mon, 15 Feb 2021 16:57:38 +0800 Subject: [PATCH] fix --- src/cli.ts | 6 +++--- src/feed.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index f681310..630f282 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -28,8 +28,8 @@ import * as feed from "./feed" const cli = new Command() const FLUX_AGGREGATOR_SO = path.resolve(__dirname, "../build/flux_aggregator.so") -const network = (process.env.NETWORK || "local") as NetworkName -const conn = solana.connect(network) +export const network = (process.env.NETWORK || "local") as NetworkName +export const conn = solana.connect(network) class AppContext { @@ -215,7 +215,7 @@ cli const { feedAddress, oracleAddress } = opts const { aggregator } = await AppContext.forAdmin() - + await aggregator.removeOracle({ aggregator: new PublicKey(feedAddress), oracle: new PublicKey(oracleAddress), diff --git a/src/feed.ts b/src/feed.ts index 692b5c7..21786d5 100644 --- a/src/feed.ts +++ b/src/feed.ts @@ -4,7 +4,7 @@ import WebSocket from "ws" import { decodeOracleInfo, sleep } from "./utils" import FluxAggregator from "./FluxAggregator" -import { conn } from "./context" +import { conn } from "./cli" const submitInterval = 10 * 1000