From 62e8e184214431a136f9b8ed2f22fdcbcd24963c Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Fri, 3 May 2019 11:07:56 +0200 Subject: [PATCH] TxButton should not calc. on disabled (#1067) --- packages/ui-app/src/TxButton.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui-app/src/TxButton.tsx b/packages/ui-app/src/TxButton.tsx index aacb088886..64fd1ee6a6 100644 --- a/packages/ui-app/src/TxButton.tsx +++ b/packages/ui-app/src/TxButton.tsx @@ -50,8 +50,8 @@ class TxButtonInner extends React.PureComponent { 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; }