mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-07-28 16:15:42 +00:00
971df8edba
- Remove all 3rd party parachain configurations from endpoints: - productionRelayPolkadot.ts: Keep only system parachains - productionRelayDicle.ts: Keep only system parachains - testingRelayZagros.ts: Keep only system parachains - testingRelayTeyrChain.ts: Keep only system parachains - Update domain references: - polkadot.js.org → pezkuwichain.app - wiki.polkadot.network → wiki.pezkuwichain.io - dotapps.io → pezkuwichain.app - statement.polkadot.network → docs.pezkuwichain.io/statement - support.polkadot.network → docs.pezkuwichain.io - Update repository references: - github.com/pezkuwi-js/apps → github.com/pezkuwichain/pwap - Rename system parachains to Pezkuwi ecosystem: - PolkadotAssetHub → PezkuwiAssetHub - polkadotBridgeHub → pezkuwiBridgeHub - polkadotCollectives → pezkuwiCollectives - polkadotCoretime → pezkuwiCoretime - polkadotPeople → pezkuwiPeople - Update network name in claims utility: - Polkadot → Pezkuwi
63 lines
1.7 KiB
TypeScript
63 lines
1.7 KiB
TypeScript
// Copyright 2017-2026 @pezkuwi/react-signer authors & contributors
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
import type { QueueTx } from '@pezkuwi/react-components/Status/types';
|
|
import type { BN } from '@pezkuwi/util';
|
|
import type { ExtendedSignerOptions } from './types.js';
|
|
|
|
import React from 'react';
|
|
|
|
import { Modal, styled } from '@pezkuwi/react-components';
|
|
import { CallExpander } from '@pezkuwi/react-params';
|
|
|
|
import PaymentInfo from './PaymentInfo.js';
|
|
import { useTranslation } from './translate.js';
|
|
|
|
interface Props {
|
|
accountId?: string | null;
|
|
className?: string;
|
|
currentItem: QueueTx;
|
|
onError: () => void;
|
|
tip?: BN;
|
|
signerOptions?: ExtendedSignerOptions;
|
|
}
|
|
|
|
function Transaction ({ accountId, className, currentItem: { extrinsic, isUnsigned, payload }, onError, signerOptions, tip }: Props): React.ReactElement<Props> | null {
|
|
const { t } = useTranslation();
|
|
|
|
if (!extrinsic) {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<StyledModalColumns
|
|
className={className}
|
|
hint={t('The details of the transaction including the type, the description (as available from the chain metadata) as well as any parameters and fee estimations (as available) for the specific type of call.')}
|
|
>
|
|
<CallExpander
|
|
isHeader
|
|
onError={onError}
|
|
value={extrinsic}
|
|
/>
|
|
{!isUnsigned && !payload && (
|
|
<PaymentInfo
|
|
accountId={accountId}
|
|
className='paymentInfo'
|
|
extrinsic={extrinsic}
|
|
isHeader
|
|
signerOptions={signerOptions}
|
|
tip={tip}
|
|
/>
|
|
)}
|
|
</StyledModalColumns>
|
|
);
|
|
}
|
|
|
|
const StyledModalColumns = styled(Modal.Columns)`
|
|
.paymentInfo {
|
|
margin-top: 0.5rem;
|
|
}
|
|
`;
|
|
|
|
export default React.memo(Transaction);
|