Bump dev (w/ lint fixes) (#6006)
* Bump dev (w/ lint fixes) * Additional * Bump ui/extension
This commit is contained in:
parent
7f848ecb98
commit
b8daf379e7
32
package.json
32
package.json
@ -12,18 +12,18 @@
|
||||
"packages/*"
|
||||
],
|
||||
"resolutions": {
|
||||
"@polkadot/api": "^5.6.2-4",
|
||||
"@polkadot/api-contract": "^5.6.2-4",
|
||||
"@polkadot/hw-ledger": "^7.2.1",
|
||||
"@polkadot/keyring": "^7.2.1",
|
||||
"@polkadot/networks": "^7.2.1",
|
||||
"@polkadot/api": "^5.6.2-7",
|
||||
"@polkadot/api-contract": "^5.6.2-7",
|
||||
"@polkadot/hw-ledger": "^7.2.2-7",
|
||||
"@polkadot/keyring": "^7.2.2-7",
|
||||
"@polkadot/networks": "^7.2.2-7",
|
||||
"@polkadot/phishing": "^0.6.266",
|
||||
"@polkadot/types": "^5.6.2-4",
|
||||
"@polkadot/types-known": "^5.6.2-4",
|
||||
"@polkadot/types-support": "^5.6.2-4",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@polkadot/util-crypto": "^7.2.1",
|
||||
"@polkadot/wasm-crypto": "^4.1.2",
|
||||
"@polkadot/types": "^5.6.2-7",
|
||||
"@polkadot/types-known": "^5.6.2-7",
|
||||
"@polkadot/types-support": "^5.6.2-7",
|
||||
"@polkadot/util": "^7.2.2-7",
|
||||
"@polkadot/util-crypto": "^7.2.2-7",
|
||||
"@polkadot/wasm-crypto": "^4.1.3-7",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"styled-components": "^5.2.0",
|
||||
"typescript": "^4.3.5"
|
||||
@ -73,8 +73,8 @@
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@crustio/crust-pin": "^0.0.1",
|
||||
"@pinata/sdk": "^1.1.23",
|
||||
"@polkadot/dev": "^0.62.61",
|
||||
"@polkadot/ts": "^0.4.5",
|
||||
"@polkadot/dev": "^0.62.62",
|
||||
"@polkadot/ts": "^0.4.6",
|
||||
"@types/bn.js": "^4.11.6",
|
||||
"@types/chart.js": "^2.9.34",
|
||||
"@types/file-saver": "^2.0.3",
|
||||
@ -84,7 +84,7 @@
|
||||
"@types/react-dom": "^17.0.9",
|
||||
"@types/react-router-dom": "^5.1.8",
|
||||
"@types/store": "^2.0.2",
|
||||
"@types/styled-components": "^5.1.12",
|
||||
"@types/styled-components": "^5.1.13",
|
||||
"@types/styled-theming": "^2.2.5",
|
||||
"concurrently": "^6.2.1",
|
||||
"devtron": "^1.4.0",
|
||||
@ -97,11 +97,11 @@
|
||||
"react-dom": "^17.0.2",
|
||||
"react-is": "^17.0.2",
|
||||
"source-map-explorer": "^2.5.2",
|
||||
"styled-components": "^5.3.0",
|
||||
"styled-components": "^5.3.1",
|
||||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-recommended": "^5.0.0",
|
||||
"stylelint-config-styled-components": "^0.1.1",
|
||||
"webpack": "^5.50.0",
|
||||
"webpack": "^5.51.1",
|
||||
"webpack-cli": "^4.8.0"
|
||||
},
|
||||
"packageManager": "yarn@3.0.1"
|
||||
|
||||
@ -9,26 +9,26 @@
|
||||
"dependencies": {
|
||||
"@acala-network/type-definitions": "2.1.1",
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@bifrost-finance/type-definitions": "1.2.12",
|
||||
"@bifrost-finance/type-definitions": "1.2.13",
|
||||
"@crustio/type-definitions": "0.0.10",
|
||||
"@darwinia/types": "1.1.6",
|
||||
"@digitalnative/type-definitions": "1.1.11",
|
||||
"@darwinia/types": "1.1.7",
|
||||
"@digitalnative/type-definitions": "1.1.12",
|
||||
"@docknetwork/node-types": "0.4.7",
|
||||
"@edgeware/node-types": "3.6.2-wako",
|
||||
"@equilab/definitions": "1.3.1",
|
||||
"@interlay/interbtc-types": "0.10.1",
|
||||
"@equilab/definitions": "1.3.6",
|
||||
"@interlay/interbtc-types": "0.10.2",
|
||||
"@kiltprotocol/type-definitions": "0.1.14",
|
||||
"@laminar/type-definitions": "0.3.1",
|
||||
"@parallel-finance/type-definitions": "1.1.1",
|
||||
"@phala/typedefs": "0.2.14",
|
||||
"@polkadot/networks": "^7.2.1",
|
||||
"@polkadot/networks": "^7.2.2-7",
|
||||
"@polymathnetwork/polymesh-types": "0.0.2",
|
||||
"@snowfork/snowbridge-types": "0.2.5",
|
||||
"@sora-substrate/type-definitions": "1.5.2",
|
||||
"@sora-substrate/type-definitions": "1.5.10",
|
||||
"@subsocial/types": "0.6.1-1",
|
||||
"@zeitgeistpm/type-defs": "0.2.5",
|
||||
"moonbeam-types-bundle": "1.2.4",
|
||||
"pontem-types-bundle": "1.0.5",
|
||||
"pontem-types-bundle": "1.0.8",
|
||||
"rxjs": "^7.3.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
@ -150,7 +150,7 @@ const spec: Record<string, OverrideBundleDefinition> = {
|
||||
'hack-hydra-dx': hydrate,
|
||||
halongbay: polkafoundry,
|
||||
hanonycash,
|
||||
heiko: { ...parallel },
|
||||
heiko: parallel,
|
||||
'hydra-dx': hydrate,
|
||||
idavoll,
|
||||
'integritee-parachain': integritee,
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
"dependencies": {
|
||||
"@babel/core": "^7.15.0",
|
||||
"@babel/polyfill": "^7.12.1",
|
||||
"@polkadot/dev": "^0.62.61",
|
||||
"@polkadot/dev": "^0.62.62",
|
||||
"@polkadot/react-components": "^0.95.2-41",
|
||||
"electron-log": "^4.3.5",
|
||||
"electron-updater": "^4.3.10"
|
||||
@ -21,6 +21,6 @@
|
||||
"react-dom": "^17.0.2",
|
||||
"thread-loader": "^3.0.4",
|
||||
"tmp": "^0.2.1",
|
||||
"webpack": "^5.50.0"
|
||||
"webpack": "^5.51.1"
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/apps-config": "^0.95.2-41",
|
||||
"@polkadot/apps-routing": "^0.95.2-41",
|
||||
"@polkadot/dev": "^0.62.61",
|
||||
"@polkadot/dev": "^0.62.62",
|
||||
"@polkadot/react-api": "^0.95.2-41",
|
||||
"@polkadot/react-components": "^0.95.2-41",
|
||||
"@polkadot/react-hooks": "^0.95.2-41",
|
||||
@ -39,7 +39,7 @@
|
||||
"process": "^0.11.10",
|
||||
"stream-browserify": "^3.0.0",
|
||||
"url-loader": "^4.1.1",
|
||||
"webpack": "^5.50.0",
|
||||
"webpack": "^5.51.1",
|
||||
"webpack-cli": "^4.8.0",
|
||||
"webpack-dev-server": "^4.0.0-rc.0",
|
||||
"webpack-merge": "^5.8.0"
|
||||
|
||||
@ -174,30 +174,23 @@ function Endpoints ({ className = '', offset, onClose }: Props): React.ReactElem
|
||||
[]
|
||||
);
|
||||
|
||||
const _saveApiEndpoint = () => {
|
||||
try {
|
||||
localStorage.setItem(CUSTOM_ENDPOINT_KEY, JSON.stringify([...storedCustomEndpoints, apiUrl]));
|
||||
_onApply();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// ignore error
|
||||
}
|
||||
};
|
||||
const _removeApiEndpoint = useCallback(
|
||||
(): void => {
|
||||
if (!isSavedCustomEndpoint) return;
|
||||
|
||||
const _removeApiEndpoint = () => {
|
||||
if (!isSavedCustomEndpoint) return;
|
||||
const newStoredCurstomEndpoints = storedCustomEndpoints.filter((url) => url !== apiUrl);
|
||||
|
||||
const newStoredCurstomEndpoints = storedCustomEndpoints.filter((url) => url !== apiUrl);
|
||||
|
||||
try {
|
||||
localStorage.setItem(CUSTOM_ENDPOINT_KEY, JSON.stringify(newStoredCurstomEndpoints));
|
||||
setGroups(combineEndpoints(createWsEndpoints(t)));
|
||||
setStoredCustomEndpoints(getCustomEndpoints());
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// ignore error
|
||||
}
|
||||
};
|
||||
try {
|
||||
localStorage.setItem(CUSTOM_ENDPOINT_KEY, JSON.stringify(newStoredCurstomEndpoints));
|
||||
setGroups(combineEndpoints(createWsEndpoints(t)));
|
||||
setStoredCustomEndpoints(getCustomEndpoints());
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// ignore error
|
||||
}
|
||||
},
|
||||
[apiUrl, isSavedCustomEndpoint, storedCustomEndpoints, t]
|
||||
);
|
||||
|
||||
const _setApiUrl = useCallback(
|
||||
(network: string, apiUrl: string): void => {
|
||||
@ -234,6 +227,19 @@ function Endpoints ({ className = '', offset, onClose }: Props): React.ReactElem
|
||||
[apiUrl, onClose]
|
||||
);
|
||||
|
||||
const _saveApiEndpoint = useCallback(
|
||||
(): void => {
|
||||
try {
|
||||
localStorage.setItem(CUSTOM_ENDPOINT_KEY, JSON.stringify([...storedCustomEndpoints, apiUrl]));
|
||||
_onApply();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
// ignore error
|
||||
}
|
||||
},
|
||||
[_onApply, apiUrl, storedCustomEndpoints]
|
||||
);
|
||||
|
||||
const canSwitch = useMemo(
|
||||
() => isSwitchDisabled(hasUrlChanged, apiUrl, isUrlValid),
|
||||
[hasUrlChanged, apiUrl, isUrlValid]
|
||||
@ -276,17 +282,21 @@ function Endpoints ({ className = '', offset, onClose }: Props): React.ReactElem
|
||||
value={apiUrl}
|
||||
/>
|
||||
{isSavedCustomEndpoint
|
||||
? <Button
|
||||
className='customButton'
|
||||
icon='trash-alt'
|
||||
onClick={_removeApiEndpoint}
|
||||
/>
|
||||
: <Button
|
||||
className='customButton'
|
||||
icon='save'
|
||||
isDisabled={!isUrlValid || isKnownUrl}
|
||||
onClick={_saveApiEndpoint}
|
||||
/>
|
||||
? (
|
||||
<Button
|
||||
className='customButton'
|
||||
icon='trash-alt'
|
||||
onClick={_removeApiEndpoint}
|
||||
/>
|
||||
)
|
||||
: (
|
||||
<Button
|
||||
className='customButton'
|
||||
icon='save'
|
||||
isDisabled={!isUrlValid || isKnownUrl}
|
||||
onClick={_saveApiEndpoint}
|
||||
/>
|
||||
)
|
||||
}
|
||||
</div>
|
||||
)}
|
||||
|
||||
@ -74,11 +74,13 @@ function BannerExtension (): React.ReactElement | null {
|
||||
</li>
|
||||
))
|
||||
}</ul>
|
||||
<p>{t<string>('Accounts injected from any of these extensions will appear in this application and be available for use. The above list is updated as more extensions with external signing capability become available.')} <a
|
||||
href='https://github.com/polkadot-js/extension'
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'
|
||||
>{t<string>('Learn more...')}</a></p>
|
||||
<p>{t<string>('Accounts injected from any of these extensions will appear in this application and be available for use. The above list is updated as more extensions with external signing capability become available.')}
|
||||
<a
|
||||
href='https://github.com/polkadot-js/extension'
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'
|
||||
>{t<string>('Learn more...')}</a>
|
||||
</p>
|
||||
<p>{phishing.current}</p>
|
||||
</Banner>
|
||||
);
|
||||
|
||||
@ -15,6 +15,10 @@ import { MemoryStore } from '@polkadot/test-support/keyring';
|
||||
import { WaitForApi } from '@polkadot/test-support/react';
|
||||
import { SUBSTRATE_PORT } from '@polkadot/test-support/substrate';
|
||||
|
||||
function noop (): void {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
const renderAccounts = () => {
|
||||
const memoryStore = new MemoryStore();
|
||||
|
||||
@ -27,9 +31,10 @@ const renderAccounts = () => {
|
||||
>
|
||||
<WaitForApi>
|
||||
<div>
|
||||
<AccountsApp basePath='/accounts'
|
||||
onStatusChange={() => { /* */
|
||||
}}/>
|
||||
<AccountsApp
|
||||
basePath='/accounts'
|
||||
onStatusChange={noop}
|
||||
/>
|
||||
</div>
|
||||
</WaitForApi>
|
||||
</Api>
|
||||
|
||||
@ -241,9 +241,10 @@ function Create ({ className = '', onClose, onStatusChange, seed: propsSeed, typ
|
||||
[]
|
||||
);
|
||||
|
||||
const _toggleMnemonicSaved = () => {
|
||||
setIsMnemonicSaved(!isMnemonicSaved);
|
||||
};
|
||||
const _toggleMnemonicSaved = useCallback(
|
||||
() => setIsMnemonicSaved(!isMnemonicSaved),
|
||||
[isMnemonicSaved]
|
||||
);
|
||||
|
||||
const _onCommit = useCallback(
|
||||
(): void => {
|
||||
|
||||
@ -29,18 +29,22 @@ function CreateConfirmation ({ address, derivePath, name, pairType, seed }: Prop
|
||||
|
||||
return (
|
||||
<Modal.Content>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('We will provide you with a generated backup file after your account is created. As long as you have access to your account you can always download this file later by clicking on "Backup" button from the Accounts section.')}</p>
|
||||
<p>{t<string>('Please make sure to save this file in a secure location as it is required, together with your password, to restore your account.')}</p>
|
||||
</>
|
||||
}>
|
||||
{address && name && <AddressRow
|
||||
defaultName={name}
|
||||
isInline
|
||||
noDefaultNameOpacity
|
||||
value={address}
|
||||
/>}
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('We will provide you with a generated backup file after your account is created. As long as you have access to your account you can always download this file later by clicking on "Backup" button from the Accounts section.')}</p>
|
||||
<p>{t<string>('Please make sure to save this file in a secure location as it is required, together with your password, to restore your account.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{address && name && (
|
||||
<AddressRow
|
||||
defaultName={name}
|
||||
isInline
|
||||
noDefaultNameOpacity
|
||||
value={address}
|
||||
/>
|
||||
)}
|
||||
{shortSeed && (
|
||||
<Static
|
||||
label={t<string>('partial seed')}
|
||||
|
||||
@ -52,12 +52,14 @@ function Delegate ({ onClose, previousAmount, previousConviction, previousDelega
|
||||
size='large'
|
||||
>
|
||||
<Modal.Content>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('Any democracy vote performed by the delegated account will result in an additional vote from the delegating account')}</p>
|
||||
<p>{t<string>('If the delegated account is currently voting in a referendum, the delegating vote and conviction will be added.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('Any democracy vote performed by the delegated account will result in an additional vote from the delegating account')}</p>
|
||||
<p>{t<string>('If the delegated account is currently voting in a referendum, the delegating vote and conviction will be added.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputAddress
|
||||
label={t<string>('delegating account')}
|
||||
onChange={setDelegatingAccount}
|
||||
|
||||
@ -88,12 +88,14 @@ function Multisig ({ className = '', onClose, onStatusChange }: Props): React.Re
|
||||
size='large'
|
||||
>
|
||||
<Modal.Content>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The signatories has the ability to create transactions using the multisig and approve transactions sent by others.Once the threshold is reached with approvals, the multisig transaction is enacted on-chain.')}</p>
|
||||
<p>{t<string>('Since the multisig function like any other account, once created it is available for selection anywhere accounts are used and needs to be funded before use.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The signatories has the ability to create transactions using the multisig and approve transactions sent by others.Once the threshold is reached with approvals, the multisig transaction is enacted on-chain.')}</p>
|
||||
<p>{t<string>('Since the multisig function like any other account, once created it is available for selection anywhere accounts are used and needs to be funded before use.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputAddressMulti
|
||||
available={availableSignatories}
|
||||
availableLabel={t<string>('available signatories')}
|
||||
|
||||
@ -46,12 +46,14 @@ export default function PasswordInput ({ onChange, onEnter }: Props): React.Reac
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The password and password confirmation for this account. This is required to authenticate any transactions made and to encrypt the keypair.')}</p>
|
||||
<p>{t<string>('Ensure you are using a strong password for proper account protection.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The password and password confirmation for this account. This is required to authenticate any transactions made and to encrypt the keypair.')}</p>
|
||||
<p>{t<string>('Ensure you are using a strong password for proper account protection.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<Password
|
||||
className='full'
|
||||
help={t<string>('This password is used to encrypt your private key. It must be strong and unique! You will need it to sign transactions with this account. You can recover this account using this password together with the backup file (generated in the next step).')}
|
||||
|
||||
@ -47,12 +47,14 @@ function RecoverSetup ({ address, className = '', onClose }: Props): React.React
|
||||
value={address}
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('These are trusted individuals that can verify and approve any recovery actions. With recovery, once the threshold is reached, the funds associated with the account can be moved to a new destination.')}</p>
|
||||
<p>{t<string>('The helpers should be able to verify, via an off-chain mechanism, that the account owner indeed wishes to recover access and as such provide any approvals. In the cases of malicious recovery procedures, they will have the power to stop it.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('These are trusted individuals that can verify and approve any recovery actions. With recovery, once the threshold is reached, the funds associated with the account can be moved to a new destination.')}</p>
|
||||
<p>{t<string>('The helpers should be able to verify, via an off-chain mechanism, that the account owner indeed wishes to recover access and as such provide any approvals. In the cases of malicious recovery procedures, they will have the power to stop it.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputAddressMulti
|
||||
available={availableHelpers}
|
||||
availableLabel={t<string>('available social recovery helpers')}
|
||||
|
||||
@ -141,8 +141,10 @@ function Bounty ({ bestNumber, bounty, className = '', description, index, isEve
|
||||
proposals={proposals}
|
||||
status={status}
|
||||
/>
|
||||
<div className='table-column-icon'
|
||||
onClick={handleOnIconClick}>
|
||||
<div
|
||||
className='table-column-icon'
|
||||
onClick={handleOnIconClick}
|
||||
>
|
||||
<Icon icon={
|
||||
isExpanded
|
||||
? 'caret-up'
|
||||
|
||||
@ -26,7 +26,6 @@ interface Props {
|
||||
|
||||
export function BountyActions ({ bestNumber, description, fee, index, proposals, status, value }: Props): JSX.Element {
|
||||
const { beneficiary, curator, unlockAt } = useBountyStatus(status);
|
||||
|
||||
const blocksUntilPayout = useMemo(() => unlockAt?.sub(bestNumber), [bestNumber, unlockAt]);
|
||||
|
||||
return (
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/app-bounties authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React, { useMemo, useRef, useState } from 'react';
|
||||
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
||||
|
||||
import { DeriveCollectiveProposal } from '@polkadot/api-derive/types';
|
||||
import { Button, Menu, Popup } from '@polkadot/react-components';
|
||||
@ -61,10 +61,14 @@ function Index ({ bestNumber, className, description, index, proposals, status }
|
||||
|
||||
const hasNoItems = !(showCloseBounty || showRejectCurator || showExtendExpiry || showSlashCurator || showGiveUpCurator);
|
||||
|
||||
function slashCuratorClicked (action: ValidUnassignCuratorAction) {
|
||||
setSlashAction(action);
|
||||
toggleSlashCurator();
|
||||
}
|
||||
const slashCurator = useCallback(
|
||||
(actionName: ValidUnassignCuratorAction) =>
|
||||
(): void => {
|
||||
setSlashAction(actionName);
|
||||
toggleSlashCurator();
|
||||
},
|
||||
[toggleSlashCurator]
|
||||
);
|
||||
|
||||
return !hasNoItems
|
||||
? (
|
||||
@ -161,7 +165,7 @@ function Index ({ bestNumber, className, description, index, proposals, status }
|
||||
{showSlashCurator && availableSlashActions.map((actionName) =>
|
||||
<Menu.Item
|
||||
key={actionName}
|
||||
onClick={() => slashCuratorClicked(actionName)}
|
||||
onClick={slashCurator(actionName)}
|
||||
>
|
||||
{slashCuratorActionNames.current[actionName]}
|
||||
</Menu.Item>
|
||||
|
||||
@ -14,8 +14,10 @@ function VotingLink ({ className }: Props): React.ReactElement<Props> {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<a className={className}
|
||||
href='#/council/motions'>
|
||||
<a
|
||||
className={className}
|
||||
href='#/council/motions'
|
||||
>
|
||||
{t<string>('Voting')}
|
||||
</a>
|
||||
);
|
||||
|
||||
@ -14,7 +14,8 @@ function Description ({ className = '', dataTestId = '', description }: Props):
|
||||
return (
|
||||
<div
|
||||
className={className}
|
||||
data-testid={dataTestId}>
|
||||
data-testid={dataTestId}
|
||||
>
|
||||
{description}
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -48,19 +48,20 @@ function Day ({ className, date, hasNextDay, now, scheduled, setNextDay, setPrev
|
||||
[date, now]
|
||||
);
|
||||
|
||||
const viewSetter = useCallback(() => (
|
||||
<Button
|
||||
className='all-events-button'
|
||||
icon={'list'}
|
||||
onClick={() => setView(true)}
|
||||
/>
|
||||
), [setView]);
|
||||
const _setView = useCallback(
|
||||
(): void => setView(true),
|
||||
[setView]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<h1>
|
||||
<div>
|
||||
{viewSetter()}
|
||||
<Button
|
||||
className='all-events-button'
|
||||
icon={'list'}
|
||||
onClick={_setView}
|
||||
/>
|
||||
{date.getDate()} {monthRef.current[date.getMonth()]} {date.getFullYear()} {isToday && <DayTime />}
|
||||
</div>
|
||||
<Button.Group>
|
||||
|
||||
@ -22,19 +22,20 @@ function UpcomingEvents ({ className, scheduled, setView }: Props): React.ReactE
|
||||
[scheduled]
|
||||
);
|
||||
|
||||
const viewSetter = useCallback(() => (
|
||||
<Button
|
||||
className='all-events-button'
|
||||
icon={'calendar'}
|
||||
onClick={() => setView(false)}
|
||||
/>
|
||||
), [setView]);
|
||||
const _setView = useCallback(
|
||||
(): void => setView(false),
|
||||
[setView]
|
||||
);
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<h1>
|
||||
<div>
|
||||
{viewSetter()}
|
||||
<Button
|
||||
className='all-events-button'
|
||||
icon='calendar'
|
||||
onClick={_setView}
|
||||
/>
|
||||
Upcoming Events
|
||||
</div>
|
||||
</h1>
|
||||
@ -42,7 +43,7 @@ function UpcomingEvents ({ className, scheduled, setView }: Props): React.ReactE
|
||||
{sched.map((item, index): React.ReactNode => {
|
||||
return (
|
||||
<DayItem
|
||||
className={'all-events-rows'}
|
||||
className='all-events-rows'
|
||||
item={item}
|
||||
key={index}
|
||||
showAllEvents
|
||||
|
||||
@ -84,8 +84,12 @@ function Attest ({ accountId, className, ethereumAddress, onSuccess, statementKi
|
||||
kind={statementKind}
|
||||
systemChain={systemChain}
|
||||
/>
|
||||
<h3><FormatBalance label={t<string>('Account balance:')}
|
||||
value={claimValue} /></h3>
|
||||
<h3>
|
||||
<FormatBalance
|
||||
label={t<string>('Account balance:')}
|
||||
value={claimValue}
|
||||
/>
|
||||
</h3>
|
||||
<Button.Group>
|
||||
<TxButton
|
||||
accountId={accountId}
|
||||
|
||||
@ -42,10 +42,12 @@ function Statement ({ className, kind, systemChain }: Props): React.ReactElement
|
||||
return (
|
||||
<div className={className}>
|
||||
{t('Please read these terms and conditions carefully. By submitting this statement, you are deemed to have accepted these Terms and Conditions. If you do not agree to these terms, please refrain from accessing or proceeding. You can also find them at:')}
|
||||
<a className='statementUrl'
|
||||
<a
|
||||
className='statementUrl'
|
||||
href={statementUrl}
|
||||
rel='noopener noreferrer'
|
||||
target='_blank'>{statementUrl}</a>
|
||||
target='_blank'
|
||||
>{statementUrl}</a>
|
||||
<div className='statement'>
|
||||
<StatementFullText
|
||||
statementUrl={statementUrl}
|
||||
|
||||
@ -298,21 +298,25 @@ function ClaimsApp ({ basePath }: Props): React.ReactElement<Props> {
|
||||
<Columar.Column>
|
||||
{(step >= Step.Claim) && (
|
||||
isPreclaimed
|
||||
? <AttestDisplay
|
||||
accountId={accountId}
|
||||
ethereumAddress={ethereumAddress}
|
||||
onSuccess={goToStepAccount}
|
||||
statementKind={statementKind}
|
||||
systemChain={systemChain}
|
||||
/>
|
||||
: <ClaimDisplay
|
||||
accountId={accountId}
|
||||
ethereumAddress={ethereumAddress}
|
||||
ethereumSignature={signature}
|
||||
isOldClaimProcess={isOldClaimProcess}
|
||||
onSuccess={goToStepAccount}
|
||||
statementKind={statementKind}
|
||||
/>
|
||||
? (
|
||||
<AttestDisplay
|
||||
accountId={accountId}
|
||||
ethereumAddress={ethereumAddress}
|
||||
onSuccess={goToStepAccount}
|
||||
statementKind={statementKind}
|
||||
systemChain={systemChain}
|
||||
/>
|
||||
)
|
||||
: (
|
||||
<ClaimDisplay
|
||||
accountId={accountId}
|
||||
ethereumAddress={ethereumAddress}
|
||||
ethereumSignature={signature}
|
||||
isOldClaimProcess={isOldClaimProcess}
|
||||
onSuccess={goToStepAccount}
|
||||
statementKind={statementKind}
|
||||
/>
|
||||
)
|
||||
)}
|
||||
</Columar.Column>
|
||||
</Columar>
|
||||
|
||||
@ -6,6 +6,6 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/api-contract": "^5.6.2-4"
|
||||
"@polkadot/api-contract": "^5.6.2-7"
|
||||
}
|
||||
}
|
||||
|
||||
@ -99,12 +99,14 @@ function Vote ({ electionsInfo }: Props): React.ReactElement<Props> | null {
|
||||
onChange={setVoteValue}
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The votes for the members, runner-ups and candidates. These should be ordered based on your priority.')}</p>
|
||||
<p>{t<string>('In calculating the election outcome, this prioritized vote ordering will be used to determine the final score for the candidates.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The votes for the members, runner-ups and candidates. These should be ordered based on your priority.')}</p>
|
||||
<p>{t<string>('In calculating the election outcome, this prioritized vote ordering will be used to determine the final score for the candidates.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputAddressMulti
|
||||
available={available}
|
||||
availableLabel={t<string>('council candidates')}
|
||||
|
||||
@ -80,7 +80,8 @@ function PreImage ({ className = '', imageHash, isImminent = false, onClose }: P
|
||||
<p>{t<string>('The image (proposal) will be stored on-chain against the hash of the contents.')}</p>
|
||||
<p>{t<string>('When submitting a proposal the hash needs to be known. Proposals can be submitted with hash-only, but upon dispatch the preimage needs to be available.')}</p>
|
||||
</>
|
||||
}>
|
||||
}
|
||||
>
|
||||
<Extrinsic
|
||||
defaultValue={apiDefaultTxSudo}
|
||||
label={t<string>('propose')}
|
||||
|
||||
@ -54,12 +54,14 @@ function Voting ({ proposal, referendumId }: Props): React.ReactElement<Props> |
|
||||
<Modal.Columns hint={t<string>('The vote will be recorded for this account. If another account delegated to this one, the delegated votes will also be counted.')}>
|
||||
<VoteAccount onChange={setAccountId} />
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The balance associated with the vote will be locked as per the conviction specified and will not be available for transfer during this period.')}</p>
|
||||
<p>{t<string>('Conviction locks do overlap and is additive, meaning that funds locked during a previous vote can be locked again.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The balance associated with the vote will be locked as per the conviction specified and will not be available for transfer during this period.')}</p>
|
||||
<p>{t<string>('Conviction locks do overlap and is additive, meaning that funds locked during a previous vote can be locked again.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{isCurrentVote && (
|
||||
<VoteValue
|
||||
accountId={accountId}
|
||||
|
||||
@ -104,7 +104,8 @@ function Bid ({ auctionInfo, className, lastWinners, ownedIds }: Props): React.R
|
||||
<p>{t<string>('The amount to to bid for this parachain lease period range.')}</p>
|
||||
<p>{t<string>('The bid should be more than the current range winner to be accepted and influence the auction outcome.')}</p>
|
||||
</>
|
||||
}>
|
||||
}
|
||||
>
|
||||
<InputBalance
|
||||
autoFocus
|
||||
isError={isAmountError}
|
||||
|
||||
@ -111,9 +111,7 @@ function Fund ({ bestHash, bestNumber, className, isOdd, isOngoing, leasePeriod,
|
||||
<FormatBalance
|
||||
value={raised}
|
||||
withCurrency={false}
|
||||
/> / <FormatBalance
|
||||
value={cap}
|
||||
/>
|
||||
/> / <FormatBalance value={cap} />
|
||||
<div>{percentage}</div>
|
||||
{myAccounts.length !== 0 && (
|
||||
<Expander
|
||||
|
||||
@ -77,12 +77,14 @@ function FundAdd ({ auctionInfo, bestNumber, className, leasePeriod, ownedIds }:
|
||||
onChange={setEndBlock}
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The first and last lease periods for this funding campaign.')}</p>
|
||||
<p>{t<string>('The ending lease period should be after the first and a maximum of {{maxPeriods}} periods more than the first', { replace: { maxPeriods } })}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The first and last lease periods for this funding campaign.')}</p>
|
||||
<p>{t<string>('The ending lease period should be after the first and a maximum of {{maxPeriods}} periods more than the first', { replace: { maxPeriods } })}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputNumber
|
||||
defaultValue={defaultSlot}
|
||||
isError={isFirstError}
|
||||
|
||||
@ -55,7 +55,8 @@ function InputOwner ({ noCodeCheck, onChange, ownedIds }: Props): React.ReactEle
|
||||
<p>{t<string>('This account that has been used to register the parachain. This will pay all associated fees.')}</p>
|
||||
<p>{t<string>('The parachain id is associated with the selected account via parathread registration.')}</p>
|
||||
</>
|
||||
}>
|
||||
}
|
||||
>
|
||||
<InputAddress
|
||||
filter={owners}
|
||||
label={t<string>('parachain owner')}
|
||||
|
||||
@ -124,12 +124,14 @@ function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
|
||||
type='allPlus'
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('If the recipient account is new, the balance needs to be more than the existential deposit on the recipient chain.')}</p>
|
||||
<p>{t<string>('The amount deposited to the recipient will be net the calculated cross-chain fee.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('If the recipient account is new, the balance needs to be more than the existential deposit on the recipient chain.')}</p>
|
||||
<p>{t<string>('The amount deposited to the recipient will be net the calculated cross-chain fee.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputBalance
|
||||
autoFocus
|
||||
isError={!hasAvailable}
|
||||
|
||||
@ -79,8 +79,14 @@ function NetworkSpecs ({ chainInfo, className }: Props): React.ReactElement<Prop
|
||||
(color: string): void => setNetworkSpecs({ color }),
|
||||
[]
|
||||
);
|
||||
|
||||
const _onSetRandomColor = useCallback(
|
||||
(): void => setNetworkSpecs({ color: getRandomColor() }),
|
||||
(event: React.MouseEvent<unknown>): void => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
setNetworkSpecs({ color: getRandomColor() });
|
||||
},
|
||||
[]
|
||||
);
|
||||
const _checkColorValid = useCallback(
|
||||
@ -137,18 +143,17 @@ function NetworkSpecs ({ chainInfo, className }: Props): React.ReactElement<Prop
|
||||
onChange={_onChangeColor}
|
||||
value={networkSpecs.color}
|
||||
/>
|
||||
<a className='settings--networkSpecs-colorChangeButton'
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
_onSetRandomColor();
|
||||
}}>
|
||||
<a
|
||||
className='settings--networkSpecs-colorChangeButton'
|
||||
onClick={_onSetRandomColor}
|
||||
>
|
||||
generate random color
|
||||
</a>
|
||||
</div>
|
||||
<ChainColorIndicator
|
||||
className='settings--networkSpecs-colorBar'
|
||||
color={networkSpecs.color} />
|
||||
color={networkSpecs.color}
|
||||
/>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@ -97,12 +97,14 @@ function Bond ({ className = '', isNominating, minNominated, minNominatorBond, m
|
||||
|
||||
return (
|
||||
<div className={className}>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('Think of the stash as your cold wallet and the controller as your hot wallet. Funding operations are controlled by the stash, any other non-funding actions by the controller itself.')}</p>
|
||||
<p>{t<string>('To ensure optimal fund security using the same stash/controller is strongly discouraged, but not forbidden.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('Think of the stash as your cold wallet and the controller as your hot wallet. Funding operations are controlled by the stash, any other non-funding actions by the controller itself.')}</p>
|
||||
<p>{t<string>('To ensure optimal fund security using the same stash/controller is strongly discouraged, but not forbidden.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputAddress
|
||||
label={t<string>('stash account')}
|
||||
onChange={setStashId}
|
||||
@ -123,12 +125,14 @@ function Bond ({ className = '', isNominating, minNominated, minNominatorBond, m
|
||||
/>
|
||||
</Modal.Columns>
|
||||
{startBalance && (
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The amount placed at-stake should not be your full available available amount to allow for transaction fees.')}</p>
|
||||
<p>{t<string>('Once bonded, it will need to be unlocked/withdrawn and will be locked for at least the bonding duration.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The amount placed at-stake should not be your full available available amount to allow for transaction fees.')}</p>
|
||||
<p>{t<string>('Once bonded, it will need to be unlocked/withdrawn and will be locked for at least the bonding duration.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputBalance
|
||||
autoFocus
|
||||
defaultValue={startBalance}
|
||||
|
||||
@ -66,12 +66,14 @@ function Nominate ({ className = '', controllerId, nominating, onChange, stashId
|
||||
stashId={stashId}
|
||||
/>
|
||||
)}
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('Nominators can be selected manually from the list of all currently available validators.')}</p>
|
||||
<p>{t<string>('Once transmitted the new selection will only take effect in 2 eras taking the new validator election cycle into account. Until then, the nominations will show as inactive.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('Nominators can be selected manually from the list of all currently available validators.')}</p>
|
||||
<p>{t<string>('Once transmitted the new selection will only take effect in 2 eras taking the new validator election cycle into account. Until then, the nominations will show as inactive.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputAddressMulti
|
||||
available={available}
|
||||
availableLabel={t<string>('candidate accounts')}
|
||||
|
||||
@ -88,12 +88,14 @@ function PayButton ({ className, isAll, isDisabled, payout }: Props): React.Reac
|
||||
value={accountId}
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('All the listed validators and all their nominators will receive their rewards.')}</p>
|
||||
<p>{t<string>('The UI puts a limit of 40 payouts at a time, where each payout is a single validator for a single era.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('All the listed validators and all their nominators will receive their rewards.')}</p>
|
||||
<p>{t<string>('The UI puts a limit of 40 payouts at a time, where each payout is a single validator for a single era.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
{Array.isArray(payout)
|
||||
? (
|
||||
<Static
|
||||
|
||||
@ -77,12 +77,14 @@ function Nominate ({ className = '', isDisabled, ownNominators, targets }: Props
|
||||
value={ids?.controllerId}
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The selected validators to nominate, either via the "currently best algorithm" or via a manual selection.')}</p>
|
||||
<p>{t<string>('Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.')}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The selected validators to nominate, either via the "currently best algorithm" or via a manual selection.')}</p>
|
||||
<p>{t<string>('Once transmitted the new selection will only take effect in 2 eras since the selection criteria for the next era was done at the end of the previous era. Until then, the nominations will show as inactive.')}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<Static
|
||||
label={t<string>('selected validators')}
|
||||
value={
|
||||
|
||||
@ -56,12 +56,14 @@ function Propose ({ className }: Props): React.ReactElement<Props> | null {
|
||||
type='allPlus'
|
||||
/>
|
||||
</Modal.Columns>
|
||||
<Modal.Columns hint={
|
||||
<>
|
||||
<p>{t<string>('The value is the amount that is being asked for and that will be allocated to the beneficiary if the proposal is approved.')}</p>
|
||||
<p>{t<string>('Of the beneficiary amount, at least {{bondPercentage}} would need to be put up as collateral. The maximum of this and the minimum bond will be used to secure the proposal, refundable if it passes.', { replace: { bondPercentage } })}</p>
|
||||
</>
|
||||
}>
|
||||
<Modal.Columns
|
||||
hint={
|
||||
<>
|
||||
<p>{t<string>('The value is the amount that is being asked for and that will be allocated to the beneficiary if the proposal is approved.')}</p>
|
||||
<p>{t<string>('Of the beneficiary amount, at least {{bondPercentage}} would need to be put up as collateral. The maximum of this and the minimum bond will be used to secure the proposal, refundable if it passes.', { replace: { bondPercentage } })}</p>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<InputBalance
|
||||
help={t<string>('The amount that will be allocated from the treasury pot')}
|
||||
isError={!hasValue}
|
||||
|
||||
@ -125,7 +125,8 @@ function Tip ({ bestNumber, className = '', defaultId, hash, isMember, members,
|
||||
<div>{t<string>('Tippers ({{count}})', { replace: { count: tips.length } })}</div>
|
||||
<FormatBalance value={median} />
|
||||
</>
|
||||
}>
|
||||
}
|
||||
>
|
||||
{tips.map(([tipper, balance]) => (
|
||||
<AddressMini
|
||||
balance={balance}
|
||||
|
||||
@ -6,8 +6,8 @@
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.15.3",
|
||||
"@polkadot/api": "^5.6.2-4",
|
||||
"@polkadot/extension-dapp": "^0.39.4-3",
|
||||
"@polkadot/api": "^5.6.2-7",
|
||||
"@polkadot/extension-dapp": "^0.39.4-4",
|
||||
"@substrate/connect": "^0.3.18",
|
||||
"fflate": "^0.7.1",
|
||||
"rxjs": "^7.3.0"
|
||||
|
||||
@ -9,15 +9,15 @@
|
||||
"@fortawesome/fontawesome-svg-core": "^1.2.36",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.15.4",
|
||||
"@fortawesome/react-fontawesome": "^0.1.15",
|
||||
"@polkadot/keyring": "^7.2.1",
|
||||
"@polkadot/keyring": "^7.2.2-7",
|
||||
"@polkadot/react-api": "^0.95.2-41",
|
||||
"@polkadot/react-identicon": "^0.85.2-0",
|
||||
"@polkadot/react-qr": "^0.85.2-0",
|
||||
"@polkadot/react-identicon": "^0.85.2-1",
|
||||
"@polkadot/react-qr": "^0.85.2-1",
|
||||
"@polkadot/react-query": "^0.95.2-41",
|
||||
"@polkadot/ui-keyring": "^0.85.2-0",
|
||||
"@polkadot/ui-settings": "^0.85.2-0",
|
||||
"@polkadot/util": "^7.2.1",
|
||||
"@polkadot/util-crypto": "^7.2.1",
|
||||
"@polkadot/ui-keyring": "^0.85.2-1",
|
||||
"@polkadot/ui-settings": "^0.85.2-1",
|
||||
"@polkadot/util": "^7.2.2-7",
|
||||
"@polkadot/util-crypto": "^7.2.2-7",
|
||||
"chart.js": "^2.9.4",
|
||||
"codeflask": "^1.4.1",
|
||||
"i18next": "^19.9.2",
|
||||
@ -26,7 +26,7 @@
|
||||
"react": "^17.0.2",
|
||||
"react-beautiful-dnd": "^13.1.0",
|
||||
"react-chartjs-2": "^2.11.2",
|
||||
"react-copy-to-clipboard": "^5.0.3",
|
||||
"react-copy-to-clipboard": "^5.0.4",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-dropzone": "^11.3.4",
|
||||
"react-i18next": "^11.11.4",
|
||||
|
||||
@ -384,12 +384,14 @@ function createBalanceItems (formatIndex: number, lookup: Record<string, string>
|
||||
if (withBalanceToggle) {
|
||||
return (
|
||||
<React.Fragment key={formatIndex}>
|
||||
<Expander summary={
|
||||
<FormatBalance
|
||||
formatIndex={formatIndex}
|
||||
value={balancesAll && balancesAll.freeBalance.add(balancesAll.reservedBalance)}
|
||||
/>
|
||||
}>
|
||||
<Expander
|
||||
summary={
|
||||
<FormatBalance
|
||||
formatIndex={formatIndex}
|
||||
value={balancesAll && balancesAll.freeBalance.add(balancesAll.reservedBalance)}
|
||||
/>
|
||||
}
|
||||
>
|
||||
{allItems.length !== 0 && (
|
||||
<div className='body column'>
|
||||
{allItems}
|
||||
|
||||
@ -57,8 +57,10 @@ function CardSummary ({ children, className = '', help, label, progress }: Props
|
||||
const testidSuffix = (label ?? '').toString();
|
||||
|
||||
return (
|
||||
<article className={className}
|
||||
data-testid={`card-summary:${testidSuffix}`}>
|
||||
<article
|
||||
className={className}
|
||||
data-testid={`card-summary:${testidSuffix}`}
|
||||
>
|
||||
<Labelled
|
||||
help={help}
|
||||
isSmall
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2021 @polkadot/react-components authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import React from 'react';
|
||||
import React, { useCallback } from 'react';
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { useToggle } from '@polkadot/react-hooks';
|
||||
@ -171,10 +171,10 @@ function Row ({ address, buttons, children, className = '', defaultName, details
|
||||
const [isEditingName, toggleIsEditingName] = useToggle();
|
||||
const [isEditingTags, toggleIsEditingTags] = useToggle();
|
||||
|
||||
const _onSaveName = (): void => {
|
||||
const _onSaveName = useCallback((): void => {
|
||||
onSaveName && onSaveName();
|
||||
toggleIsEditingName();
|
||||
};
|
||||
}, [onSaveName, toggleIsEditingName]);
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
@ -275,15 +275,17 @@ function Queue ({ children }: Props): React.ReactElement<Props> {
|
||||
);
|
||||
|
||||
return (
|
||||
<QueueProvider value={{
|
||||
queueAction,
|
||||
queueExtrinsic,
|
||||
queuePayload,
|
||||
queueRpc,
|
||||
queueSetTxStatus,
|
||||
stqueue,
|
||||
txqueue
|
||||
}}>
|
||||
<QueueProvider
|
||||
value={{
|
||||
queueAction,
|
||||
queueExtrinsic,
|
||||
queuePayload,
|
||||
queueRpc,
|
||||
queueSetTxStatus,
|
||||
stqueue,
|
||||
txqueue
|
||||
}}
|
||||
>
|
||||
{children}
|
||||
</QueueProvider>
|
||||
);
|
||||
|
||||
@ -11,15 +11,18 @@ interface TabsSectionDelimiterProps {
|
||||
function TabsSectionDelimiter ({ className = '' }: TabsSectionDelimiterProps): React.ReactElement {
|
||||
return (
|
||||
<div className={className}>
|
||||
<svg fill='none'
|
||||
<svg
|
||||
fill='none'
|
||||
height='47'
|
||||
viewBox='0 0 17 65'
|
||||
width='17'
|
||||
xmlns='http://www.w3.org/2000/svg'>
|
||||
xmlns='http://www.w3.org/2000/svg'
|
||||
>
|
||||
<path
|
||||
className='highlight--stroke'
|
||||
d='M1 1L16 32.5L1 64'
|
||||
stroke='#D1D1D1'/>
|
||||
stroke='#D1D1D1'
|
||||
/>
|
||||
</svg>
|
||||
</div>
|
||||
);
|
||||
|
||||
@ -64,8 +64,10 @@ function Tags ({ children, className = '', isEditable, isEditing, onChange, onSa
|
||||
)
|
||||
: isEditable
|
||||
? (
|
||||
<EditButton className={value.length === 0 ? 'center' : 'left'}
|
||||
onClick={onToggleIsEditing}>
|
||||
<EditButton
|
||||
className={value.length === 0 ? 'center' : 'left'}
|
||||
onClick={onToggleIsEditing}
|
||||
>
|
||||
{contents}
|
||||
</EditButton>
|
||||
)
|
||||
|
||||
@ -87,7 +87,8 @@ function FormatBalance ({ children, className = '', format, formatIndex, isShort
|
||||
{label ? <>{label} </> : ''}
|
||||
<span
|
||||
className='ui--FormatBalance-value'
|
||||
data-testid='balance-summary'>{
|
||||
data-testid='balance-summary'
|
||||
>{
|
||||
valueFormatted
|
||||
? splitFormat(valueFormatted, labelPost, isShort)
|
||||
: value
|
||||
|
||||
@ -9,8 +9,8 @@
|
||||
"testcontainers": "^7.19.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types-support": "^5.6.2-4",
|
||||
"@polkadot/types-support": "^5.6.2-7",
|
||||
"@testing-library/jest-dom": "^5.14.1",
|
||||
"tsconfig-paths": "^3.10.1"
|
||||
"tsconfig-paths": "^3.11.0"
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user