Skip to content

Commit

Permalink
Merge pull request #36 from helix-bridge/improve-rpc
Browse files Browse the repository at this point in the history
Bump helixconf and use rpc from helixconf
  • Loading branch information
xiaoch05 authored Aug 6, 2024
2 parents 71626d7 + 19b4df5 commit caa3b0d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/configure/configure.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export interface LendInfo {

export interface RpcNode {
name: string;
rpc: string;
rpc?: string;
fixedGasPrice: number;
notSupport1559: boolean;
lendMarket: LendInfo[];
Expand Down Expand Up @@ -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);
}
}
4 changes: 2 additions & 2 deletions src/relayer/relayer.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].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/[email protected].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"
Expand Down

0 comments on commit caa3b0d

Please sign in to comment.