-
Notifications
You must be signed in to change notification settings - Fork 198
feat: many onramper things #10413
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
Merged
feat: many onramper things #10413
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
c855b7a
feat: banxa progress
gomesalexandre c2a0a21
feat: cleanup
gomesalexandre 249f9ce
feat: ai slopish
gomesalexandre 14274c4
feat: clean ai slop
gomesalexandre 4e773c8
feat: cleanup
gomesalexandre ac6a697
feat: cleanuparoos
gomesalexandre 60adfa7
feat: more clean more up
gomesalexandre fb842f1
Merge remote-tracking branch 'origin/develop' into feat_onramper_queries
gomesalexandre f300acf
Merge branch 'develop' into feat_onramper_queries
NeOMakinG 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
135 changes: 135 additions & 0 deletions
135
src/components/Modals/FiatRamps/fiatRampProviders/onramper/constants.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,135 @@ | ||
| import type { ChainId } from '@shapeshiftoss/caip' | ||
| import { | ||
| arbitrumChainId, | ||
| avalancheChainId, | ||
| baseChainId, | ||
| bchChainId, | ||
| bscChainId, | ||
| btcChainId, | ||
| cosmosChainId, | ||
| dogeChainId, | ||
| ethChainId, | ||
| gnosisChainId, | ||
| ltcChainId, | ||
| optimismChainId, | ||
| polygonChainId, | ||
| solanaChainId, | ||
| thorchainChainId, | ||
| } from '@shapeshiftoss/caip' | ||
|
|
||
| import type { CommonFiatCurrencies } from '../../config' | ||
|
|
||
| export const SUPPORTED_ONRAMPER_FIAT_CURRENCIES: CommonFiatCurrencies[] = [ | ||
NeOMakinG marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 'AOA', | ||
| 'AUD', | ||
| 'BBD', | ||
| 'BZD', | ||
| 'BMD', | ||
| 'BRL', | ||
| 'GBP', | ||
| 'BND', | ||
| 'BGN', | ||
| 'CAD', | ||
| 'XAF', | ||
| 'CLP', | ||
| 'CNY', | ||
| 'COP', | ||
| 'KMF', | ||
| 'CRC', | ||
| 'HRK', | ||
| 'CZK', | ||
| 'DKK', | ||
| 'DJF', | ||
| 'DOP', | ||
| 'XCD', | ||
| 'EGP', | ||
| 'EUR', | ||
| 'FKP', | ||
| 'FJD', | ||
| 'GEL', | ||
| 'GHS', | ||
| 'GIP', | ||
| 'GTQ', | ||
| 'HNL', | ||
| 'HKD', | ||
| 'HUF', | ||
| 'ISK', | ||
| 'IDR', | ||
| 'ILS', | ||
| 'JMD', | ||
| 'JPY', | ||
| 'JOD', | ||
| 'KZT', | ||
| 'KES', | ||
| 'KWD', | ||
| 'KGS', | ||
| 'MGA', | ||
| 'MWK', | ||
| 'MYR', | ||
| 'MRU', | ||
| 'MXN', | ||
| 'MDL', | ||
| 'MAD', | ||
| 'MZN', | ||
| 'TWD', | ||
| 'NZD', | ||
| 'NGN', | ||
| 'NOK', | ||
| 'OMR', | ||
| 'PKR', | ||
| 'PGK', | ||
| 'PYG', | ||
| 'PEN', | ||
| 'PHP', | ||
| 'PLN', | ||
| 'RON', | ||
| 'RWF', | ||
| 'STN', | ||
| 'SCR', | ||
| 'SGD', | ||
| 'SBD', | ||
| 'ZAR', | ||
| 'KRW', | ||
| 'LKR', | ||
| 'SRD', | ||
| 'SZL', | ||
| 'SEK', | ||
| 'CHF', | ||
| 'TJS', | ||
| 'TZS', | ||
| 'THB', | ||
| 'TOP', | ||
| 'TRY', | ||
| 'TMT', | ||
| 'UGX', | ||
| 'USD', | ||
| 'UYU', | ||
| 'VND', | ||
| ] | ||
|
|
||
| // Base mapping from ChainId to Onramper network names | ||
| export const CHAIN_ID_TO_ONRAMPER_NETWORK: Record<ChainId, string> = { | ||
| [btcChainId]: 'bitcoin', | ||
| [bchChainId]: 'bitcoincash', | ||
| [dogeChainId]: 'dogecoin', | ||
| [ltcChainId]: 'litecoin', | ||
| [ethChainId]: 'ethereum', | ||
| [avalancheChainId]: 'avaxc', | ||
| [optimismChainId]: 'optimism', | ||
| [bscChainId]: 'bsc', | ||
| [polygonChainId]: 'polygon', | ||
| [gnosisChainId]: 'gnosis', | ||
| [arbitrumChainId]: 'arbitrum', | ||
| [baseChainId]: 'base', | ||
| [cosmosChainId]: 'cosmos', | ||
| [thorchainChainId]: 'thorchain', | ||
| [solanaChainId]: 'solana', | ||
| } as const | ||
|
|
||
| export const ONRAMPER_NETWORK_TO_CHAIN_ID: Record<string, ChainId> = Object.fromEntries( | ||
| Object.entries(CHAIN_ID_TO_ONRAMPER_NETWORK).map(([chainId, network]) => [network, chainId]), | ||
| ) | ||
|
|
||
| export const getChainIdFromOnramperNetwork = (network: string): ChainId | undefined => { | ||
| return ONRAMPER_NETWORK_TO_CHAIN_ID[network] | ||
| } | ||
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
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.
Uh oh!
There was an error while loading. Please reload this page.