From e1d3d9c8f9fabe13abd74862bae0010dbe8b02e0 Mon Sep 17 00:00:00 2001 From: Sean Magin Date: Sun, 8 Nov 2020 15:30:54 +1300 Subject: [PATCH] this updates this code to play nicely with changed harbinger-lib code --- src/index.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/index.ts b/src/index.ts index 5e27080..3c6eaf4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,7 +1,6 @@ import { LogLevel, initOracleLib, - updateOracleFromCoinbaseOnce, updateOracleFromFeedOnce, } from '@tacoinfra/harbinger-lib' import { KmsKeyStore, KmsSigner } from '@tacoinfra/conseil-kms' @@ -19,7 +18,7 @@ export default async function main( apiPassphrase: string, assetNames: Array, normalizerContractAddress: string | undefined, - enableZeroFees: boolean + enableZeroFees: boolean, ): Promise { initOracleLib('debug') @@ -28,30 +27,30 @@ export default async function main( let hash = '' if (signerUrl.includes('coinbase.com')) { - hash = await updateOracleFromCoinbaseOnce( + const options = { apiKeyId, apiSecret, apiPassphrase } + hash = await updateOracleFromFeedOnce( logLevel, - apiKeyId, - apiSecret, - apiPassphrase, oracleContractAddress, assetNames, store, signer, nodeURL, normalizerContractAddress, - enableZeroFees + enableZeroFees, + options, ) } else { + const options = { signerUrl } hash = await updateOracleFromFeedOnce( logLevel, - signerUrl, oracleContractAddress, assetNames, store, signer, nodeURL, normalizerContractAddress, - enableZeroFees + enableZeroFees, + options, ) }