From 5ea4d788b026f55817c8112bbeeffe767878d5be Mon Sep 17 00:00:00 2001 From: Paul Noel Date: Fri, 1 Dec 2023 10:33:01 -0600 Subject: [PATCH] watcher: support .env entry for near archive rpc --- watcher/src/watchers/NearArchiveWatcher.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/watcher/src/watchers/NearArchiveWatcher.ts b/watcher/src/watchers/NearArchiveWatcher.ts index b964ff98..5a928e3c 100644 --- a/watcher/src/watchers/NearArchiveWatcher.ts +++ b/watcher/src/watchers/NearArchiveWatcher.ts @@ -123,7 +123,8 @@ export class NearArchiveWatcher extends Watcher { } async getProvider(): Promise { - return (this.provider = this.provider || (await getNearProvider(NEAR_ARCHIVE_RPC))); + const nearArchiveRPC: string = process.env.NEAR_ARCHIVE_RPC || 'https://rpc.mainnet.near.org'; + return (this.provider = this.provider || (await getNearProvider(nearArchiveRPC))); } isValidVaaKey(key: string) {