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: Swap component refactor #522

Merged
merged 31 commits into from
Jun 13, 2024
Merged

Conversation

abcrane123
Copy link
Contributor

@abcrane123 abcrane123 commented Jun 12, 2024

What changed? Why?

Screenshot 2024-06-12 at 8 47 57 PM

Notes to reviewers

  • TODO: add back in after
<App>
  <Swap>
    <SwapAmountInput
      label="Sell"
      token={{
        name: 'Ethereum',
        address: '',
        symbol: 'ETH',
        decimals: 18,
        image: 'https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png',
        chainId: 8453,
      }}
      type="from"
    />
    <SwapAmountInput
      label="Buy"
      token={{
        name: 'USDC',
        address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
        symbol: 'USDC',
        decimals: 6,
        image:
          'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
        chainId: 8453,
      }}
      type="to"
    />
    <SwapButton />
  </Swap>
</App>

How has it been tested?
locally

import type { SwapError, SwapReact } from '../types';
import type { Token } from '../../token';

function isSwapError(response: unknown): response is SwapError {
Copy link
Contributor

Choose a reason for hiding this comment

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

Move utils in their own file.

@abcrane123 abcrane123 marked this pull request as ready for review June 13, 2024 00:49
@abcrane123 abcrane123 requested review from Zizzamia and kyhyco June 13, 2024 00:49
@Zizzamia Zizzamia merged commit 7906f46 into main Jun 13, 2024
9 checks passed
@Zizzamia Zizzamia deleted the alissa.crane/swap-component-copy branch June 13, 2024 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants