Skip to content

Commit

Permalink
update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
alissacrane-cb committed Dec 16, 2024
1 parent 97909eb commit 352aa13
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 44 deletions.
6 changes: 3 additions & 3 deletions playground/nextjs-app-router/components/demo/Buy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useCallback, useContext } from 'react';
import type { TransactionReceipt } from 'viem';
import { base } from 'viem/chains';
import { AppContext } from '../AppProvider';
import { degenToken, ethToken } from '../../lib/constants';
import { daiToken, degenToken } from '../../lib/constants';

const FALLBACK_DEFAULT_MAX_SLIPPAGE = 3;

Expand Down Expand Up @@ -57,8 +57,8 @@ function BuyComponent() {
// useAggregator: true,
// }}
isSponsored={isSponsored}
toToken={ethToken}
fromToken={degenToken}
toToken={degenToken}
fromToken={daiToken}
projectId={projectId || ''}
/>
</div>
Expand Down
81 changes: 40 additions & 41 deletions playground/nextjs-app-router/lib/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Token } from '@coinbase/onchainkit/token';
import type { Address } from 'viem';
import { base } from 'viem/chains';
import type { Token } from '@coinbase/onchainkit/token';

export const deployedContracts: Record<number, { click: Address }> = {
[8543]: {
Expand Down Expand Up @@ -28,43 +28,42 @@ export const ENVIRONMENT_VARIABLES: Record<EnvironmentKey, string | undefined> =
[ENVIRONMENT.RESERVOIR_API_KEY]: process.env.NEXT_PUBLIC_RESERVOIR_API_KEY,
};

export const ethToken: Token = {
name: 'ETH',
address: '',
symbol: 'ETH',
decimals: 18,
image:
'https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png',
chainId: base.id,
};

export const usdcToken: Token = {
name: 'USDC',
address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
symbol: 'USDC',
decimals: 6,
image:
'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
chainId: base.id,
};

export const degenToken: Token = {
name: 'DEGEN',
address: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed',
symbol: 'DEGEN',
decimals: 18,
image:
'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/3b/bf/3bbf118b5e6dc2f9e7fc607a6e7526647b4ba8f0bea87125f971446d57b296d2-MDNmNjY0MmEtNGFiZi00N2I0LWIwMTItMDUyMzg2ZDZhMWNm',
chainId: base.id,
};

export const daiToken: Token = {
name: 'DAI',
address: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb',
symbol: 'DAI',
decimals: 18,
image:
'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/92/13/9213e31b84c98a693f4c624580fdbe6e4c1cb550efbba15aa9ea68fd25ffb90c-ZTE1NmNjMGUtZGVkYi00ZDliLWI2N2QtNTY2ZWRjMmYwZmMw',
chainId: base.id,
};

export const ethToken: Token = {
name: 'ETH',
address: '',
symbol: 'ETH',
decimals: 18,
image:
'https://wallet-api-production.s3.amazonaws.com/uploads/tokens/eth_288.png',
chainId: base.id,
};

export const usdcToken: Token = {
name: 'USDC',
address: '0x833589fcd6edb6e08f4c7c32d4f71b54bda02913',
symbol: 'USDC',
decimals: 6,
image:
'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/44/2b/442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213-ZWUzYjJmZGUtMDYxNy00NDcyLTg0NjQtMWI4OGEwYjBiODE2',
chainId: base.id,
};

export const degenToken: Token = {
name: 'DEGEN',
address: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed',
symbol: 'DEGEN',
decimals: 18,
image:
'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/3b/bf/3bbf118b5e6dc2f9e7fc607a6e7526647b4ba8f0bea87125f971446d57b296d2-MDNmNjY0MmEtNGFiZi00N2I0LWIwMTItMDUyMzg2ZDZhMWNm',
chainId: base.id,
};

export const daiToken: Token = {
name: 'DAI',
address: '0x50c5725949A6F0c72E6C4a641F24049A917DB0Cb',
symbol: 'DAI',
decimals: 18,
image:
'https://d3r81g40ycuhqg.cloudfront.net/wallet/wais/92/13/9213e31b84c98a693f4c624580fdbe6e4c1cb550efbba15aa9ea68fd25ffb90c-ZTE1NmNjMGUtZGVkYi00ZDliLWI2N2QtNTY2ZWRjMmYwZmMw',
chainId: base.id,
};

0 comments on commit 352aa13

Please sign in to comment.