Skip to content

Commit

Permalink
remove darwinia (#221)
Browse files Browse the repository at this point in the history
* feat: remove darwinia chain

* fix: add engines config
  • Loading branch information
WoeOm authored May 10, 2023
1 parent 926b469 commit 038dd5e
Show file tree
Hide file tree
Showing 13 changed files with 862 additions and 2,305 deletions.
3,088 changes: 857 additions & 2,231 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
"dependencies": {
"@ant-design/icons": "^4.6.2",
"@craco/craco": "^6.1.2",
"@darwinia/types": "2.6.100-2",
"@fontsource/ibm-plex-sans": "^4.2.2",
"@fortawesome/fontawesome-svg-core": "^1.2.35",
"@fortawesome/free-solid-svg-icons": "^5.15.3",
Expand Down
Binary file removed public/image/darwinia-banner-mobile.png
Binary file not shown.
Binary file removed public/image/darwinia-banner.png
Binary file not shown.
Binary file removed public/image/darwinia-button-mobile.png
Binary file not shown.
Binary file removed public/image/darwinia-button.png
Binary file not shown.
Binary file removed public/image/darwinia-logo-black.png
Binary file not shown.
12 changes: 0 additions & 12 deletions src/config/chains/darwinia.json

This file was deleted.

26 changes: 0 additions & 26 deletions src/config/theme.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
// import crab from '../theme/network/crab.json';
// import crabDark from '../theme/network/dark/crab.json';
// import darwiniaDark from '../theme/network/dark/darwinia.json';
// import kusamaDark from '../theme/network/dark/kusama.json';
// import pangolinDark from '../theme/network/dark/pangolin.json';
// import polkadotDark from '../theme/network/dark/polkadot.json';
import dark from '../theme/antd/dark.json';
import light from '../theme/antd/light.json';
import vars from '../theme/antd/vars.json';
import { chains } from '.';
// import darwinia from '../theme/network/darwinia.json';
// import kusama from '../theme/network/kusama.json';
// import pangolin from '../theme/network/pangolin.json';
// import polkadot from '../theme/network/polkadot.json';

export type ThemeVariable =
| '@btn-border-radius-base'
Expand All @@ -28,28 +18,12 @@ export type ThemeVariable =
| '@tabs-ink-bar-color'
| '@link-color';

// export const NETWORK_LIGHT_THEME: NetworkConfig<{ [key in keyof typeof darwinia]: string }> = {
// crab,
// darwinia,
// kusama,
// pangolin,
// polkadot,
// };

export const SKIN_THEME = {
dark,
light,
vars,
};

// export const NETWORK_DARK_THEME: NetworkConfig<{ [key in keyof typeof darwiniaDark]: string }> = {
// crab: crabDark,
// darwinia: darwiniaDark,
// kusama: kusamaDark,
// pangolin: pangolinDark,
// polkadot: polkadotDark,
// };

export enum THEME {
LIGHT = 'light',
DARK = 'dark',
Expand Down
4 changes: 2 additions & 2 deletions src/model/network.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Config } from './common';

export type Network = 'pangolin' | 'crab' | 'darwinia' | 'polkadot' | 'kusama';
export type Network = 'polkadot' | 'kusama';

export type Token = 'ring' | 'kton' | 'native';
export type Token = 'native';

// eslint-disable-next-line no-magic-numbers
export type SS58Prefix = 0 | 2 | 18 | 42;
Expand Down
6 changes: 3 additions & 3 deletions src/providers/gql-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ const isDev = process.env.REACT_APP_HOST_TYPE === 'dev';
const subqlDev = 'http://localhost:3000/';

export const GqlProvider = ({ children }: React.PropsWithChildren<unknown>) => {
const { networkConfig, network } = useApi();
const { networkConfig } = useApi();

const value = useMemo(() => {
const client = new GraphQLClient({
url: isDev && network === 'pangolin' ? subqlDev : networkConfig?.api?.subql || subqlDev,
url: isDev ? subqlDev : networkConfig?.api?.subql || subqlDev,
});

return client;
}, [network, networkConfig]);
}, [networkConfig]);

return <ClientContext.Provider value={value}>{children}</ClientContext.Provider>;
};
16 changes: 0 additions & 16 deletions src/theme/network/dark/darwinia.json

This file was deleted.

14 changes: 0 additions & 14 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ module.exports = {
darkMode: 'class', // or 'media' or 'class'
theme: {
extend: {
backgroundImage: (_) => ({
darwinia: 'linear-gradient(-45deg, #fe3876 0%, #7c30dd 71%, #3a30dd 100%)',
}),
backgroundColor: (_) => ({
crab: '#7C30DD',
pangolin: '#5745DE',
polkadot: '#e6007a',
kusama: '#000',
}),
Expand All @@ -16,15 +11,6 @@ module.exports = {
lg: '8px',
},
colors: (_) => ({
pangolin: {
main: '#5745DE',
},
crab: {
main: '#7C30DD',
},
darwinia: {
main: '#3a30dd',
},
polkadot: {
main: '#e6007a',
},
Expand Down

0 comments on commit 038dd5e

Please sign in to comment.