Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .yarn/versions/1e200917.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
releases:
browser-extension: patch
helios-popup: patch

declined:
- helios
19 changes: 0 additions & 19 deletions packages/popup/src/components/DappFooter.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ function DappFooter({
confirmParams = {},
onClickCancel,
onClickConfirm,
simulate,
setSendStatus,
setSendError,
setAuthStatus,
Expand Down Expand Up @@ -173,20 +172,6 @@ function DappFooter({
{cancelText}
</Button>
<div className="w-3" />
{simulate && (
<>
<Button
id="simulateBtn"
className="flex-1"
variant="outlined"
onClick={simulate.onClick}
disabled={simulate.disabled}
>
{t('simulate')}
</Button>
<div className="w-3" />
</>
)}
{ConfirmComponent ? (
<ConfirmComponent
onConfirm={onConfirm}
Expand Down Expand Up @@ -214,10 +199,6 @@ DappFooter.propTypes = {
confirmDisabled: PropTypes.bool,
onClickConfirm: PropTypes.func,
onClickCancel: PropTypes.func,
simulate: PropTypes.shape({
onClick: PropTypes.func.isRequired,
disabled: PropTypes.bool,
}),
setSendStatus: PropTypes.func,
setSendError: PropTypes.func,
setIsAppOpen: PropTypes.func,
Expand Down
22 changes: 11 additions & 11 deletions packages/popup/src/pages/ConfirmCallBundle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,17 @@ function CallBundleConfirmation({
{t('viewData')}
<RightOutlined className="ml-1 h-3 w-3" />
</button>
{showSimulate && (
<button
id="simulateBtn"
type="button"
className="mt-2 flex items-center justify-center px-3 py-1 rounded-[4px] text-sm font-normal bg-[#F0F3FF] text-[#808BE7] cursor-pointer disabled:bg-gray-20 disabled:text-gray-40 disabled:cursor-not-allowed"
disabled={simulateDisabled}
onClick={onSimulate}
>
{t('simulate')}
</button>
)}

<div className="flex w-full gap-3">
<Button
Expand All @@ -590,17 +601,6 @@ function CallBundleConfirmation({
>
{t('cancel')}
</Button>
{showSimulate && (
<Button
type="button"
variant="outlined"
className="flex-1"
disabled={simulateDisabled}
onClick={onSimulate}
>
{t('simulate')}
</Button>
)}
<Button
type="button"
className="flex-1"
Expand Down
30 changes: 13 additions & 17 deletions packages/popup/src/pages/ConfirmTransaction/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -814,31 +814,32 @@ function ConfirmTransaction() {
dappApp &&
!!txWithOptions.data &&
txWithOptions.data !== '0x' && (
<Link onClick={() => setView('data')} className="mb-6">
<Link onClick={() => setView('data')}>
{t('viewData')}
<RightOutlined className="w-3 h-3 text-primary ml-1" />
</Link>
)}
{showSimulate && (
<button
id="simulateBtn"
type="button"
className="mt-2 flex items-center justify-center px-3 py-1 rounded-[4px] text-sm font-normal bg-[#F0F3FF] text-[#808BE7] cursor-pointer disabled:bg-gray-20 disabled:text-gray-40 disabled:cursor-not-allowed"
Comment thread
mosshqq marked this conversation as resolved.
Resolved
onClick={onSimulate}
disabled={simulateDisabled}
>
{t('simulate')}
</button>
)}

{!isDapp && !isSwitchInfoDrawerOpen && !pendingDelegationAction && (
<div className="w-full flex px-3 z-50">
<div className="w-full flex px-3 z-50 mt-4">
<Button
variant="outlined"
className="flex-1 mr-3"
onClick={onCancel}
>
{t('cancel')}
</Button>
{showSimulate && (
<Button
variant="outlined"
className="flex-1 mr-3"
onClick={onSimulate}
disabled={simulateDisabled}
>
{t('simulate')}
</Button>
)}
<Button
className="flex-1"
onClick={onSend}
Expand All @@ -862,11 +863,6 @@ function ConfirmTransaction() {
setSendError={setSendError}
setIsAppOpen={setIsAppOpen}
showError={false}
simulate={
showSimulate
? {onClick: onSimulate, disabled: simulateDisabled}
: undefined
}
/>
)}
<AlertMessage
Expand Down
Loading