* Add subs modal * Add tests * Add Translations * Improve closing modal * Improve tests * Improve styles * Style balances & identity * Optimize imports * Improve styles * Set greater width to balance section * Rename subs modal toggle * Change 'amount' to 'count' in test name * Set make modal header fixed while content is scrollable * Style multisig * Update multisig styles * Capitalize headers * Move sidebar tests to Sidebar.spec.tsx * Remove duplications in tests * Add UserIcon component * Revert subs modal changes and add scrollable section in Sidebar * Remove unused styles * Use accountsPage clearAccount method * Wrap subs into Expander * Add useSubidentities hook * Adjust api mock in tests * WIP - split judgements * Display judgements * Handle no judgements case * [WIP] Add popup test * Extract JudgmentTag component * Add popup test * Refactor tests and remove pointer from no judgements tag * Extract JudgementTag test class * Close popup on scroll * Remove old section * Clean registration * Clean up identity in useAccountInfo and mock in Page * Remove fragment tag * Fix imports * Move SortedJudgements to /types * Move Registrar interface to types * Refactor clickRegistrar fcn * Move hasAccount check to isRegistrar * Add useJudgements hook * Rename and move getJudgementColor to utils * Fix import and casting in tests * Sort imports * Add review fixes * Fix tests Co-authored-by: Krzysztof Jelski <krzysztof@ethworks.io> Co-authored-by: Ewa Kowalska <ewcia.kowalska@gmail.com> Co-authored-by: Jaco Greeff <jacogr@gmail.com>
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
// Copyright 2017-2021 @polkadot/test-supports authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { Registrar } from '@polkadot/react-hooks/types';
|
|
|
|
import registry from '@polkadot/react-api/typeRegistry';
|
|
|
|
import { bob, charlie, ferdie } from '../keyring';
|
|
|
|
export const mockRegistration = {
|
|
judgements: [
|
|
[
|
|
registry.createType('RegistrarIndex', '0'),
|
|
{
|
|
isReasonable: true
|
|
}
|
|
],
|
|
[
|
|
registry.createType('RegistrarIndex', '1'),
|
|
{
|
|
isKnownGood: true
|
|
}
|
|
],
|
|
[
|
|
registry.createType('RegistrarIndex', '2'),
|
|
{
|
|
isErroneous: true
|
|
}
|
|
],
|
|
[
|
|
registry.createType('RegistrarIndex', '3'),
|
|
{
|
|
isReasonable: true
|
|
}
|
|
]
|
|
]
|
|
};
|
|
|
|
export const bobRegistrar: Registrar = { address: bob, index: 0 };
|
|
export const charlieRegistrar: Registrar = { address: charlie, index: 1 };
|
|
export const ferdieRegistrar: Registrar = { address: ferdie, index: 3 };
|
|
|
|
export const registrars: Registrar[] = [bobRegistrar, charlieRegistrar, ferdieRegistrar];
|
|
|
|
export const bobShortAddress = '5FHneW…M694ty';
|
|
export const charlieShortAddress = '5DAAnr…3PTXFy';
|
|
export const ferdieShortAddress = '5CiPPs…SK2DjL';
|