TxButton should not calc. on disabled (#1067)

This commit is contained in:
Jaco Greeff 2019-05-03 11:07:56 +02:00 committed by kwingram25
parent c9b35f71f7
commit 62e8e18421

View File

@ -50,8 +50,8 @@ class TxButtonInner extends React.PureComponent<InnerProps> {
isSending: false
} as State;
static getDerivedStateFromProps ({ api, params = [], txqueue = [], tx = '', extrinsic: propsExtrinsic }: InnerProps): State | null {
if (!propsExtrinsic && (!tx || tx.length === 0)) {
static getDerivedStateFromProps ({ api, isDisabled, params = [], txqueue = [], tx = '', extrinsic: propsExtrinsic }: InnerProps): State | null {
if (isDisabled || !propsExtrinsic && (!tx || tx.length === 0)) {
return null;
}