Skip to content

Commit

Permalink
remove second confirmation button
Browse files Browse the repository at this point in the history
  • Loading branch information
gianfra-t committed Sep 3, 2024
1 parent 171066d commit 9d5fc4e
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions src/pages/swap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ export const SwapPage = () => {
signingPhase,
} = useMainProcess();

const handleSubmitButtonClick = () => {
setIframVisible(true);
}

const {
tokensModal: [modalType, setModalType],
onFromChange,
Expand Down Expand Up @@ -232,7 +228,7 @@ export const SwapPage = () => {
const showMainScreenAnyway =
offrampingPhase === undefined;

if (sep24Url && isIframVisible && showMainScreenAnyway ){
if (sep24Url && showMainScreenAnyway ){
return (
<IframeComponent
src={sep24Url}
Expand Down Expand Up @@ -272,23 +268,11 @@ export const SwapPage = () => {
<section className="flex items-center justify-center w-full mt-5">
<BenefitsList amount={fromAmount} currency={from} />
</section>
{sep24Url !== undefined ? (
<button
href={sep24Url}
target="_blank"
rel="noreferrer"
className="w-full mt-5 text-white bg-blue-700 btn rounded-xl"
onClick={handleSubmitButtonClick}
>
Start Offramping
</button>
) : (
<SwapSubmitButton
text={offrampingStarted ? 'Offramping in Progress' : 'Confirm'}
text={offrampingStarted ? 'Offramping in Progress' : 'Start Offramping'}
disabled={Boolean(getCurrentErrorMessage()) || !inputAmountIsStable}
pending={offrampingStarted || offrampingPhase !== undefined}
/>
)}
</form>
</main>
);
Expand Down

0 comments on commit 9d5fc4e

Please sign in to comment.