From 2c2927bf8ee78f848f91ff128d4625b9086b9ebb Mon Sep 17 00:00:00 2001 From: Victor Kirov Date: Mon, 7 Oct 2024 14:42:54 +0300 Subject: [PATCH] Address PR comments --- src/app/components/batchPsbtSigning/index.tsx | 4 ++-- src/app/components/confirmBtcTransaction/index.tsx | 2 +- src/app/components/ledgerSteps/index.tsx | 4 ++-- src/app/components/messageSigning/index.tsx | 2 +- src/app/screens/createInscription/index.tsx | 1 - src/app/screens/executeBrc20Transaction/index.tsx | 2 +- src/app/ui-library/sheet.tsx | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/app/components/batchPsbtSigning/index.tsx b/src/app/components/batchPsbtSigning/index.tsx index fcb6007ae..b88f46822 100644 --- a/src/app/components/batchPsbtSigning/index.tsx +++ b/src/app/components/batchPsbtSigning/index.tsx @@ -292,7 +292,7 @@ function BatchPsbtSigning({ onSigned, psbts, onCancel, onPostSignDone }: BatchPs }; const renderSigning = () => { - if (!renderSign) return null; + if (!renderSign || (!isSigningComplete && isLedgerModalVisible)) return null; const signingStatus: ConfirmationStatus = isSigningComplete ? 'SUCCESS' : 'LOADING'; return ( @@ -326,7 +326,7 @@ function BatchPsbtSigning({ onSigned, psbts, onCancel, onPostSignDone }: BatchPs <> {renderPreSign()} {renderSigning()} - setIsLedgerModalVisible(false)}> + setIsLedgerModalVisible(false)}> {isLedgerModalVisible && ( )} - setIsModalVisible(false)}> + setIsModalVisible(false)}> {isModalVisible && } diff --git a/src/app/components/ledgerSteps/index.tsx b/src/app/components/ledgerSteps/index.tsx index 789f474d1..916efeead 100644 --- a/src/app/components/ledgerSteps/index.tsx +++ b/src/app/components/ledgerSteps/index.tsx @@ -25,7 +25,7 @@ type Props = { txnSignIndex?: number; }; -function ConfirmBtcTransaction({ onConfirm, onCancel, txnToSignCount, txnSignIndex }: Props) { +function LedgerSteps({ onConfirm, onCancel, txnToSignCount, txnSignIndex }: Props) { const [currentStep, setCurrentStep] = useState(Steps.ConnectLedger); const [isButtonDisabled, setIsButtonDisabled] = useState(false); const [isConnectSuccess, setIsConnectSuccess] = useState(false); @@ -118,4 +118,4 @@ function ConfirmBtcTransaction({ onConfirm, onCancel, txnToSignCount, txnSignInd ); } -export default ConfirmBtcTransaction; +export default LedgerSteps; diff --git a/src/app/components/messageSigning/index.tsx b/src/app/components/messageSigning/index.tsx index e93eb5935..9393e1268 100644 --- a/src/app/components/messageSigning/index.tsx +++ b/src/app/components/messageSigning/index.tsx @@ -220,7 +220,7 @@ function MessageSigning({ - setIsModalVisible(false)}> + setIsModalVisible(false)}> {currentStepIndex === 0 && ( )} diff --git a/src/app/screens/executeBrc20Transaction/index.tsx b/src/app/screens/executeBrc20Transaction/index.tsx index b5882c0d6..3bd44db13 100644 --- a/src/app/screens/executeBrc20Transaction/index.tsx +++ b/src/app/screens/executeBrc20Transaction/index.tsx @@ -165,7 +165,7 @@ function ExecuteBrc20Transaction() { loadingPercentage={loadingPercentageAwareOfStatus} /> )} - + void;