Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(frontend): simplify eth cketh conversion #3727

Merged
merged 20 commits into from
Dec 4, 2024

Conversation

BonomoAlessandro
Copy link
Collaborator

@BonomoAlessandro BonomoAlessandro commented Nov 22, 2024

Motivation

The form screens for the conversion of eth and cketh should not display unnecessary data in order to be as clear as possible. Only the form screens should be modified, other screens like review should stay the same.

Changes

  • removes source from convert to ckETH modal
  • removes destination and source from convert to ETH modal

Tests

before:
Convert to ckETH modal:
oisy-wallet-convert-to-cketh-old

Convert to ETH modal:
oisy-wallet-convert-to-eth-old

Send ICP:
image

after:
Convert to ckETH modal:
image

Convert to ETH modal:
image

Send ICP:
image

@BonomoAlessandro BonomoAlessandro marked this pull request as ready for review November 22, 2024 14:18
@BonomoAlessandro BonomoAlessandro requested a review from a team as a code owner November 22, 2024 14:18
Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before I review, why removing the destination from the conversion flow? What if the user wants to convert them but outside OISY? We auto-fill the destination for easiness, but I am not convinced that we should remove it

@StefanBerger-DFINITY
Copy link
Contributor

@AntonioVentilii this request came from Jan to Artem directly, and they agreed on the described change.

Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking this because there have already been a few comments here, and my feedback about the removal of the destination input field would be a major UX issue.

Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description of the PR is not entirely clear, and I'm a bit confused. To avoid misunderstandings, could you clarify whether it's expected for the "source" field to be hidden on the form but still visible on the review screen of the wizard?


const { sendToken } = getContext<SendContext>(SEND_CONTEXT_KEY);

let amountError: IcAmountAssertionError | undefined;
let invalidDestination: boolean;

let sourceValue = simplifiedForm ? undefined : source;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed this in my previous review. I might be wrong, but forcing a value to undefined to avoid displaying it seems like an anti-pattern with respect to OISY's codebase. Additionally, it appears the field still accepts undefined but is never actually undefined. Therefore, I believe it would be better to express the choice of not displaying the source by using a dedicated property.

@BonomoAlessandro
Copy link
Collaborator Author

@peterpeterparker

The description of the PR is not entirely clear, and I'm a bit confused. To avoid misunderstandings, could you clarify whether it's expected for the "source" field to be hidden on the form but still visible on the review screen of the wizard?

Ohh sry i have not seen this question.
The source field should be hidden on the form but still be visible on the review. I will update the PR description.

@peterpeterparker peterpeterparker changed the title style(frontend): simplify eth cketh conversion feat(frontend): simplify eth cketh conversion Dec 2, 2024
Copy link
Member

@peterpeterparker peterpeterparker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thx

@BonomoAlessandro BonomoAlessandro merged commit b1c28fb into main Dec 4, 2024
18 checks passed
@BonomoAlessandro BonomoAlessandro deleted the style(frontend)/simplify-eth-cketh-conversion branch December 4, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants