Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
victorkirov committed Oct 7, 2024
1 parent 2ee11a4 commit 2c2927b
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/app/components/batchPsbtSigning/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -326,7 +326,7 @@ function BatchPsbtSigning({ onSigned, psbts, onCancel, onPostSignDone }: BatchPs
<>
{renderPreSign()}
{renderSigning()}
<Sheet title="" visible={isLedgerModalVisible} onClose={() => setIsLedgerModalVisible(false)}>
<Sheet visible={isLedgerModalVisible} onClose={() => setIsLedgerModalVisible(false)}>
{isLedgerModalVisible && (
<LedgerSteps
onConfirm={onSignPsbtConfirmed}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/confirmBtcTransaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ function ConfirmBtcTransaction({
</StickyHorizontalSplitButtonContainer>
)}
</SendLayout>
<Sheet title="" visible={isModalVisible} onClose={() => setIsModalVisible(false)}>
<Sheet visible={isModalVisible} onClose={() => setIsModalVisible(false)}>
{isModalVisible && <LedgerSteps onConfirm={onConfirm} onCancel={onCancel} />}
</Sheet>
</TxSummaryContext.Provider>
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/ledgerSteps/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -118,4 +118,4 @@ function ConfirmBtcTransaction({ onConfirm, onCancel, txnToSignCount, txnSignInd
);
}

export default ConfirmBtcTransaction;
export default LedgerSteps;
2 changes: 1 addition & 1 deletion src/app/components/messageSigning/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function MessageSigning({
<InfoContainer bodyText={t('SIGNATURE_REQUEST.SIGNING_WARNING')} type="Info" />
</MainContainer>
</ConfirmScreen>
<Sheet title="" visible={isModalVisible} onClose={() => setIsModalVisible(false)}>
<Sheet visible={isModalVisible} onClose={() => setIsModalVisible(false)}>
{currentStepIndex === 0 && (
<LedgerConnectionView
title={t('SIGNATURE_REQUEST.LEDGER.CONNECT.TITLE')}
Expand Down
1 change: 0 additions & 1 deletion src/app/screens/createInscription/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ function CreateInscription() {
/>
)}
<Sheet
title=""
visible={isLedgerConnectVisible}
onClose={isConnectSuccess ? undefined : handleLedgerConnectCancel}
>
Expand Down
2 changes: 1 addition & 1 deletion src/app/screens/executeBrc20Transaction/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ function ExecuteBrc20Transaction() {
loadingPercentage={loadingPercentageAwareOfStatus}
/>
)}
<Sheet title="" visible={isLedgerModalVisible} onClose={handleClickClose}>
<Sheet visible={isLedgerModalVisible} onClose={handleClickClose}>
<LedgerStepView
currentStep={progress}
isConnectSuccess={isConnectSuccess}
Expand Down
2 changes: 1 addition & 1 deletion src/app/ui-library/sheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const BodyContainer = styled.div`
`;

type Props = {
title: string;
title?: string;
visible: boolean;
children: React.ReactNode;
onClose?: () => void;
Expand Down

0 comments on commit 2c2927b

Please sign in to comment.