Skip to content

Commit

Permalink
Merge pull request #19 from darwinia-network/remove-pangolin
Browse files Browse the repository at this point in the history
remove pangolin chain
  • Loading branch information
snoopy1412 authored Jun 14, 2024
2 parents ea7f9a0 + c02a7b6 commit c650347
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 59 deletions.
1 change: 0 additions & 1 deletion src/config/chains/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
export * from './crab';
export * from './darwinia';
export * from './pangolin';
53 changes: 0 additions & 53 deletions src/config/chains/pangolin.ts

This file was deleted.

3 changes: 1 addition & 2 deletions src/types/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import type { Chain } from '@rainbow-me/rainbowkit';
*/
export enum ChainId {
CRAB = 44,
DARWINIA = 46,
PANGOLIN = 43
DARWINIA = 46
}

interface NativeToken {
Expand Down
5 changes: 2 additions & 3 deletions src/utils/chain.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import { darwinia, crab, pangolin } from '@/config/chains';
import { darwinia, crab } from '@/config/chains';
import { ChainConfig, ChainId } from '@/types/chains';

// Map object to return a specific chain configuration
// Using Record<ChainId, ChainConfig> to ensure type safety
const chainConfigMap: Record<ChainId, ChainConfig> = {
[ChainId.DARWINIA]: darwinia,
[ChainId.CRAB]: crab,
[ChainId.PANGOLIN]: pangolin
[ChainId.CRAB]: crab
};

// Helper function to filter testnets in production
Expand Down

0 comments on commit c650347

Please sign in to comment.