-
Notifications
You must be signed in to change notification settings - Fork 25
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
feat(frontend): simplify eth cketh conversion #3727
Conversation
There was a problem hiding this 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
@AntonioVentilii this request came from Jan to Artem directly, and they agreed on the described change. |
There was a problem hiding this 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.
…th-conversion' into style(frontend)/simplify-eth-cketh-conversion # Conflicts: # src/frontend/src/lib/components/send/SendTokenContext.svelte
implements SendForm tests
There was a problem hiding this 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; |
There was a problem hiding this comment.
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.
Ohh sry i have not seen this question. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thx
Motivation
The form screens for the conversion of
eth
andcketh
should not display unnecessary data in order to be as clear as possible. Only theform
screens should be modified, other screens likereview
should stay the same.Changes
source
fromconvert to ckETH
modaldestination
andsource
fromconvert to ETH
modalTests
before:

Convert to ckETH modal:
Convert to ETH modal:

Send ICP:

after:

Convert to ckETH modal:
Convert to ETH modal:

Send ICP:
