diff --git a/package.json b/package.json index b6a073f..6437f08 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "dependencies": { "@composedb/client": "0.5.0", "@composedb/types": "0.5.0", - "@helixbridge/helixconf": "1.1.4", + "@helixbridge/helixconf": "1.1.9", "@nestjs/common": "^9.0.0", "@nestjs/config": "^2.2.0", "@nestjs/core": "^9.0.0", diff --git a/src/configure/configure.service.ts b/src/configure/configure.service.ts index 35eabc2..0b93813 100644 --- a/src/configure/configure.service.ts +++ b/src/configure/configure.service.ts @@ -60,7 +60,7 @@ export interface LendInfo { export interface RpcNode { name: string; - rpc: string; + rpc?: string; fixedGasPrice: number; notSupport1559: boolean; lendMarket: LendInfo[]; @@ -138,6 +138,6 @@ export class ConfigureService { } get supportedChains(): string[] { - return this.baseConfig.chains.map((item) => item.name); + return this.baseConfig.chains.map((item) => item.code); } } diff --git a/src/relayer/relayer.service.ts b/src/relayer/relayer.service.ts index b9eda57..e232f6c 100644 --- a/src/relayer/relayer.service.ts +++ b/src/relayer/relayer.service.ts @@ -177,7 +177,7 @@ export class RelayerService implements OnModuleInit { ); return null; } - const provider = new EthereumProvider(rpcnode.rpc); + const provider = new EthereumProvider(rpcnode.rpc ?? chainInfo.rpc); const lendMarket = rpcnode.lendMarket?.map((market) => { switch (market.protocol) { // currently only support aave @@ -198,7 +198,7 @@ export class RelayerService implements OnModuleInit { rpcnode.name, { chainName: rpcnode.name, - rpc: rpcnode.rpc, + rpc: rpcnode.rpc ?? chainInfo.rpc, chainId: chainInfo.id, provider: provider, fixedGasPrice: rpcnode.fixedGasPrice, diff --git a/yarn.lock b/yarn.lock index 401b741..60ff270 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1117,10 +1117,10 @@ resolved "https://registry.yarnpkg.com/@graphql-typed-document-node/core/-/core-3.2.0.tgz#5f3d96ec6b2354ad6d8a28bf216a1d97b5426861" integrity sha512-mB9oAsNCm9aM3/SOv4YtBMqZbYj10R7dkq8byBqxGY/ncFwhf2oQzMV+LCRlWoDSEBJ3COiR1yeDvMtsoOsuFQ== -"@helixbridge/helixconf@1.1.4": - version "1.1.4" - resolved "https://registry.yarnpkg.com/@helixbridge/helixconf/-/helixconf-1.1.4.tgz#d5f9cce255f2a7af4dbe1ed4d00c7f199df79e11" - integrity sha512-lBiiTosVLkF/MJ8FexOQvHNikxrwB+VlBRYxDqYTqrmjsS2LOxt9W/33AjrRCohIupel8DCyf6OR+sx78t9ATw== +"@helixbridge/helixconf@1.1.9": + version "1.1.9" + resolved "https://registry.yarnpkg.com/@helixbridge/helixconf/-/helixconf-1.1.9.tgz#cb8dc48de6a54bc139cf1b241dc69e9b7e5d35ff" + integrity sha512-fPxINF1V3WvwXwiiZQwq+esZ3XEXzrUuaKwCFFx5jaVz0NKc7uWbt6fhDXZSJlGkPOB+cw35J2ghe6Lg7DvbEQ== "@humanwhocodes/config-array@^0.11.14": version "0.11.14"