Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed Jan 27, 2025
1 parent 2b08f5e commit c480eb3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,41 +48,46 @@ export const useLegacyOnConfirm = ({
}
const {isHW, isEasyConfirmationEnabled} = meta
if (isHW) {
openModal(
strings.signTransaction,
<ConfirmTxWithHwModal
onCancel={closeModal}
unsignedTx={unsignedTx}
onSuccess={handleOnSuccess}
onNotSupportedCIP1694={() => {
if (onNotSupportedCIP1694) {
closeModal()
onNotSupportedCIP1694()
}
}}
onCIP36SupportChange={onCIP36SupportChange ?? undefined}
/>,
400,
)
openModal({
title: strings.signTransaction,
content: (
<ConfirmTxWithHwModal
onCancel={closeModal}
unsignedTx={unsignedTx}
onSuccess={handleOnSuccess}
onNotSupportedCIP1694={() => {
if (onNotSupportedCIP1694) {
closeModal()
onNotSupportedCIP1694()
}
}}
onCIP36SupportChange={onCIP36SupportChange ?? undefined}
/>
),
height: 400,
})
return
}

if (!isHW && !isEasyConfirmationEnabled) {
openModal(
strings.signTransaction,
<ConfirmTxWithSpendingPasswordModal
unsignedTx={unsignedTx}
onSuccess={handleOnSuccess}
onError={handleOnError}
/>,
)
openModal({
title: strings.signTransaction,
content: (
<ConfirmTxWithSpendingPasswordModal
unsignedTx={unsignedTx}
onSuccess={handleOnSuccess}
onError={handleOnError}
/>
),
height: 400,
})
return
}

openModal(
strings.signTransaction,
<ConfirmTxWithOsModal unsignedTx={unsignedTx} onSuccess={handleOnSuccess} onError={handleOnError} />,
)
openModal({
title: strings.signTransaction,
content: <ConfirmTxWithOsModal unsignedTx={unsignedTx} onSuccess={handleOnSuccess} onError={handleOnError} />,
})
}

return {legacyOnConfirm} as const
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,21 @@ export const usePromptRootKey = () => {
}

if (meta.isEasyConfirmationEnabled) {
openModal(
title ?? strings.confirmTx,
<ConfirmRawTxWithOs onSuccess={handleOnConfirm} onError={onError} />,
modalHeight,
openModal({
title: title ?? strings.confirmTx,
content: <ConfirmRawTxWithOs onSuccess={handleOnConfirm} onError={onError} />,
height: modalHeight,
onClose,
)
})
return
}

openModal(
title ?? strings.confirmTx,
<ConfirmRawTxWithPassword summary={summary} onConfirm={handleOnConfirm} />,
modalHeight,
openModal({
title: title ?? strings.confirmTx,
content: <ConfirmRawTxWithPassword summary={summary} onConfirm={handleOnConfirm} />,
height: modalHeight,
onClose,
)
})
},
[closeModal, meta.isEasyConfirmationEnabled, openModal, strings.confirmTx],
)
Expand Down

0 comments on commit c480eb3

Please sign in to comment.