mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-07-22 12:35:43 +00:00
d21bfb1320
Rebranded terminology: - Polkadot → Pezkuwi - Kusama → Dicle - Westend → Zagros - Rococo → PezkuwiChain - Substrate → Bizinikiwi - parachain → teyrchain Custom logos with Kurdistan brand colors (#e6007a → #86e62a): - bizinikiwi-hexagon.svg - sora-bizinikiwi.svg - hezscanner.svg - heztreasury.svg - pezkuwiscan.svg - pezkuwistats.svg - pezkuwiassembly.svg - pezkuwiholic.svg
68 lines
2.0 KiB
TypeScript
68 lines
2.0 KiB
TypeScript
// Copyright 2017-2025 @pezkuwi/app-accounts authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { KeypairType } from '@pezkuwi/util-crypto/types';
|
|
|
|
import React from 'react';
|
|
|
|
import { AddressRow, Modal, Static } from '@pezkuwi/react-components';
|
|
import { isHex } from '@pezkuwi/util';
|
|
|
|
import { useTranslation } from '../translate.js';
|
|
|
|
interface Props {
|
|
address?: string;
|
|
derivePath: string;
|
|
isBusy: boolean;
|
|
name?: string;
|
|
pairType: KeypairType;
|
|
seed?: string;
|
|
}
|
|
|
|
function CreateConfirmation ({ address, derivePath, name, pairType, seed }: Props): React.ReactElement<Props> | null {
|
|
const { t } = useTranslation();
|
|
|
|
const splitSeed = seed?.split(' ');
|
|
const shortSeed = isHex(seed)
|
|
? `${seed.slice(10)} … ${seed.slice(-8)}`
|
|
: splitSeed?.map((value, index) => (index % 3) ? '…' : value).join(' ');
|
|
|
|
return (
|
|
<Modal.Content>
|
|
<Modal.Columns
|
|
hint={
|
|
<>
|
|
<p>{t('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('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('partial seed')}
|
|
value={shortSeed}
|
|
/>
|
|
)}
|
|
<Static
|
|
label={t('keypair type')}
|
|
value={pairType}
|
|
/>
|
|
<Static
|
|
label={t('derivation path')}
|
|
value={derivePath || t('<none provided>')}
|
|
/>
|
|
</Modal.Columns>
|
|
</Modal.Content>
|
|
);
|
|
}
|
|
|
|
export default React.memo(CreateConfirmation);
|