Skip to content

Commit

Permalink
Merge pull request #21 from Cerebellum-Network/feature/set-destinatio…
Browse files Browse the repository at this point in the history
…n-chain

Configured destination chain as cere
  • Loading branch information
karthikeyan-cere committed Sep 20, 2021
2 parents e8a6c85 + 240d9d9 commit 46dcbf2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
- Added home path to logo and title
- Added polygon configuration to chainbridgeConfig
- Updated title
- Set Cere Network as Destination Network
6 changes: 2 additions & 4 deletions src/Contexts/NetworkManagerContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,14 @@ const NetworkManagerProvider = ({ children }: INetworkManagerProviderProps) => {
setDestinationChains(
chainbridgeConfig.chains.filter(
(bridgeConfig: BridgeConfig) =>
bridgeConfig.chainId !== chain.chainId ||
bridgeConfig.type !== chain.type
bridgeConfig.destinationChain === true
)
);
if (chainbridgeConfig.chains.length === 2) {
setDestinationChain(
chainbridgeConfig.chains.find(
(bridgeConfig: BridgeConfig) =>
bridgeConfig.chainId !== chain.chainId ||
bridgeConfig.type !== chain.type
bridgeConfig.destinationChain === true
)
);
}
Expand Down
2 changes: 2 additions & 0 deletions src/chainbridgeConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export type BridgeConfig = {
tokens: TokenConfig[];
nativeTokenSymbol: string;
decimals: number;
destinationChain?: boolean;
};

export type EvmBridgeConfig = BridgeConfig & {
Expand Down Expand Up @@ -95,6 +96,7 @@ export const chainbridgeConfig: ChainbridgeConfig = {
resourceId: "substrate-native",
},
],
destinationChain: true,
},
{
chainId: +((process.env
Expand Down

0 comments on commit 46dcbf2

Please sign in to comment.