From f7ac44bf9223d6942c0999af2888a32ea010c499 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 29 Jan 2020 16:57:39 +0100 Subject: [PATCH 1/4] refactor(context): Split ApiContext into Api & SystemContext --- front/context/src/ApiContext.tsx | 113 +++---------------- front/context/src/HealthContext.tsx | 85 +++++++------- front/context/src/KeyringContext.tsx | 81 +++++++++----- front/context/src/StakingContext.tsx | 120 -------------------- front/context/src/SystemContext.tsx | 152 ++++++++++++++++++++++++++ front/context/src/index.ts | 2 +- front/context/src/util/index.ts | 2 +- front/context/src/util/isTestChain.ts | 14 --- front/context/src/util/provider.ts | 29 +++++ 9 files changed, 289 insertions(+), 309 deletions(-) delete mode 100644 front/context/src/StakingContext.tsx create mode 100644 front/context/src/SystemContext.tsx delete mode 100644 front/context/src/util/isTestChain.ts create mode 100644 front/context/src/util/provider.ts diff --git a/front/context/src/ApiContext.tsx b/front/context/src/ApiContext.tsx index 335471aa..ed642d4b 100644 --- a/front/context/src/ApiContext.tsx +++ b/front/context/src/ApiContext.tsx @@ -3,58 +3,18 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { ApiRx } from '@polkadot/api'; -import { WsProvider } from '@polkadot/rpc-provider'; import { ProviderInterface } from '@polkadot/rpc-provider/types'; -import { ChainProperties, Health } from '@polkadot/types/interfaces'; import { logger } from '@polkadot/util'; import React, { useEffect, useRef, useState } from 'react'; -import { combineLatest } from 'rxjs'; -import { filter, switchMap } from 'rxjs/operators'; -export interface System { - chain: string; - health: Health; - name: string; - properties: ChainProperties; - version: string; +interface State { + isApiReady: boolean; } -export interface ApiContextType { +export interface ApiContextType extends State { api: ApiRx; // From @polkadot/api - isReady: boolean; // Are api and keyring loaded? - system: System; // Information about the chain } -interface State { - isReady: boolean; - system: System; -} - -const INIT_ERROR = new Error( - 'Please wait for `isReady` before fetching this property' -); - -const DISCONNECTED_STATE_PROPERTIES = { - isReady: false, - system: { - get chain(): never { - throw INIT_ERROR; - }, - get health(): never { - throw INIT_ERROR; - }, - get name(): never { - throw INIT_ERROR; - }, - get properties(): never { - throw INIT_ERROR; - }, - get version(): never { - throw INIT_ERROR; - }, - }, -}; - const l = logger('api-context'); export const ApiContext: React.Context = React.createContext( @@ -62,79 +22,34 @@ export const ApiContext: React.Context = React.createContext( ); export interface ApiContextProviderProps { - children?: React.ReactNode; - loading?: React.ReactNode; + children?: React.ReactElement; provider: ProviderInterface; } export function ApiContextProvider( props: ApiContextProviderProps ): React.ReactElement { - const { children = null, loading = null, provider } = props; - const [state, setState] = useState(DISCONNECTED_STATE_PROPERTIES); - const { isReady, system } = state; + const { children = null, provider } = props; + const [state, setState] = useState({ isApiReady: false }); + const { isApiReady } = state; const apiRef = useRef(new ApiRx({ provider })); const api = apiRef.current; useEffect(() => { - // Block the UI when disconnected - api.isConnected.pipe(filter(isConnected => !isConnected)).subscribe(() => { - setState(DISCONNECTED_STATE_PROPERTIES); - }); - // We want to fetch all the information again each time we reconnect. We // might be connecting to a different node, or the node might have changed // settings. - api.isReady - .pipe( - switchMap(() => - combineLatest([ - api.rpc.system.chain(), - api.rpc.system.health(), - api.rpc.system.name(), - api.rpc.system.properties(), - api.rpc.system.version(), - ]) - ) - ) - .subscribe(([chain, health, name, properties, version]) => { - l.log( - `Api connected to ${ - // eslint-disable-next-line @typescript-eslint/ban-ts-ignore - // @ts-ignore WsProvider.endpoint is private, but we still use it - // here, to have a nice log - provider instanceof WsProvider ? provider.endpoint : 'provider' - }` - ); - l.log( - `Api ready, connected to chain "${chain}" with properties ${JSON.stringify( - properties - )}` - ); + api.isReady.subscribe(() => { + l.log(`Api ready, app is ready to use`); - setState({ - isReady: true, - system: { - chain: chain.toString(), - health, - name: name.toString(), - properties, - version: version.toString(), - }, - }); - }); - }, [api.isConnected, api.isReady, api.rpc.system, provider]); + setState({ isApiReady: true }); + }); + }, [api, provider]); return ( - - {state.isReady ? children : loading} + + {children} ); } diff --git a/front/context/src/HealthContext.tsx b/front/context/src/HealthContext.tsx index e87a5f06..b5c46acb 100644 --- a/front/context/src/HealthContext.tsx +++ b/front/context/src/HealthContext.tsx @@ -2,13 +2,16 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import Rpc from '@polkadot/rpc-core'; import { ProviderInterface } from '@polkadot/rpc-provider/types'; -import { TypeRegistry } from '@polkadot/types'; import { Header, Health } from '@polkadot/types/interfaces'; -import React, { useEffect, useRef, useState } from 'react'; -import { combineLatest, interval, merge, Subscription } from 'rxjs'; -import { map, startWith, switchMap } from 'rxjs/operators'; +import React, { useContext, useEffect, useState } from 'react'; + +import { SystemContext } from './SystemContext'; + +/** + * Period, in ms, after which we consider we're syncing + */ +const SYNCING_THRESHOLD = 2000; export interface HealthContextType { /** @@ -36,32 +39,27 @@ export interface HealthContextType { * @param health - The health of the light node */ function getNodeStatus( + provider: ProviderInterface, header: Header | undefined, health: Health | undefined -): HealthContextType { +): Omit { let best = 0; let isNodeConnected = false; let hasPeers = false; - let isSyncing = false; - if (health && header) { + if (provider.isConnected() && health && header) { isNodeConnected = true; best = header.number.toNumber(); if (health.peers.gten(1)) { hasPeers = true; } - - if (health.isSyncing.isTrue) { - isSyncing = true; - } } return { best, hasPeers, isNodeConnected, - isSyncing, }; } @@ -70,46 +68,45 @@ export const HealthContext: React.Context = React.createConte ); export interface HealthContextProviderProps { - children?: React.ReactNode; + children?: React.ReactElement; provider: ProviderInterface; } +// Track if we we're already syncing +let wasSyncing = true; + export function HealthContextProvider( props: HealthContextProviderProps ): React.ReactElement { const { children = null, provider } = props; - const [status, setStatus] = useState({ - best: 0, - hasPeers: false, - isNodeConnected: false, - isSyncing: false, - }); - - const registryRef = useRef(new TypeRegistry()); - const rpcRef = useRef(new Rpc(registryRef.current, provider)); - const rpc = rpcRef.current; + const { header, health } = useContext(SystemContext); + const [isSyncing, setIsSyncing] = useState(true); + // We wait for 2 seconds, and if we've been syncing for 2 seconds, then we + // set isSyncing to true useEffect(() => { - let sub: Subscription | undefined; - - rpc.provider.on('connected', () => { - sub = combineLatest([ - rpc.system.health(), - merge( - rpc.chain.subscribeNewHeads(), - // Header doesn't get updated when doing a major sync, so we also poll - interval(2000).pipe(switchMap(() => rpc.chain.getHeader())) - ), - ]) - .pipe( - startWith([undefined, undefined]), - map(([health, header]) => getNodeStatus(header, health)) - ) - .subscribe(setStatus); - }); - - return (): void => sub && sub.unsubscribe(); - }, [rpc]); + let timer: number | undefined; + + if (!wasSyncing && health.isSyncing.eq(true)) { + wasSyncing = true; + timer = setTimeout(() => { + setIsSyncing(true); + }, SYNCING_THRESHOLD); + } else if (wasSyncing && health.isSyncing.eq(false)) { + wasSyncing = false; + setIsSyncing(false); + timer && clearTimeout(timer); + } + + return (): void => { + timer && clearTimeout(timer); + }; + }, [health, setIsSyncing]); + + const status = { + ...getNodeStatus(provider, header, health), + isSyncing, + }; return ( {children} diff --git a/front/context/src/KeyringContext.tsx b/front/context/src/KeyringContext.tsx index 08f31180..756e4221 100644 --- a/front/context/src/KeyringContext.tsx +++ b/front/context/src/KeyringContext.tsx @@ -4,22 +4,25 @@ import keyring from '@polkadot/ui-keyring'; import accountObservable from '@polkadot/ui-keyring/observable/accounts'; +import addressObservable from '@polkadot/ui-keyring/observable/addresses'; +import { SubjectInfo } from '@polkadot/ui-keyring/observable/types'; import { KeyringOptions } from '@polkadot/ui-keyring/types'; -import React, { useEffect, useState } from 'react'; +import { logger } from '@polkadot/util'; +import React, { useContext, useEffect, useState } from 'react'; -import { System } from './ApiContext'; +import { SystemContext } from './SystemContext'; interface KeyringContext { - allAccounts?: string[]; + accounts: SubjectInfo; + addresses: SubjectInfo; + currentAccount?: string; keyring: typeof keyring; - keyringReady: boolean; + isKeyringReady: boolean; + setCurrentAccount: React.Dispatch>; } -interface KeyringContextProps { - api?: any; - children: React.ReactNode; - isReady?: boolean; - system?: System; +interface KeyringContextProps extends KeyringOptions { + children: React.ReactElement; } export const KeyringContext = React.createContext({} as KeyringContext); @@ -28,40 +31,58 @@ export const KeyringContext = React.createContext({} as KeyringContext); // Just in case, we default to 42 const DEFAULT_SS58_PREFIX = 42; +const l = logger('keyring-context'); + export function KeyringContextProvider( props: KeyringContextProps ): React.ReactElement { - const { api, children, system } = props; - const [keyringReady, setKeyringReady] = useState(false); - const [allAccounts, setAllAccounts] = useState(); + const { children, ...rest } = props; + const { genesisHash, properties } = useContext(SystemContext); + const [isKeyringReady, setIsKeyringReady] = useState(false); + const [accounts, setAccounts] = useState({}); + const [addresses, setAddresses] = useState({}); + const [currentAccount, setCurrentAccount] = useState(); useEffect(() => { - if (api && system) { - keyring.loadAll({ - genesisHash: api.genesisHash, - ss58Format: system.properties.ss58Format - .unwrapOr(api.createType('u32', DEFAULT_SS58_PREFIX)) - .toNumber(), - type: 'ed25519', - } as KeyringOptions); - const accountsSub = accountObservable.subject.subscribe(accounts => { - const allAccounts = accounts ? Object.keys(accounts) : []; + const ss58Format = + properties.ss58Format.unwrapOr(undefined)?.toNumber() || + DEFAULT_SS58_PREFIX; + + keyring.loadAll({ + genesisHash, + ss58Format, + type: 'ed25519', + ...rest, + } as KeyringOptions); - setAllAccounts(allAccounts); - }); + const accountsSub = accountObservable.subject.subscribe(acc => { + setAccounts(acc); + // FIXME Save currentAccount into localStorage, so that subsequent loads + // loads the same account + setCurrentAccount(Object.keys(acc)[0]); + }); + const addressesSub = addressObservable.subject.subscribe(setAddresses); - setKeyringReady(true); + setIsKeyringReady(true); + l.log(`Keyring initialized with ss58Format=${ss58Format}`); - return (): void => accountsSub.unsubscribe(); - } - }, [api, system]); + return (): void => { + accountsSub.unsubscribe(); + addressesSub.unsubscribe(); + }; + // Only run effect once + // eslint-disable-next-line + }, []); return ( {children} diff --git a/front/context/src/StakingContext.tsx b/front/context/src/StakingContext.tsx deleted file mode 100644 index d682fded..00000000 --- a/front/context/src/StakingContext.tsx +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -import { DerivedFees, DerivedStakingAccount } from '@polkadot/api-derive/types'; -import { Option } from '@polkadot/types'; -import { AccountId } from '@polkadot/types/interfaces'; -import React, { createContext, useContext, useEffect, useState } from 'react'; -import { take } from 'rxjs/operators'; - -import { AccountsContext, ApiContext } from './index'; -import { AccountDerivedStakingMap, InjectedAccountExt } from './types'; - -type DeriveControllers = [AccountId[], Option[]]; - -export const StakingContext = createContext({ - accountStakingMap: {} as AccountDerivedStakingMap, - allControllers: [] as AccountId[], - allStashes: [] as AccountId[], - allStashesAndControllers: [[], []] as DeriveControllers, - derivedBalanceFees: {} as DerivedFees, - onlyBondedAccounts: {} as AccountDerivedStakingMap, -}); - -interface Props { - children: React.ReactNode; -} - -export function StakingContextProvider(props: Props): React.ReactElement { - const { children } = props; - const { injectedAccounts } = useContext(AccountsContext); - const { api, isReady } = useContext(ApiContext); - const [accountStakingMap, setAccountStakingMap] = useState< - AccountDerivedStakingMap - >({}); - const [onlyBondedAccounts, setOnlyBondedAccounts] = useState< - AccountDerivedStakingMap - >({}); - const [allStashesAndControllers, setAllStashesAndControllers] = useState(); - const [allStashes, setAllStashes] = useState([]); - const [allControllers, setAllControllers] = useState([]); - const [derivedBalanceFees, setDerivedBalanceFees] = useState( - {} as DerivedFees - ); - - // get derive.staking.info for each account in keyring - useEffect(() => { - if (isReady) { - const accounts: InjectedAccountExt[] = injectedAccounts; - accounts.map(({ address }: InjectedAccountExt) => { - const subscription = api.derive.staking - .account(address) - .pipe(take(1)) - .subscribe((derivedStaking: DerivedStakingAccount) => { - const newAccountStakingMap = accountStakingMap; - newAccountStakingMap[address] = derivedStaking; - - setAccountStakingMap(newAccountStakingMap); - if (derivedStaking.stashId && derivedStaking.controllerId) { - setOnlyBondedAccounts(newAccountStakingMap); - } - }); - - return (): void => subscription.unsubscribe(); - }); - } - }, [accountStakingMap, api, isReady, injectedAccounts]); - - // get allStashesAndControllers - useEffect(() => { - if (!isReady) { - return; - } - - const controllersSub = api.derive.staking - .controllers() - .pipe(take(1)) - .subscribe((allStashesAndControllers: DeriveControllers) => { - setAllStashesAndControllers(allStashesAndControllers); - const allControllers = allStashesAndControllers[1] - .filter((optional: Option): boolean => optional.isSome) - .map((accountId: Option) => accountId.unwrap()); - const allStashes = allStashesAndControllers[0]; - - setAllControllers(allControllers); - setAllStashes(allStashes); - }); - - return (): void => controllersSub.unsubscribe(); - }, [api, isReady]); - - // derived fees - useEffect(() => { - if (!isReady) { - return; - } - - const feeSub = api.derive.balances - .fees() - .pipe(take(1)) - .subscribe(setDerivedBalanceFees); - - return (): void => feeSub.unsubscribe(); - }, [api, isReady]); - - return ( - - {children} - - ); -} diff --git a/front/context/src/SystemContext.tsx b/front/context/src/SystemContext.tsx new file mode 100644 index 00000000..a4372b8d --- /dev/null +++ b/front/context/src/SystemContext.tsx @@ -0,0 +1,152 @@ +// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import Rpc from '@polkadot/rpc-core'; +import { WsProvider } from '@polkadot/rpc-provider'; +import { ProviderInterface } from '@polkadot/rpc-provider/types'; +import { Text, TypeRegistry } from '@polkadot/types'; +import { + BlockHash, + ChainProperties, + Header, + Health, +} from '@polkadot/types/interfaces'; +import { logger } from '@polkadot/util'; +import React, { useEffect, useRef, useState } from 'react'; +import { combineLatest, interval, merge } from 'rxjs'; +import { filter, switchMap, take } from 'rxjs/operators'; + +import { providerConnected } from './util'; + +/** + * System-wide meta-information about the chain (nothing from its state) + */ +export interface SystemContextType { + chain: Text; + genesisHash: BlockHash; + header: Header; + health: Health; + isSystemReady: boolean; + name: Text; + properties: ChainProperties; + version: Text; +} + +const l = logger('system-context'); + +export const SystemContext: React.Context = React.createContext( + {} as SystemContextType +); + +export interface SystemContextProviderProps { + children?: React.ReactElement; + provider: ProviderInterface; +} + +export function SystemContextProvider( + props: SystemContextProviderProps +): React.ReactElement { + const { children = null, provider } = props; + const [chain, setChain] = useState(); + const [genesisHash, setGenesisHash] = useState(); + const [header, setHeader] = useState
(); + const [health, setHealth] = useState(); + const [name, setName] = useState(); + const [properties, setProperties] = useState(); + const [version, setVersion] = useState(); + + const registryRef = useRef(new TypeRegistry()); + const rpcRef = useRef(new Rpc(registryRef.current, provider)); + const rpc = rpcRef.current; + + useEffect(() => { + // We want to fetch all the information again each time we reconnect. We + // might be connecting to a different node, or the node might have changed + // settings. + const sub = providerConnected(provider) + .pipe( + filter(connected => !!connected), + switchMap(() => + combineLatest([ + rpc.system.chain(), + rpc.chain.getBlockHash(0), + rpc.system.name(), + rpc.system.properties(), + rpc.system.version(), + ]) + ), + take(1) + ) + .subscribe(([_chain, _genesisHash, _name, _properties, _version]) => { + l.log( + `Rpc connected to chain "${_chain}" with properties ${JSON.stringify( + _properties + )} via ${ + // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore WsProvider.endpoint is private, but we still use it + // here, to have a nice log + provider instanceof WsProvider + ? provider.endpoint + : provider.constructor.name + }` + ); + + setChain(_chain); + setGenesisHash(_genesisHash); + setName(_name); + setProperties(_properties); + setVersion(_version); + }); + + return (): void => sub.unsubscribe(); + }, [provider, rpc]); + + useEffect(() => { + const sub = providerConnected(provider) + .pipe( + filter(connected => !!connected), + switchMap(() => + combineLatest([ + merge( + rpc.chain.subscribeNewHeads(), + // Header doesn't get updated when doing a major sync, so we also poll + interval(2000).pipe(switchMap(() => rpc.chain.getHeader())) + ), + rpc.system.health(), + ]) + ) + ) + .subscribe(([_header, _health]) => { + setHeader(_header); + setHealth(_health); + }); + + return (): void => sub.unsubscribe(); + }, [provider, rpc]); + + return ( + + {children} + + ); +} diff --git a/front/context/src/index.ts b/front/context/src/index.ts index 6a48e5f9..79855362 100644 --- a/front/context/src/index.ts +++ b/front/context/src/index.ts @@ -7,7 +7,7 @@ export * from './AlertsContext'; export * from './ApiContext'; export * from './HealthContext'; export * from './KeyringContext'; -export * from './StakingContext'; +export * from './SystemContext'; export * from './TxQueueContext'; export * from './types'; export * from './util'; diff --git a/front/context/src/util/index.ts b/front/context/src/util/index.ts index e5c59581..2bf0db31 100644 --- a/front/context/src/util/index.ts +++ b/front/context/src/util/index.ts @@ -2,7 +2,7 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -export * from './isTestChain'; export * from './keyring'; +export * from './provider'; export * from './ui'; export * from './validate'; diff --git a/front/context/src/util/isTestChain.ts b/front/context/src/util/isTestChain.ts deleted file mode 100644 index b4f3f91b..00000000 --- a/front/context/src/util/isTestChain.ts +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors -// This software may be modified and distributed under the terms -// of the Apache-2.0 license. See the LICENSE file for details. - -const TEST_CHAINS = ['Development', 'Local Testnet'] as const; -type TestChain = typeof TEST_CHAINS[number]; - -export function isTestChain(chain?: string): chain is TestChain { - if (!chain) { - return false; - } - - return TEST_CHAINS.includes(chain as TestChain); -} diff --git a/front/context/src/util/provider.ts b/front/context/src/util/provider.ts new file mode 100644 index 00000000..8f78fd29 --- /dev/null +++ b/front/context/src/util/provider.ts @@ -0,0 +1,29 @@ +// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// This software may be modified and distributed under the terms +// of the Apache-2.0 license. See the LICENSE file for details. + +import { ProviderInterface } from '@polkadot/rpc-provider/types'; +import { Observable } from 'rxjs'; + +/** + * Create an Observable for whether a provider is connected or not + * + * @param provider - The provider to track + */ +export function providerConnected(provider: ProviderInterface): Observable { + return new Observable(subscriber => { + if (provider.isConnected()) { + subscriber.next(true); + } else { + subscriber.next(false); + } + + provider.on('connected', () => { + subscriber.next(true); + }); + + provider.on('disconnected', () => { + subscriber.next(false); + }); + }); +} From 0f0bb36e61571ae6207252cba018dd79e754103f Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 29 Jan 2020 18:04:41 +0100 Subject: [PATCH 2/4] Fix lint --- front/context/src/SystemContext.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/front/context/src/SystemContext.tsx b/front/context/src/SystemContext.tsx index a4372b8d..a1cf1c51 100644 --- a/front/context/src/SystemContext.tsx +++ b/front/context/src/SystemContext.tsx @@ -83,11 +83,11 @@ export function SystemContextProvider( `Rpc connected to chain "${_chain}" with properties ${JSON.stringify( _properties )} via ${ - // eslint-disable-next-line @typescript-eslint/ban-ts-ignore - // @ts-ignore WsProvider.endpoint is private, but we still use it - // here, to have a nice log provider instanceof WsProvider - ? provider.endpoint + ? // eslint-disable-next-line @typescript-eslint/ban-ts-ignore + // @ts-ignore WsProvider.endpoint is private, but we still use it + // here, to have a nice log + provider.endpoint : provider.constructor.name }` ); From 4c8cfc055dc07b22d4c43c914ff6c36d38ca4061 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Wed, 29 Jan 2020 18:05:26 +0100 Subject: [PATCH 3/4] Update headers --- front/context/src/AccountsContext.tsx | 2 +- front/context/src/AlertsContext.tsx | 2 +- front/context/src/ApiContext.tsx | 2 +- front/context/src/HealthContext.tsx | 2 +- front/context/src/KeyringContext.tsx | 2 +- front/context/src/SystemContext.tsx | 2 +- front/context/src/TxQueueContext.tsx | 2 +- front/context/src/index.ts | 2 +- front/context/src/types.ts | 2 +- front/context/src/util/index.ts | 2 +- front/context/src/util/keyring.ts | 2 +- front/context/src/util/provider.ts | 2 +- front/context/src/util/ui.tsx | 2 +- front/context/src/util/validate.ts | 2 +- front/gatsby/src/ContextGate.tsx | 2 +- front/gatsby/src/pages/home.tsx | 2 +- front/gatsby/src/pages/index.tsx | 2 +- front/gatsby/src/pages/onboarding.tsx | 2 +- front/ui-components/.storybook/addons.ts | 2 +- front/ui-components/.storybook/config.ts | 2 +- front/ui-components/.storybook/webpack.config.js | 2 +- front/ui-components/src/Accordion.tsx | 2 +- front/ui-components/src/AccountsList.tsx | 2 +- front/ui-components/src/Address.tsx | 2 +- front/ui-components/src/Alert.tsx | 2 +- front/ui-components/src/BalanceDisplay.tsx | 2 +- front/ui-components/src/Breadcrumbs.tsx | 2 +- front/ui-components/src/Card.tsx | 2 +- front/ui-components/src/Circle.tsx | 2 +- front/ui-components/src/CopyButton.tsx | 2 +- front/ui-components/src/Dropdown.ts | 2 +- front/ui-components/src/Fab.tsx | 2 +- front/ui-components/src/FlexSegment.tsx | 2 +- front/ui-components/src/Icon.tsx | 2 +- front/ui-components/src/InputFile.tsx | 2 +- front/ui-components/src/Labelled.tsx | 2 +- front/ui-components/src/Loading.tsx | 2 +- front/ui-components/src/Margin.tsx | 2 +- front/ui-components/src/Menu.tsx | 2 +- front/ui-components/src/MnemonicPhraseList.tsx | 2 +- front/ui-components/src/MnemonicRewriteParts.tsx | 2 +- front/ui-components/src/MnemonicSegment.tsx | 2 +- front/ui-components/src/Modal.tsx | 2 +- front/ui-components/src/NavButton.tsx | 2 +- front/ui-components/src/NavHeader.tsx | 2 +- front/ui-components/src/Progress.tsx | 2 +- front/ui-components/src/Shared.styles.ts | 2 +- front/ui-components/src/StyleProps.tsx | 2 +- front/ui-components/src/TextArea.tsx | 2 +- front/ui-components/src/TxDetails.tsx | 2 +- front/ui-components/src/TxSummary.tsx | 2 +- front/ui-components/src/WalletCard.tsx | 2 +- front/ui-components/src/YayNay.tsx | 2 +- front/ui-components/src/constants.ts | 2 +- front/ui-components/src/globalStyle.ts | 2 +- front/ui-components/src/index.ts | 2 +- .../src/stateful/AddressSummary/AddressSummary.styles.ts | 2 +- .../src/stateful/AddressSummary/AddressSummary.tsx | 2 +- front/ui-components/src/stateful/AddressSummary/index.ts | 2 +- front/ui-components/src/stateful/AddressSummary/types.ts | 2 +- front/ui-components/src/stateful/Balance.tsx | 2 +- front/ui-components/src/stateful/InputAddress.tsx | 2 +- front/ui-components/src/stateful/index.ts | 2 +- front/ui-components/src/types.ts | 2 +- front/ui-components/src/util/toAddress.ts | 2 +- front/ui-components/src/util/toShortAddress.ts | 2 +- front/ui-components/stories/Accordion.stories.tsx | 2 +- front/ui-components/stories/Address.stories.tsx | 2 +- front/ui-components/stories/AddressSummary.stories.tsx | 2 +- front/ui-components/stories/Alert.stories.tsx | 2 +- front/ui-components/stories/BalanceDisplay.stories.tsx | 2 +- front/ui-components/stories/Breadcrumbs.stories.tsx | 2 +- front/ui-components/stories/Buttons.stories.tsx | 2 +- front/ui-components/stories/Fab.stories.tsx | 2 +- front/ui-components/stories/Header.stories.tsx | 2 +- front/ui-components/stories/Input.stories.tsx | 2 +- front/ui-components/stories/InputAddress.stories.tsx | 2 +- front/ui-components/stories/InputFile.stories.tsx | 2 +- front/ui-components/stories/Menu.stories.tsx | 2 +- front/ui-components/stories/MnemonicPhraseList.stories.tsx | 2 +- front/ui-components/stories/Modal.stories.tsx | 2 +- front/ui-components/stories/Progress.stories.tsx | 2 +- front/ui-components/stories/Transitions.stories.tsx | 2 +- front/ui-components/stories/YayNay.stories.tsx | 2 +- front/ui-components/stories/customDecorators/index.ts | 2 +- front/ui-components/stories/customDecorators/withApi.tsx | 2 +- front/ui-components/stories/customDecorators/withKeyring.tsx | 2 +- front/ui-components/stories/customDecorators/withTheme.tsx | 2 +- front/ui-components/stories/theme.stories.tsx | 2 +- 89 files changed, 89 insertions(+), 89 deletions(-) diff --git a/front/context/src/AccountsContext.tsx b/front/context/src/AccountsContext.tsx index 8f3c3ad7..344d55bf 100644 --- a/front/context/src/AccountsContext.tsx +++ b/front/context/src/AccountsContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/AlertsContext.tsx b/front/context/src/AlertsContext.tsx index ed0482eb..c87e28e9 100644 --- a/front/context/src/AlertsContext.tsx +++ b/front/context/src/AlertsContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/ApiContext.tsx b/front/context/src/ApiContext.tsx index ed642d4b..657ae6b7 100644 --- a/front/context/src/ApiContext.tsx +++ b/front/context/src/ApiContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/HealthContext.tsx b/front/context/src/HealthContext.tsx index b5c46acb..15b73ce3 100644 --- a/front/context/src/HealthContext.tsx +++ b/front/context/src/HealthContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/KeyringContext.tsx b/front/context/src/KeyringContext.tsx index 756e4221..956b8353 100644 --- a/front/context/src/KeyringContext.tsx +++ b/front/context/src/KeyringContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/SystemContext.tsx b/front/context/src/SystemContext.tsx index a1cf1c51..50d72da2 100644 --- a/front/context/src/SystemContext.tsx +++ b/front/context/src/SystemContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/TxQueueContext.tsx b/front/context/src/TxQueueContext.tsx index 9210d4cf..f9263169 100644 --- a/front/context/src/TxQueueContext.tsx +++ b/front/context/src/TxQueueContext.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/index.ts b/front/context/src/index.ts index 79855362..78ef05e8 100644 --- a/front/context/src/index.ts +++ b/front/context/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/types.ts b/front/context/src/types.ts index 1d9abf64..bd896b0e 100644 --- a/front/context/src/types.ts +++ b/front/context/src/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/util/index.ts b/front/context/src/util/index.ts index 2bf0db31..c8bdd3c9 100644 --- a/front/context/src/util/index.ts +++ b/front/context/src/util/index.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/util/keyring.ts b/front/context/src/util/keyring.ts index 4bab3e85..0d5c8bc4 100644 --- a/front/context/src/util/keyring.ts +++ b/front/context/src/util/keyring.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/util/provider.ts b/front/context/src/util/provider.ts index 8f78fd29..cf04ffb5 100644 --- a/front/context/src/util/provider.ts +++ b/front/context/src/util/provider.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/util/ui.tsx b/front/context/src/util/ui.tsx index 73157a22..9e387a82 100644 --- a/front/context/src/util/ui.tsx +++ b/front/context/src/util/ui.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/context/src/util/validate.ts b/front/context/src/util/validate.ts index 6b49cfc3..0333d33f 100644 --- a/front/context/src/util/validate.ts +++ b/front/context/src/util/validate.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/gatsby/src/ContextGate.tsx b/front/gatsby/src/ContextGate.tsx index 1d2fce9a..badf8596 100644 --- a/front/gatsby/src/ContextGate.tsx +++ b/front/gatsby/src/ContextGate.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/gatsby/src/pages/home.tsx b/front/gatsby/src/pages/home.tsx index 28e7f928..3165e928 100644 --- a/front/gatsby/src/pages/home.tsx +++ b/front/gatsby/src/pages/home.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/gatsby/src/pages/index.tsx b/front/gatsby/src/pages/index.tsx index c7bf3a20..dbf9945f 100644 --- a/front/gatsby/src/pages/index.tsx +++ b/front/gatsby/src/pages/index.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/gatsby/src/pages/onboarding.tsx b/front/gatsby/src/pages/onboarding.tsx index ac42cce0..0d02aa7a 100644 --- a/front/gatsby/src/pages/onboarding.tsx +++ b/front/gatsby/src/pages/onboarding.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/.storybook/addons.ts b/front/ui-components/.storybook/addons.ts index 9da4058d..e54c7888 100644 --- a/front/ui-components/.storybook/addons.ts +++ b/front/ui-components/.storybook/addons.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/.storybook/config.ts b/front/ui-components/.storybook/config.ts index c14cb459..65a0ecb1 100644 --- a/front/ui-components/.storybook/config.ts +++ b/front/ui-components/.storybook/config.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/.storybook/webpack.config.js b/front/ui-components/.storybook/webpack.config.js index eccd4cb4..0040696f 100644 --- a/front/ui-components/.storybook/webpack.config.js +++ b/front/ui-components/.storybook/webpack.config.js @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Accordion.tsx b/front/ui-components/src/Accordion.tsx index c11d954a..7fe02abf 100644 --- a/front/ui-components/src/Accordion.tsx +++ b/front/ui-components/src/Accordion.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/AccountsList.tsx b/front/ui-components/src/AccountsList.tsx index 76375af7..bd8487c7 100644 --- a/front/ui-components/src/AccountsList.tsx +++ b/front/ui-components/src/AccountsList.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Address.tsx b/front/ui-components/src/Address.tsx index 18c2c4bb..8ba076c4 100644 --- a/front/ui-components/src/Address.tsx +++ b/front/ui-components/src/Address.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Alert.tsx b/front/ui-components/src/Alert.tsx index d9bd7462..868b183e 100644 --- a/front/ui-components/src/Alert.tsx +++ b/front/ui-components/src/Alert.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/BalanceDisplay.tsx b/front/ui-components/src/BalanceDisplay.tsx index 5eee2415..4208598b 100644 --- a/front/ui-components/src/BalanceDisplay.tsx +++ b/front/ui-components/src/BalanceDisplay.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Breadcrumbs.tsx b/front/ui-components/src/Breadcrumbs.tsx index dce08e49..55e5c1bb 100644 --- a/front/ui-components/src/Breadcrumbs.tsx +++ b/front/ui-components/src/Breadcrumbs.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Card.tsx b/front/ui-components/src/Card.tsx index f933751c..244cc0ee 100644 --- a/front/ui-components/src/Card.tsx +++ b/front/ui-components/src/Card.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Circle.tsx b/front/ui-components/src/Circle.tsx index 7a2b89ad..77295382 100644 --- a/front/ui-components/src/Circle.tsx +++ b/front/ui-components/src/Circle.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/CopyButton.tsx b/front/ui-components/src/CopyButton.tsx index 8813c5bb..d69780a4 100644 --- a/front/ui-components/src/CopyButton.tsx +++ b/front/ui-components/src/CopyButton.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Dropdown.ts b/front/ui-components/src/Dropdown.ts index 94e60639..198dc516 100644 --- a/front/ui-components/src/Dropdown.ts +++ b/front/ui-components/src/Dropdown.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Fab.tsx b/front/ui-components/src/Fab.tsx index f0960259..fbb0e679 100644 --- a/front/ui-components/src/Fab.tsx +++ b/front/ui-components/src/Fab.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/FlexSegment.tsx b/front/ui-components/src/FlexSegment.tsx index ec3ef865..01bce02b 100644 --- a/front/ui-components/src/FlexSegment.tsx +++ b/front/ui-components/src/FlexSegment.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Icon.tsx b/front/ui-components/src/Icon.tsx index 2651eda0..aaa25b62 100644 --- a/front/ui-components/src/Icon.tsx +++ b/front/ui-components/src/Icon.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/InputFile.tsx b/front/ui-components/src/InputFile.tsx index fe71bdf8..87851543 100644 --- a/front/ui-components/src/InputFile.tsx +++ b/front/ui-components/src/InputFile.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Labelled.tsx b/front/ui-components/src/Labelled.tsx index 4e2cbbfb..7fac6e7d 100644 --- a/front/ui-components/src/Labelled.tsx +++ b/front/ui-components/src/Labelled.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Loading.tsx b/front/ui-components/src/Loading.tsx index 35388689..a0d818d4 100644 --- a/front/ui-components/src/Loading.tsx +++ b/front/ui-components/src/Loading.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Margin.tsx b/front/ui-components/src/Margin.tsx index 88a2b5dd..9a1880ac 100644 --- a/front/ui-components/src/Margin.tsx +++ b/front/ui-components/src/Margin.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Menu.tsx b/front/ui-components/src/Menu.tsx index 8591d3ce..4c42ee0f 100644 --- a/front/ui-components/src/Menu.tsx +++ b/front/ui-components/src/Menu.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/MnemonicPhraseList.tsx b/front/ui-components/src/MnemonicPhraseList.tsx index 1fc65d3b..dd5cbb9f 100644 --- a/front/ui-components/src/MnemonicPhraseList.tsx +++ b/front/ui-components/src/MnemonicPhraseList.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/MnemonicRewriteParts.tsx b/front/ui-components/src/MnemonicRewriteParts.tsx index abbd8683..a4c5da69 100644 --- a/front/ui-components/src/MnemonicRewriteParts.tsx +++ b/front/ui-components/src/MnemonicRewriteParts.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/MnemonicSegment.tsx b/front/ui-components/src/MnemonicSegment.tsx index 67d7324d..ff669979 100644 --- a/front/ui-components/src/MnemonicSegment.tsx +++ b/front/ui-components/src/MnemonicSegment.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Modal.tsx b/front/ui-components/src/Modal.tsx index a9b31b80..be633a93 100644 --- a/front/ui-components/src/Modal.tsx +++ b/front/ui-components/src/Modal.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/NavButton.tsx b/front/ui-components/src/NavButton.tsx index 28a69486..42f864e4 100644 --- a/front/ui-components/src/NavButton.tsx +++ b/front/ui-components/src/NavButton.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/NavHeader.tsx b/front/ui-components/src/NavHeader.tsx index 0696fa38..1db3e0d6 100644 --- a/front/ui-components/src/NavHeader.tsx +++ b/front/ui-components/src/NavHeader.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Progress.tsx b/front/ui-components/src/Progress.tsx index 5adb5a17..73f988b3 100644 --- a/front/ui-components/src/Progress.tsx +++ b/front/ui-components/src/Progress.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/Shared.styles.ts b/front/ui-components/src/Shared.styles.ts index 5d4f4288..7da44599 100644 --- a/front/ui-components/src/Shared.styles.ts +++ b/front/ui-components/src/Shared.styles.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/StyleProps.tsx b/front/ui-components/src/StyleProps.tsx index 7339491c..6094638e 100644 --- a/front/ui-components/src/StyleProps.tsx +++ b/front/ui-components/src/StyleProps.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/TextArea.tsx b/front/ui-components/src/TextArea.tsx index d982162f..df8357a1 100644 --- a/front/ui-components/src/TextArea.tsx +++ b/front/ui-components/src/TextArea.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/TxDetails.tsx b/front/ui-components/src/TxDetails.tsx index e8b76c5b..a77e1e39 100644 --- a/front/ui-components/src/TxDetails.tsx +++ b/front/ui-components/src/TxDetails.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/TxSummary.tsx b/front/ui-components/src/TxSummary.tsx index e36eb2ef..36e862d9 100644 --- a/front/ui-components/src/TxSummary.tsx +++ b/front/ui-components/src/TxSummary.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/WalletCard.tsx b/front/ui-components/src/WalletCard.tsx index ff9e3891..c1d0f9d1 100644 --- a/front/ui-components/src/WalletCard.tsx +++ b/front/ui-components/src/WalletCard.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/YayNay.tsx b/front/ui-components/src/YayNay.tsx index c8a2fb8f..a2112c64 100644 --- a/front/ui-components/src/YayNay.tsx +++ b/front/ui-components/src/YayNay.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/constants.ts b/front/ui-components/src/constants.ts index f38a912b..3628635e 100644 --- a/front/ui-components/src/constants.ts +++ b/front/ui-components/src/constants.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/globalStyle.ts b/front/ui-components/src/globalStyle.ts index ef80f16e..5ca5b3bf 100644 --- a/front/ui-components/src/globalStyle.ts +++ b/front/ui-components/src/globalStyle.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/index.ts b/front/ui-components/src/index.ts index def94e78..63a08291 100644 --- a/front/ui-components/src/index.ts +++ b/front/ui-components/src/index.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/AddressSummary/AddressSummary.styles.ts b/front/ui-components/src/stateful/AddressSummary/AddressSummary.styles.ts index 84269c80..4b27d90d 100644 --- a/front/ui-components/src/stateful/AddressSummary/AddressSummary.styles.ts +++ b/front/ui-components/src/stateful/AddressSummary/AddressSummary.styles.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/AddressSummary/AddressSummary.tsx b/front/ui-components/src/stateful/AddressSummary/AddressSummary.tsx index ae063a90..583ea0ff 100644 --- a/front/ui-components/src/stateful/AddressSummary/AddressSummary.tsx +++ b/front/ui-components/src/stateful/AddressSummary/AddressSummary.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/AddressSummary/index.ts b/front/ui-components/src/stateful/AddressSummary/index.ts index e4c3ed3e..06f5fbd6 100644 --- a/front/ui-components/src/stateful/AddressSummary/index.ts +++ b/front/ui-components/src/stateful/AddressSummary/index.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/AddressSummary/types.ts b/front/ui-components/src/stateful/AddressSummary/types.ts index 7429166a..04c93c19 100644 --- a/front/ui-components/src/stateful/AddressSummary/types.ts +++ b/front/ui-components/src/stateful/AddressSummary/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/Balance.tsx b/front/ui-components/src/stateful/Balance.tsx index 8a58b7a4..e0bf6f6e 100644 --- a/front/ui-components/src/stateful/Balance.tsx +++ b/front/ui-components/src/stateful/Balance.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/InputAddress.tsx b/front/ui-components/src/stateful/InputAddress.tsx index 3bfb5f24..cb0740c6 100644 --- a/front/ui-components/src/stateful/InputAddress.tsx +++ b/front/ui-components/src/stateful/InputAddress.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/stateful/index.ts b/front/ui-components/src/stateful/index.ts index f5354289..9c8f51e8 100644 --- a/front/ui-components/src/stateful/index.ts +++ b/front/ui-components/src/stateful/index.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/types.ts b/front/ui-components/src/types.ts index de4edec4..c84fb501 100644 --- a/front/ui-components/src/types.ts +++ b/front/ui-components/src/types.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/util/toAddress.ts b/front/ui-components/src/util/toAddress.ts index 00e53adf..f20f89d0 100644 --- a/front/ui-components/src/util/toAddress.ts +++ b/front/ui-components/src/util/toAddress.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/src/util/toShortAddress.ts b/front/ui-components/src/util/toShortAddress.ts index d69f8a4e..180d99d7 100644 --- a/front/ui-components/src/util/toShortAddress.ts +++ b/front/ui-components/src/util/toShortAddress.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Accordion.stories.tsx b/front/ui-components/stories/Accordion.stories.tsx index 0c5b078b..a390bd8c 100644 --- a/front/ui-components/stories/Accordion.stories.tsx +++ b/front/ui-components/stories/Accordion.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. import { boolean, withKnobs } from '@storybook/addon-knobs'; diff --git a/front/ui-components/stories/Address.stories.tsx b/front/ui-components/stories/Address.stories.tsx index b22f9207..cafbfa5f 100644 --- a/front/ui-components/stories/Address.stories.tsx +++ b/front/ui-components/stories/Address.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/AddressSummary.stories.tsx b/front/ui-components/stories/AddressSummary.stories.tsx index bfd48f47..02b582c2 100644 --- a/front/ui-components/stories/AddressSummary.stories.tsx +++ b/front/ui-components/stories/AddressSummary.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Alert.stories.tsx b/front/ui-components/stories/Alert.stories.tsx index e1d24e6b..1f06e49b 100644 --- a/front/ui-components/stories/Alert.stories.tsx +++ b/front/ui-components/stories/Alert.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/BalanceDisplay.stories.tsx b/front/ui-components/stories/BalanceDisplay.stories.tsx index a1f12ac9..697d1c1a 100644 --- a/front/ui-components/stories/BalanceDisplay.stories.tsx +++ b/front/ui-components/stories/BalanceDisplay.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Breadcrumbs.stories.tsx b/front/ui-components/stories/Breadcrumbs.stories.tsx index e1f23dc4..5cbd85a3 100644 --- a/front/ui-components/stories/Breadcrumbs.stories.tsx +++ b/front/ui-components/stories/Breadcrumbs.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Buttons.stories.tsx b/front/ui-components/stories/Buttons.stories.tsx index 0f49c1e8..a7973812 100644 --- a/front/ui-components/stories/Buttons.stories.tsx +++ b/front/ui-components/stories/Buttons.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Fab.stories.tsx b/front/ui-components/stories/Fab.stories.tsx index 2044ac54..7985e632 100644 --- a/front/ui-components/stories/Fab.stories.tsx +++ b/front/ui-components/stories/Fab.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Header.stories.tsx b/front/ui-components/stories/Header.stories.tsx index 4e85708a..6f3161ae 100644 --- a/front/ui-components/stories/Header.stories.tsx +++ b/front/ui-components/stories/Header.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Input.stories.tsx b/front/ui-components/stories/Input.stories.tsx index a4a14a3e..16fbc235 100644 --- a/front/ui-components/stories/Input.stories.tsx +++ b/front/ui-components/stories/Input.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/InputAddress.stories.tsx b/front/ui-components/stories/InputAddress.stories.tsx index c52a204a..15b7f775 100644 --- a/front/ui-components/stories/InputAddress.stories.tsx +++ b/front/ui-components/stories/InputAddress.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/InputFile.stories.tsx b/front/ui-components/stories/InputFile.stories.tsx index 2c3abdca..33ada295 100644 --- a/front/ui-components/stories/InputFile.stories.tsx +++ b/front/ui-components/stories/InputFile.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Menu.stories.tsx b/front/ui-components/stories/Menu.stories.tsx index 1b78bf5f..ef28d876 100644 --- a/front/ui-components/stories/Menu.stories.tsx +++ b/front/ui-components/stories/Menu.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/MnemonicPhraseList.stories.tsx b/front/ui-components/stories/MnemonicPhraseList.stories.tsx index 9bb6f5c4..ba48f536 100644 --- a/front/ui-components/stories/MnemonicPhraseList.stories.tsx +++ b/front/ui-components/stories/MnemonicPhraseList.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Modal.stories.tsx b/front/ui-components/stories/Modal.stories.tsx index 1711c5f0..127f10b1 100644 --- a/front/ui-components/stories/Modal.stories.tsx +++ b/front/ui-components/stories/Modal.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Progress.stories.tsx b/front/ui-components/stories/Progress.stories.tsx index b32c3d34..fcb57b3c 100644 --- a/front/ui-components/stories/Progress.stories.tsx +++ b/front/ui-components/stories/Progress.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/Transitions.stories.tsx b/front/ui-components/stories/Transitions.stories.tsx index 58233610..5baa80ca 100644 --- a/front/ui-components/stories/Transitions.stories.tsx +++ b/front/ui-components/stories/Transitions.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/YayNay.stories.tsx b/front/ui-components/stories/YayNay.stories.tsx index a7d2a1ef..6dc1d94b 100644 --- a/front/ui-components/stories/YayNay.stories.tsx +++ b/front/ui-components/stories/YayNay.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/customDecorators/index.ts b/front/ui-components/stories/customDecorators/index.ts index db35cfa9..499628b6 100644 --- a/front/ui-components/stories/customDecorators/index.ts +++ b/front/ui-components/stories/customDecorators/index.ts @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/customDecorators/withApi.tsx b/front/ui-components/stories/customDecorators/withApi.tsx index 1f4e5492..8ecfdca3 100644 --- a/front/ui-components/stories/customDecorators/withApi.tsx +++ b/front/ui-components/stories/customDecorators/withApi.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/customDecorators/withKeyring.tsx b/front/ui-components/stories/customDecorators/withKeyring.tsx index d89c0f57..5da5b062 100644 --- a/front/ui-components/stories/customDecorators/withKeyring.tsx +++ b/front/ui-components/stories/customDecorators/withKeyring.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/customDecorators/withTheme.tsx b/front/ui-components/stories/customDecorators/withTheme.tsx index 588487ff..c959053e 100644 --- a/front/ui-components/stories/customDecorators/withTheme.tsx +++ b/front/ui-components/stories/customDecorators/withTheme.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. diff --git a/front/ui-components/stories/theme.stories.tsx b/front/ui-components/stories/theme.stories.tsx index b166bd07..1c71768d 100644 --- a/front/ui-components/stories/theme.stories.tsx +++ b/front/ui-components/stories/theme.stories.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 @paritytech/substrate-light-ui authors & contributors +// Copyright 2018-2020 @paritytech/Nomidot authors & contributors // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. From d33d9a21bd250c5491348461ca7b432a28a7b209 Mon Sep 17 00:00:00 2001 From: Amaury Martiny Date: Thu, 30 Jan 2020 10:31:24 +0100 Subject: [PATCH 4/4] Fix lint --- front/context/src/util/provider.ts | 4 +++- front/gatsby/src/ContextGate.tsx | 3 +-- front/gatsby/src/pages/index.tsx | 4 ++-- front/ui-components/src/stateful/Balance.tsx | 6 +++--- front/ui-components/stories/customDecorators/withApi.tsx | 3 --- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/front/context/src/util/provider.ts b/front/context/src/util/provider.ts index cf04ffb5..c8ed1398 100644 --- a/front/context/src/util/provider.ts +++ b/front/context/src/util/provider.ts @@ -10,7 +10,9 @@ import { Observable } from 'rxjs'; * * @param provider - The provider to track */ -export function providerConnected(provider: ProviderInterface): Observable { +export function providerConnected( + provider: ProviderInterface +): Observable { return new Observable(subscriber => { if (provider.isConnected()) { subscriber.next(true); diff --git a/front/gatsby/src/ContextGate.tsx b/front/gatsby/src/ContextGate.tsx index badf8596..63b483fc 100644 --- a/front/gatsby/src/ContextGate.tsx +++ b/front/gatsby/src/ContextGate.tsx @@ -7,7 +7,6 @@ import { AccountsContextProvider, AlertsContextProvider, ApiContextProvider, - StakingContextProvider, TxQueueContextProvider, } from '@substrate/context'; import React from 'react'; @@ -24,7 +23,7 @@ export function ContextGate({ - {children} + <>{children} diff --git a/front/gatsby/src/pages/index.tsx b/front/gatsby/src/pages/index.tsx index dbf9945f..1c0bd1ea 100644 --- a/front/gatsby/src/pages/index.tsx +++ b/front/gatsby/src/pages/index.tsx @@ -15,9 +15,9 @@ function IndexPage(): React.ReactElement { {({ - isReady, + isApiReady, }: Partial): React.ReactElement | boolean | undefined => - isReady && ( + isApiReady && ( diff --git a/front/ui-components/src/stateful/Balance.tsx b/front/ui-components/src/stateful/Balance.tsx index e0bf6f6e..7f313bbf 100644 --- a/front/ui-components/src/stateful/Balance.tsx +++ b/front/ui-components/src/stateful/Balance.tsx @@ -26,12 +26,12 @@ export function Balance(props: BalanceProps): React.ReactElement { orientation = 'horizontal', ...rest } = props; - const { api, isReady } = useContext(ApiContext); + const { api, isApiReady } = useContext(ApiContext); const [allBalances, setAllBalances] = useState(); const [allStaking, setAllStaking] = useState(); useEffect(() => { - if (isReady) { + if (isApiReady) { const balanceSub = combineLatest([ api.derive.balances.all(address), api.derive.staking.account(address), @@ -42,7 +42,7 @@ export function Balance(props: BalanceProps): React.ReactElement { return (): void => balanceSub.unsubscribe(); } - }, [api, isReady, address]); + }, [api, isApiReady, address]); const handleRedeem = (address: string): void => { // FIXME We're not unsubscring here, we should diff --git a/front/ui-components/stories/customDecorators/withApi.tsx b/front/ui-components/stories/customDecorators/withApi.tsx index 8ecfdca3..453c1b61 100644 --- a/front/ui-components/stories/customDecorators/withApi.tsx +++ b/front/ui-components/stories/customDecorators/withApi.tsx @@ -6,14 +6,11 @@ import { WsProvider } from '@polkadot/api'; import { ApiContextProvider } from '@substrate/context'; import React from 'react'; -import { Loading } from '../../src/index'; - export const withApi = ( storyFn: () => React.ReactElement ): React.ReactElement => { return ( Connecting to the node...} provider={new WsProvider('wss://kusama-rpc.polkadot.io/')} > {storyFn()}