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

[SWA-96][FEAT] - Add native $USDC on Optimism #1866

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion .env.development
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ REACT_APP_SOCKET_API_KEY=72a5b4b0-e727-48be-8aa1-5da9d62fe635
# Default to chrome. Reference:node_modules/react-dev-utils/openBrowser.js
# BROWSER=Brave Browser
REACT_APP_STACKLY_DESIGN_VERSION=old
REACT_APP_SHOW_STACKLY_POPUP=true
REACT_APP_SHOW_STACKLY_POPUP=true
REACT_APP_WALLET_CONNECT_ID=47ba8ad6d35c9c9087a75b35360c4b3a
1 change: 1 addition & 0 deletions .env.production
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ REACT_APP_FATHOM_SITE_SCRIPT_URL=https://gold-stunning.swapr.site/script.js
REACT_APP_STACKLY_DESIGN_VERSION=old
REACT_APP_SHOW_STACKLY_POPUP=true
REACT_APP_SOCKET_API_KEY=0b353e78-04e1-41ef-8bf3-61453e2ad1da
REACT_APP_WALLET_CONNECT_ID=47ba8ad6d35c9c9087a75b35360c4b3a
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@reduxjs/toolkit": "^1.9.5",
"@swapr/core": "^0.3.19",
"@swapr/periphery": "^0.3.22",
"@swapr/sdk": "1.9.1",
"@swapr/sdk": "SwaprHQ/swapr-sdk#feat/swa-96-add-support-for-native-usdc-in-optimism",
"@tanstack/react-query": "4.24.6",
"@uniswap/token-lists": "^1.0.0-beta.27",
"@uniswap/v3-periphery": "1.4.1",
Expand Down
4 changes: 2 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
<meta name="twitter:description" content="A governance-enabled automated market maker with adjustable fees." />
<meta name="twitter:image" content="http://swapr.eth.limo/og.png" />
<meta name="twitter:image:alt" content="Swapr" />
<meta name="twitter:site" content="@SwaprEth" />
<meta name="twitter:site" content="@Swapr_dapp" />
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'strict-dynamic' 'nonce-<%= CSP_NONCE %>' 'unsafe-inline' 'unsafe-eval'; script-src-attr 'none'; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; connect-src 'self' data: ws: wss: http: https:; img-src 'self' data: blob: https:; font-src 'self' data:; media-src 'self' blob: https:; frame-src 'self' dexscreener.com blob:; object-src 'self'; base-uri 'none'"
content="default-src 'self'; script-src 'strict-dynamic' 'nonce-<%= CSP_NONCE %>' 'unsafe-inline' 'unsafe-eval'; script-src-attr 'none'; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; connect-src 'self' data: ws: wss: http: https:; img-src 'self' data: blob: https:; font-src 'self' data:; media-src 'self' blob: https:; frame-src 'self' dexscreener.com verify.walletconnect.com blob:; object-src 'self'; base-uri 'none'"
/>
<link rel="icon" href="%PUBLIC_URL%/favicon.png" />
<script nonce="<%= CSP_NONCE %>">
Expand Down
2 changes: 1 addition & 1 deletion src/components/expeditions/ExpeditionsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function ExpeditionsModal({ onDismiss }: { onDismiss: () => void
</Row>
<Row>
<Text>
Follow Swapr <ExternalLink href="https://twitter.com/swapreth">Twitter</ExternalLink> or{' '}
Follow Swapr <ExternalLink href="https://twitter.com/swapr_dapp">Twitter</ExternalLink> or{' '}
<ExternalLink href="https://discord.gg/4QXEJQkvHH">Discord</ExternalLink> to get updates on Expeditions.
</Text>
</Row>
Expand Down
4 changes: 2 additions & 2 deletions src/connectors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ export const [walletConnect, walletConnectHooks] = initializeConnector<WalletCon
new WalletConnect({
actions,
options: {
projectId: '47ba8ad6d35c9c9087a75b35360c4b3a',
projectId: process.env.REACT_APP_WALLET_CONNECT_ID as string,
chains: [ChainId.MAINNET],
optionalChains: [
ChainId.RINKEBY,
ChainId.ARBITRUM_ONE,
ChainId.ARBITRUM_RINKEBY,
ChainId.XDAI,
ChainId.GNOSIS,
ChainId.POLYGON,
ChainId.ARBITRUM_GOERLI,
ChainId.OPTIMISM_MAINNET,
Expand Down
10 changes: 10 additions & 0 deletions src/constants/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,14 @@ export const ARBITRUM_NATIVE_USDC = new Token(
'USD Coin'
)

export const OPTIMISM_NATIVE_USDC = new Token(
ChainId.OPTIMISM_MAINNET,
'0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85',
6,
'USDC',
'USD Coin'
)

export const HONEY = new Token(ChainId.XDAI, '0x71850b7E9Ee3f13Ab46d67167341E4bDc905Eef9', 18, 'HNY', 'Honey')

export const STAKE = new Token(
Expand Down Expand Up @@ -207,6 +215,7 @@ export const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {
[ChainId.OPTIMISM_GOERLI]: [],
[ChainId.OPTIMISM_MAINNET]: [
USDC[ChainId.OPTIMISM_MAINNET],
OPTIMISM_NATIVE_USDC,
USDT[ChainId.OPTIMISM_MAINNET],
WBTC[ChainId.OPTIMISM_MAINNET],
],
Expand Down Expand Up @@ -259,6 +268,7 @@ export const SUGGESTED_BASES: ChainTokenList = {
OP[ChainId.OPTIMISM_MAINNET],
DAI[ChainId.OPTIMISM_MAINNET],
USDC[ChainId.OPTIMISM_MAINNET],
OPTIMISM_NATIVE_USDC,
USDT[ChainId.OPTIMISM_MAINNET],
WBTC[ChainId.OPTIMISM_MAINNET],
],
Expand Down
2 changes: 1 addition & 1 deletion src/utils/uiConstants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export const FooterContent = {
},
{
label: 'Twitter',
href: 'https://twitter.com/SwaprEth',
href: 'https://twitter.com/Swapr_dapp',
},
{
label: 'Forum',
Expand Down