-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
feat(ramps): adds a token selection ui for unified buy #22184
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
Merged
+6,490
−164
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
60f14b1
feat(ramps): adds a token selection ui for unified buy
georgeweiler 47c6da4
Merge branch 'main' of github.com:MetaMask/metamask-mobile into TRAM-…
georgeweiler bf19dba
feat: fixes tests and code cleanup
georgeweiler 291b2ba
chore: formatting
georgeweiler 0664130
Merge branch 'main' of github.com:MetaMask/metamask-mobile into TRAM-…
georgeweiler f410d0f
chore: import constants to reduce duplicated lines
georgeweiler 7e9b1fc
Merge branch 'main' into TRAM-2815-ramp-token-selection-page-ui
georgeweiler 2174d90
feat(ramps): adds new network filter component to match updated desig…
georgeweiler 77b6d4e
chore: updates snapshots
georgeweiler b3f611f
chore: snapshots
georgeweiler 61e14d3
chore: refactor to dry code
georgeweiler c8249db
Merge branch 'main' into TRAM-2815-ramp-token-selection-page-ui
georgeweiler 42f005f
chore: small interface update
georgeweiler fb3a5a9
MMerge branch 'TRAM-2815-ramp-token-selection-page-ui' of github.com:…
georgeweiler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| export * from './constants.ts'; | ||
| export * from './mockCryptoCurrencies'; |
59 changes: 59 additions & 0 deletions
59
app/components/UI/Ramp/Deposit/constants/mockCryptoCurrencies.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import { DepositCryptoCurrency } from '@consensys/native-ramps-sdk'; | ||
|
|
||
| export const MOCK_USDC_TOKEN: DepositCryptoCurrency = { | ||
| assetId: 'eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48', | ||
| chainId: 'eip155:1', | ||
| name: 'USD Coin', | ||
| symbol: 'USDC', | ||
| decimals: 6, | ||
| iconUrl: | ||
| 'https://static.cx.metamask.io/api/v2/tokenIcons/assets/eip155/1/erc20/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48.png', | ||
| }; | ||
|
|
||
| export const MOCK_USDT_TOKEN: DepositCryptoCurrency = { | ||
| assetId: 'eip155:1/erc20:0xdAC17F958D2ee523a2206206994597C13D831ec7', | ||
| chainId: 'eip155:1', | ||
| name: 'Tether USD', | ||
| symbol: 'USDT', | ||
| decimals: 6, | ||
| iconUrl: | ||
| 'https://static.cx.metamask.io/api/v2/tokenIcons/assets/eip155/1/erc20/0xdAC17F958D2ee523a2206206994597C13D831ec7.png', | ||
| }; | ||
|
|
||
| export const MOCK_BTC_TOKEN: DepositCryptoCurrency = { | ||
| assetId: 'bip122:000000000019d6689c085ae165831e93/slip44:0', | ||
| chainId: 'bip122:000000000019d6689c085ae165831e93', | ||
| name: 'Bitcoin', | ||
| symbol: 'BTC', | ||
| decimals: 8, | ||
| iconUrl: | ||
| 'https://static.cx.metamask.io/api/v2/tokenIcons/assets/bip122/000000000019d6689c085ae165831e93/slip44/0.png', | ||
| }; | ||
|
|
||
| export const MOCK_ETH_TOKEN: DepositCryptoCurrency = { | ||
| assetId: 'eip155:1/slip44:60', | ||
| chainId: 'eip155:1', | ||
| name: 'Ethereum', | ||
| symbol: 'ETH', | ||
| decimals: 18, | ||
| iconUrl: | ||
| 'https://static.cx.metamask.io/api/v2/tokenIcons/assets/eip155/1/slip44/60.png', | ||
| }; | ||
|
|
||
| export const MOCK_USDC_SOLANA_TOKEN: DepositCryptoCurrency = { | ||
| assetId: 'solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v', | ||
| chainId: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', | ||
| name: 'USD Coin', | ||
| symbol: 'USDC', | ||
| decimals: 6, | ||
| iconUrl: | ||
| 'https://static.cx.metamask.io/api/v2/tokenIcons/assets/solana/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v.png', | ||
| }; | ||
|
|
||
| export const MOCK_CRYPTOCURRENCIES: DepositCryptoCurrency[] = [ | ||
| MOCK_USDC_TOKEN, | ||
| MOCK_USDT_TOKEN, | ||
| MOCK_BTC_TOKEN, | ||
| MOCK_ETH_TOKEN, | ||
| MOCK_USDC_SOLANA_TOKEN, | ||
| ]; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 don't think we need this comment here.
That logic will happen inside the
useRampNavigationhook