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(ramp): add Optimism and Linea #814

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions apps/ramp-network/src/ramp.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import { ChainInfo } from '@safe-global/safe-apps-sdk'
import { RampInstantEvent, RampInstantSDK } from '@ramp-network/ramp-instant-sdk'
import { RAMP_API_KEY } from './constants'

const RINKEBY_STAGING_URL = 'https://ri-widget-staging.firebaseapp.com/'
const WIDGET_CLOSE_EVENT = 'WIDGET_CLOSE'
const PURCHASE_CREATED_EVENT = 'PURCHASE_CREATED'

export const ASSETS_BY_CHAIN: { [key: string]: string } = {
'1': 'ETH_*,ERC20_*',
'4': 'ETH_*,ERC20_*',
'1': 'ETH_*',
'10': 'OPTIMISM_*',
'56': 'BSC_*',
'137': 'MATIC_*',
'100': 'XDAI_*',
Expand All @@ -18,10 +16,7 @@ export const ASSETS_BY_CHAIN: { [key: string]: string } = {
'1101': 'POLYGONZKEVM_*',
'42161': 'ARBITRUM_*',
'42220': 'CELO_*',
}

export const getRampWidgetUrl = (chainInfo: ChainInfo) => {
return chainInfo?.chainId === '4' ? RINKEBY_STAGING_URL : ''
Copy link
Member Author

Choose a reason for hiding this comment

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

This function wasn't used.

'59144': 'LINEA_*',
}

type RampWidgetInitializer = {
Expand Down
Loading