mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-05-06 12:37:56 +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
53 lines
1.3 KiB
TypeScript
53 lines
1.3 KiB
TypeScript
// Copyright 2017-2025 @pezkuwi/app-staking authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { SessionInfo } from '../partials/types.js';
|
|
|
|
import React, { useState } from 'react';
|
|
|
|
import { Modal, TxButton } from '@pezkuwi/react-components';
|
|
|
|
import { useTranslation } from '../../translate.js';
|
|
import SessionKeyPartital from '../partials/SessionKey.js';
|
|
|
|
interface Props {
|
|
controllerId: string;
|
|
onClose: () => void;
|
|
stashId: string;
|
|
}
|
|
|
|
function SetSessionKey ({ controllerId, onClose, stashId }: Props): React.ReactElement<Props> | null {
|
|
const { t } = useTranslation();
|
|
const [{ sessionTx }, setTx] = useState<SessionInfo>({});
|
|
|
|
return (
|
|
<Modal
|
|
header={t('Set Session Key')}
|
|
onClose={onClose}
|
|
size='large'
|
|
>
|
|
<Modal.Content>
|
|
<SessionKeyPartital
|
|
controllerId={controllerId}
|
|
onChange={setTx}
|
|
stashId={stashId}
|
|
withFocus
|
|
withSenders
|
|
/>
|
|
</Modal.Content>
|
|
<Modal.Actions>
|
|
<TxButton
|
|
accountId={controllerId}
|
|
extrinsic={sessionTx}
|
|
icon='sign-in-alt'
|
|
isDisabled={!sessionTx}
|
|
label={t('Set Session Key')}
|
|
onStart={onClose}
|
|
/>
|
|
</Modal.Actions>
|
|
</Modal>
|
|
);
|
|
}
|
|
|
|
export default React.memo(SetSessionKey);
|