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

[SWAP REFACTORING #4.1] new swap page, setup layout #1043

Merged
merged 81 commits into from
Sep 19, 2022

Conversation

shoom3301
Copy link
Collaborator

@shoom3301 shoom3301 commented Sep 7, 2022

Summary

https://docs.google.com/document/d/1QCuT2zT-G7fKB5azLmssj8O3yd2dwBpDuoRJuz0cw0U/edit#

How to review

Sorry for the big PR, for easier code review, please review per commit, starting with the oldest

Refactoring PR's list:

  1. Separate swap logic from view
  2. Refactor swap business logic
  3. Refactor wrap/unwrap flow
  4. New swap page
    4.1. Setup layout
    4.2. Bind data rendering and logic
    4.3. Recipient controls, trade rates, high slippage warning
    4.4. Merge develop, code cleanup
    4.5. Cosmos fixtures and documentation

Testing

Don't test this PR, test the final PR - New swap page

export default function SwapHeader({ allowedSlippage }: { allowedSlippage: Percent }) {
export default function SwapHeader({
allowedSlippage,
className = '',
Copy link
Contributor

Choose a reason for hiding this comment

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

Curious why we use empty string as the default when className is optional and can be undefined

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed

src/custom/pages/NewSwap/styled.tsx Show resolved Hide resolved
const { allowedSlippage } = useDerivedSwapInfo()

return (
<styledEl.Container>
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldn't the swap widget composition be inside a component instead of the page?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I moved it because AffiliateStatusCheck component is out of boundaries

src/custom/pages/NewSwap/styled.tsx Show resolved Hide resolved
@shoom3301 shoom3301 merged commit 16e6bbb into refactor/wrap-native-token Sep 19, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Sep 19, 2022
@alfetopito alfetopito deleted the refactor/new-swap-form-p1 branch September 26, 2022 16:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants