diff --git a/src/components/transfer/configs/custom/HydraAdapter.ts b/src/components/transfer/configs/custom/HydraAdapter.ts index 30c798a..9bc5f5e 100644 --- a/src/components/transfer/configs/custom/HydraAdapter.ts +++ b/src/components/transfer/configs/custom/HydraAdapter.ts @@ -326,13 +326,13 @@ const createBalanceStorages = (api: AnyApi) => { Storage.create({ api, path: 'derive.balances.all', - params: [address], + params: [ address ], }), assets: (tokenId: number, address: string) => Storage.create({ api, path: 'query.tokens.accounts', - params: [address, tokenId], + params: [ address, tokenId ], }), } } @@ -340,12 +340,12 @@ const createBalanceStorages = (api: AnyApi) => { class HydradxBalanceAdapter extends BalanceAdapter { private storages: ReturnType - constructor({ api, chain, tokens }: BalanceAdapterConfigs) { + constructor ({ api, chain, tokens }: BalanceAdapterConfigs) { super({ api, chain, tokens }) this.storages = createBalanceStorages(api) } - public subscribeBalance( + public subscribeBalance ( tokenName: string, address: string ): Observable { @@ -391,7 +391,7 @@ class HydradxBalanceAdapter extends BalanceAdapter { class BaseHydradxAdapter extends BaseCrossChainAdapter { private balanceAdapter?: HydradxBalanceAdapter - public async init(api: AnyApi) { + public async init (api: AnyApi) { this.api = api await api.isReady @@ -403,7 +403,7 @@ class BaseHydradxAdapter extends BaseCrossChainAdapter { }) } - public subscribeTokenBalance( + public subscribeTokenBalance ( token: string, address: string ): Observable { @@ -414,7 +414,7 @@ class BaseHydradxAdapter extends BaseCrossChainAdapter { return this.balanceAdapter.subscribeBalance(token, address) } - public subscribeMaxInput( + public subscribeMaxInput ( token: string, address: string, to: ChainId @@ -453,7 +453,7 @@ class BaseHydradxAdapter extends BaseCrossChainAdapter { ) } - public createTx( + public createTx ( params: TransferParams ): | SubmittableExtrinsic<'promise', ISubmittableResult> @@ -523,13 +523,13 @@ class BaseHydradxAdapter extends BaseCrossChainAdapter { } export class BasiliskAdapter extends BaseHydradxAdapter { - constructor() { + constructor () { super(chains.basilisk, basiliskRouteConfigs, basiliskTokensConfig) } } export class HydraDxAdapter extends BaseHydradxAdapter { - constructor() { + constructor () { super(chains.hydradx, hydradxRoutersConfig, hydradxTokensConfig) } } diff --git a/src/components/transfer/configs/custom/utils/index.ts b/src/components/transfer/configs/custom/utils/index.ts index 714b158..f9fd842 100644 --- a/src/components/transfer/configs/custom/utils/index.ts +++ b/src/components/transfer/configs/custom/utils/index.ts @@ -2,7 +2,7 @@ import { isEthereumAddress } from '@polkadot/util-crypto' import { AnyApi } from '@acala-network/sdk-core' import { checkMessageVersionIsV3 } from '@polkawallet/bridge/utils/check-message-version' import { ExtendedToken } from '@polkawallet/bridge' -import { BN } from '@polkadot/util'; +import { BN } from '@polkadot/util' export type AddressType = 'substract' | 'ethereum' export const getValidDestAddrType = ( diff --git a/src/components/utils/PageContainer.tsx b/src/components/utils/PageContainer.tsx index 728ad4d..3578e46 100644 --- a/src/components/utils/PageContainer.tsx +++ b/src/components/utils/PageContainer.tsx @@ -1,6 +1,5 @@ -import React, { useEffect, FC, useMemo } from 'react' -import { - getAddressFromStorage } from '../utils/index' +import React, { useEffect, FC } from 'react' +import { getAddressFromStorage } from '../utils/index' import { PageContent } from './PageWrapper' import { useIsSignedIn, @@ -18,8 +17,10 @@ const AccountInfo = dynamic(() => import('../homePage/AccountInfo'), { ssr: false, }) const Footer = dynamic(() => import('../footer/Footer'), { ssr: false }) -const OnlySearch = dynamic(() => import('../onlySearch/OnlySearch'), { ssr: false }) -const PromoBanner = dynamic(import('./banners/PromoBanner/index'), { ssr: false }) +const OnlySearch = dynamic(() => import('../onlySearch/OnlySearch'), { + ssr: false, +}) +// const PromoBanner = dynamic(import('./banners/PromoBanner/index'), { ssr: false }) type PageContainerProps = { isHomePage?: boolean @@ -60,14 +61,17 @@ const PageContainer: FC = ({ children, isHomePage }) => { } }, [ addressFromStorage, isSignIn ]) - const banner = useMemo(() => , []) - - if (isEmptyArray(parsedAddressFromUrl) && (!isServerSide && !isSignIn)) return <> -
- -
-