Skip to content

Commit

Permalink
use polkagate apps config
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick-1979 committed Feb 21, 2024
1 parent 791fc23 commit 129cf40
Show file tree
Hide file tree
Showing 21 changed files with 315 additions and 276 deletions.
2 changes: 1 addition & 1 deletion addedForPlus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// needed pkg for plus


yarn add @polkadot/apps-config memoize-one react-window umi-request react-chartjs-2 react-tooltip qrcode.react chart.js babel-plugin-transform-import-meta
yarn add @polkagate/apps-config memoize-one react-window umi-request react-chartjs-2 react-tooltip qrcode.react chart.js babel-plugin-transform-import-meta

yarn add @mui/material @emotion/react @emotion/styled @mui/icons-material @mui/lab
yarn add -D @testing-library/react jsdom-worker-fix intersection-observer
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
"@mui/lab": "^5.0.0-alpha.85",
"@mui/material": "^5.8.3",
"@polkadot/api": "^10.11.2",
"@polkadot/apps-config": "^0.132.1",
"@polkadot/rpc-provider": "^10.9.1",
"@polkagate/apps-config": "^0.133.2",
"@substrate/connect": "^0.7.32",
"@vaadin/icons": "^23.2.3",
"babel-plugin-transform-import-meta": "^2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension-polkagate/src/components/ChainLogo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface Props {
size?: number;
}

function ChainLogo({ chainName, genesisHash, showDefault = true, size = 25 }: Props): React.ReactElement<Props> {
function ChainLogo ({ chainName, genesisHash, showDefault = true, size = 25 }: Props): React.ReactElement<Props> {
const theme = useTheme();
const foundChainName = allChains.find((chain) => chain.genesisHash === genesisHash)?.chain;
const _chainName = sanitizeChainName(foundChainName || chainName);
Expand Down
2 changes: 1 addition & 1 deletion packages/extension-polkagate/src/hooks/useApiWithChain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import { useContext, useEffect, useMemo, useState } from 'react';

import { ApiPromise, WsProvider } from '@polkadot/api';
import { createWsEndpoints } from '@polkadot/apps-config';
import { createWsEndpoints } from '@polkagate/apps-config';
import { Chain } from '@polkadot/extension-chains/types';

import { APIContext } from '../components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import { useCallback, useEffect, useState } from 'react';

import { TFunction } from '@polkadot/apps-config/types';
import { TFunction } from '@polkagate/apps-config/types';
import { AccountId } from '@polkadot/types/interfaces/runtime';
import { BN, BN_ZERO } from '@polkadot/util';

Expand Down
2 changes: 1 addition & 1 deletion packages/extension-polkagate/src/hooks/useEndpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import { useEffect, useState } from 'react';

import { createWsEndpoints } from '@polkadot/apps-config';
import { createWsEndpoints } from '@polkagate/apps-config';
import { AccountId } from '@polkadot/types/interfaces/runtime';

import { useChainName, useTranslation } from '.';
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-polkagate/src/hooks/useEndpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
* @description
* find endpoints based on chainName and also omit light client which my be add later
*/
import type { LinkOption } from '@polkadot/apps-config/endpoints/types';
import type { LinkOption } from '@polkagate/apps-config/endpoints/types';

import { useEffect, useMemo, useState } from 'react';

import { createWsEndpoints } from '@polkadot/apps-config';
import { createWsEndpoints } from '@polkagate/apps-config';

import { DropdownOption } from '../util/types';
import { sanitizeChainName } from '../util/utils';
Expand Down
4 changes: 2 additions & 2 deletions packages/extension-polkagate/src/hooks/useTeleport.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright 2019-2024 @polkadot/extension-polkagate authors & contributors
// SPDX-License-Identifier: Apache-2.0

import type { LinkOption } from '@polkadot/apps-config/endpoints/types';
import type { LinkOption } from '@polkagate/apps-config/endpoints/types';
import type { ParaId } from '@polkadot/types/interfaces';

import { useEffect, useState } from 'react';

import { createWsEndpoints } from '@polkadot/apps-config';
import { createWsEndpoints } from '@polkagate/apps-config';
import { isNumber } from '@polkadot/util';

import { useApi, useChain, useEndpoint } from '.';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Divider, Grid, Typography, useTheme } from '@mui/material';
import { Crowdloan } from 'extension-polkagate/src/util/types';
import React, { useCallback, useState } from 'react';

import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';
import { AccountId } from '@polkadot/types/interfaces/runtime';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Grid, useTheme } from '@mui/material';
import { Crowdloan } from 'extension-polkagate/src/util/types';
import React, { useCallback } from 'react';

import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';

import { Progress, Warning } from '../../components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Grid, Typography } from '@mui/material';
import React, { useCallback, useEffect, useMemo, useState } from 'react';

import { ApiPromise } from '@polkadot/api';
import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';
import { AccountId } from '@polkadot/types/interfaces/runtime';
import { BN, BN_ONE, BN_ZERO } from '@polkadot/util';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { Divider, Grid, Typography, useTheme } from '@mui/material';
import React, { useCallback, useContext, useEffect, useState } from 'react';

import { ApiPromise } from '@polkadot/api';
import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { AccountId } from '@polkadot/types/interfaces/runtime';
import keyring from '@polkadot/ui-keyring';
import { BN } from '@polkadot/util';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { Crowdloan } from 'extension-polkagate/src/util/types';
import React, { useCallback, useContext, useEffect, useMemo, useState } from 'react';
import { useParams } from 'react-router';

import { createWsEndpoints } from '@polkadot/apps-config';
import { createWsEndpoints } from '@polkagate/apps-config';
import { Chain } from '@polkadot/extension-chains/types';
import { SettingsStruct } from '@polkadot/ui-settings/types';
import { decodeAddress, encodeAddress } from '@polkadot/util-crypto';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Divider, Grid, IconButton, Typography } from '@mui/material';
import React, { useCallback } from 'react';

import { ApiPromise } from '@polkadot/api';
import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';

import { SlidePopUp } from '../../../components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { Crowdloan } from 'extension-polkagate/src/util/types';
import React, { useCallback, useEffect, useMemo, useState } from 'react';

import { DeriveAccountRegistration } from '@polkadot/api-derive/types';
import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';

import { FormatBalance2, Identity, PButton, ShowBalance } from '../../../components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { Crowdloan } from 'extension-polkagate/src/util/types';
import React, { useCallback, useState, useMemo } from 'react';

import { DeriveAccountRegistration } from '@polkadot/api-derive/types';
import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';

import { Identity } from '../../../components';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Avatar, Grid, IconButton, Link, SxProps, Theme, Typography } from '@mui
import { Crowdloan } from 'extension-polkagate/src/util/types';
import React, { useCallback, useMemo } from 'react';

import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { Chain } from '@polkadot/extension-chains/types';

import { useTranslation } from '../../../hooks';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import type { PalletConvictionVotingVoteVoting } from '@polkadot/types/lookup';

import { ApiPromise } from '@polkadot/api';
import { TFunction } from '@polkadot/apps-config/types';
import { TFunction } from '@polkagate/apps-config/types';
import { AccountId } from '@polkadot/types/interfaces/runtime';
import { BN, BN_MAX_INTEGER, bnMin, extractTime } from '@polkadot/util';

Expand Down
2 changes: 1 addition & 1 deletion packages/extension-polkagate/src/util/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import type { KeypairType } from '@polkadot/util-crypto/types';
import { SxProps, Theme } from '@mui/material';

import { ApiPromise } from '@polkadot/api';
import { LinkOption } from '@polkadot/apps-config/endpoints/types';
import { LinkOption } from '@polkagate/apps-config/endpoints/types';
import { AccountJson } from '@polkadot/extension-base/background/types';
import { Chain } from '@polkadot/extension-chains/types';
import { InjectedExtension } from '@polkadot/extension-inject/types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '@polkadot/api';
import {
createWsEndpoints
} from '@polkadot/apps-config';
} from '@polkagate/apps-config';
import { selectableNetworks } from '@polkadot/networks';
import { BN, BN_ONE, BN_ZERO } from '@polkadot/util';

Expand Down
Loading

0 comments on commit 129cf40

Please sign in to comment.