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 #510

Closed
wants to merge 4 commits into from
Closed

feat: Swap #510

wants to merge 4 commits into from

Conversation

abcrane123
Copy link
Contributor

@abcrane123 abcrane123 commented Jun 11, 2024

What changed? Why?

  • add Swap component
Screenshot 2024-06-11 at 12 03 09 PM Screenshot 2024-06-11 at 12 28 36 PM Screenshot 2024-06-11 at 12 02 49 PM Screenshot 2024-06-11 at 12 03 03 PM

Notes to reviewers

  • add back in after PR is merged
<App>
  <SwapContainer>
    {(
      fromAmount,
      fromToken,
      fromTokenBalance,
      setFromAmount,
      setFromToken,
      setToToken,
      toAmount,
      toToken,
      toTokenBalance,
    ) => (
      <Swap
        fromAmount={fromAmount}
        fromToken={fromToken}
        fromTokenBalance={fromTokenBalance}
        setFromAmount={setFromAmount}
        setFromToken={setFromToken}
        setToToken={setToToken}
        swappableTokens={[
          {
            name: 'Ethereum',
            address: '',
            symbol: 'ETH',
            decimals: 18,
            image: 'https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png',
            chainId: 8453,
          },
          {
            name: 'USDC',
            address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
            symbol: 'USDC',
            decimals: 6,
            image:
              'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
            chainId: 8453,
          },
          {
            name: 'Dai',
            address: '0x50c5725949a6f0c72e6c4a641f24049a917db0cb',
            symbol: 'DAI',
            decimals: 18,
            image:
              'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/d0/d7/d0d7784975771dbbac9a22c8c0c12928cc6f658cbcf2bbbf7c909f0fa2426dec-NmU4ZWViMDItOTQyYy00Yjk5LTkzODUtNGJlZmJiMTUxOTgy',
            chainId: 8453,
          },
        ]}
        toAmount={toAmount}
        toToken={toToken}
        toTokenBalance={toTokenBalance}
      />
    )}
  </SwapContainer>
</App>

How has it been tested?
locally

@abcrane123 abcrane123 requested review from Zizzamia and kyhyco June 11, 2024 16:29
@abcrane123 abcrane123 self-assigned this Jun 11, 2024
@abcrane123 abcrane123 closed this Jun 13, 2024
@Zizzamia Zizzamia deleted the alissa.crane/swap-component branch June 13, 2024 18:18
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.

1 participant