From 2303a75aa35caa7ee10b2900e2cc33213e85465a Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 3 Dec 2019 00:31:31 +0100 Subject: [PATCH] Remove TxButton assert (#1988) * Remove TxButton assert * Linting --- packages/react-components/src/TxButton.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react-components/src/TxButton.tsx b/packages/react-components/src/TxButton.tsx index cbd7ba86c5..1ad614f4d0 100644 --- a/packages/react-components/src/TxButton.tsx +++ b/packages/react-components/src/TxButton.tsx @@ -3,13 +3,13 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { SubmittableExtrinsic } from '@polkadot/api/promise/types'; -import { assert, isFunction, isUndefined } from '@polkadot/util'; import { QueueTx, QueueTxExtrinsicAdd } from './Status/types'; import { TxButtonProps as Props } from './types'; import React from 'react'; import { SubmittableResult } from '@polkadot/api'; import { withApi } from '@polkadot/react-api'; +import { assert, isFunction, isUndefined } from '@polkadot/util'; import Button from './Button'; import { QueueConsumer } from './Status/Context'; @@ -34,8 +34,6 @@ class TxButtonInner extends React.PureComponent { public render (): React.ReactNode { const { accountId, className, icon, iconSize, innerRef, isBasic, isDisabled, isNegative, isPrimary, isUnsigned, label, tooltip } = this.props; - assert(!!this.props.extrinsic || (!!this.props.params && !!this.props.tx), 'TxButton: Invalid extrinsic provided'); - const { isSending } = this.state; const needsAccount = isUnsigned ? false