Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feat_passkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
gomesalexandre committed Nov 5, 2024
2 parents 178643e + 37f5bb4 commit 116c53b
Show file tree
Hide file tree
Showing 296 changed files with 31,878 additions and 20,744 deletions.
3 changes: 3 additions & 0 deletions .env.app
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ REACT_APP_UNCHAINED_COSMOS_WS_URL=wss://api.cosmos.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_HTTP_URL=https://api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_WS_URL=wss://api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_V1_HTTP_URL=https://api.thorchain-v1.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_HTTP_URL=https://api.solana.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_WS_URL=wss://api.solana.shapeshift.com

# nodes
REACT_APP_ETHEREUM_NODE_URL=https://api.ethereum.shapeshift.com/api/v1/jsonrpc
Expand All @@ -48,6 +50,7 @@ REACT_APP_ARBITRUM_NODE_URL=https://api.arbitrum.shapeshift.com/api/v1/jsonrpc
REACT_APP_ARBITRUM_NOVA_NODE_URL=https://api.arbitrum-nova.shapeshift.com/api/v1/jsonrpc
REACT_APP_BASE_NODE_URL=https://api.base.shapeshift.com/api/v1/jsonrpc
REACT_APP_THORCHAIN_NODE_URL=https://daemon.thorchain.shapeshift.com
REACT_APP_SOLANA_NODE_URL=https://api.solana.shapeshift.com/api/v1/jsonrpc

# thorchain
REACT_APP_MIDGARD_URL=https://indexer.thorchain.shapeshift.com/v2
34 changes: 14 additions & 20 deletions .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ REACT_APP_FEATURE_POLYGON=true
REACT_APP_FEATURE_GNOSIS=true
REACT_APP_FEATURE_ARBITRUM=true
REACT_APP_FEATURE_ARBITRUM_NOVA=false
REACT_APP_FEATURE_SOLANA=false
REACT_APP_FEATURE_SOLANA=true
REACT_APP_FEATURE_BASE=true
REACT_APP_FEATURE_OPTIMISM=true
REACT_APP_FEATURE_JAYPEGZ=true
Expand All @@ -16,7 +16,6 @@ REACT_APP_FEATURE_SAVERS_VAULTS_DEPOSIT=true
REACT_APP_FEATURE_SAVERS_VAULTS_WITHDRAW=true
REACT_APP_FEATURE_WALLET_CONNECT_TO_DAPPS_V2=true
REACT_APP_FEATURE_WALLET_CONNECT_TO_DAPPS=true
REACT_APP_FEATURE_WHEREVER=true
REACT_APP_FEATURE_YAT=true
REACT_APP_FEATURE_NFT_METADATA=false
REACT_APP_FEATURE_CHATWOOT=false
Expand All @@ -42,10 +41,16 @@ REACT_APP_FEATURE_USDT_APPROVAL_RESET=true
REACT_APP_FEATURE_PORTALS_SWAPPER=true
REACT_APP_FEATURE_RUNEPOOL=true
REACT_APP_FEATURE_MARKETS=true
REACT_APP_FEATURE_FOX_PAGE=false
REACT_APP_FEATURE_FOX_PAGE_RFOX=false
REACT_APP_FEATURE_FOX_PAGE=true
REACT_APP_FEATURE_FOX_PAGE_RFOX=true
REACT_APP_FEATURE_FOX_PAGE_FOX_SECTION=true
REACT_APP_FEATURE_FOX_PAGE_FOX_FARMING_SECTION=true
REACT_APP_FEATURE_FOX_PAGE_GOVERNANCE=true
REACT_APP_FEATURE_PHANTOM_WALLET=true
REACT_APP_FEATURE_ZRX_PERMIT2=true
REACT_APP_FEATURE_PUBLIC_TRADE_ROUTE=false
REACT_APP_FEATURE_THOR_FREE_FEES=true
REACT_APP_FEATURE_LIMIT_ORDERS=false

# absolute URL prefix
REACT_APP_ABSOLUTE_URL_PREFIX=https://app.shapeshift.com
Expand All @@ -58,7 +63,6 @@ REACT_APP_FEATURE_READ_ONLY_ASSETS=true
# swapper feature flags - other .env files will override these
REACT_APP_FEATURE_COWSWAP=true
REACT_APP_FEATURE_LIFI_SWAP=true
REACT_APP_FEATURE_ONE_INCH=false
REACT_APP_FEATURE_THOR_SWAP=true
REACT_APP_FEATURE_THOR_SWAP_STREAMING_SWAPS=true
REACT_APP_FEATURE_ZRX_SWAP=true
Expand Down Expand Up @@ -94,15 +98,8 @@ REACT_APP_COINGECKO_API_KEY=CG-we5Z4KbdYMCgMUVAqDjQMWfc
REACT_APP_EXCHANGERATEHOST_BASE_URL=https://api.exchangerate.host
REACT_APP_EXCHANGERATEHOST_API_KEY=8f7515ffddef9d3e449b45f93108ca4d

# unstoppable domains resolution
REACT_APP_ALCHEMY_API_KEY=3DnVf4ZoxBk0W0TZcipqAhmATm7uc1vE

# Alchemy API keys - to be used either with Alchemy SDK or directly with the REST endpoints
REACT_APP_ALCHEMY_POLYGON_JAYPEGS_API_KEY=OqVQS8M_NzYeV--9xHZjKEIscrZOADzp
REACT_APP_ALCHEMY_ETHEREUM_JAYPEGS_API_KEY=yh6GF21GaU8wlvEB4wYp7ssXhCU76gOx
REACT_APP_ALCHEMY_OPTIMISM_JAYPEGS_API_KEY=K03vX5rMZeGmF2V9U-SCsrCeeVnr8qmO
REACT_APP_ALCHEMY_ARBITRUM_JAYPEGS_API_KEY=DqH3kvkDIq8qwit_G8TM4DFQe5s5TKdq
REACT_APP_ALCHEMY_BASE_JAYPEGS_API_KEY=MLYU1OYYxF5PCANjGVFs8fIlGNVZAbtO
# Alchemy API key - to be used either with Alchemy SDK or directly with the REST endpoints
REACT_APP_ALCHEMY_API_KEY=anoTMcIc2hbPUxri37h4DeuUwg2p5_xZ

# Base URLs for NFTs - to be used with the REST endpoints above.
# SDK usage is usually preferred, but not all endoints have SDK wrappers around them.
Expand Down Expand Up @@ -142,9 +139,6 @@ REACT_APP_KEEPKEY_UPDATER_BASE_URL=https://github.com/keepkey/keepkey-updater/re
# etherscan
REACT_APP_ETHERSCAN_API_KEY=XT8BI6VDYUGD9675X861ATHZNK3AN6HRMF

# wherever
REACT_APP_WHEREVER_PARTNER_KEY=00da1f18-3bba-4b71-824c-21e5ed772dfa

# WalletConnect
REACT_APP_WALLET_CONNECT_TO_DAPPS_PROJECT_ID=a28cc4392a374056df13372b666190a0
REACT_APP_WALLET_CONNECT_WALLET_PROJECT_ID=f58c0242def84c3b9befe9b1e6086bbd
Expand All @@ -162,9 +156,6 @@ REACT_APP_FEATURE_COVALENT_JAYPEGS=true
REACT_APP_PORTALS_BASE_URL=https://api.portals.fi
REACT_APP_PORTALS_API_KEY=bbc3ba7e-5f2a-4a0a-bbbc-22509944686c

#oneinch
REACT_APP_ONE_INCH_API_URL=https://api-shapeshift.1inch.io/v5.0

REACT_APP_SNAP_ID=npm:@shapeshiftoss/metamask-snaps
REACT_APP_SNAP_VERSION=1.0.9
# REACT_APP_SNAP_ID=local:http://localhost:9000
Expand All @@ -177,3 +168,6 @@ REACT_APP_SENTRY_DSN_URL=https://c612e7f4ef0637e4add433a2f4683aa8@o4507174990905

# Zerion
REACT_APP_ZERION_BASE_URL=https://api.proxy.shapeshift.com/api/v1/zerion

# 0x
REACT_APP_ZRX_BASE_URL=https://api.proxy.shapeshift.com/api/v1/zrx/
12 changes: 8 additions & 4 deletions .env.dev
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# feature flags
REACT_APP_FEATURE_SOLANA=true
REACT_APP_FEATURE_FOX_PAGE=true
REACT_APP_FEATURE_FOX_PAGE_RFOX=true
REACT_APP_FEATURE_FOX_PAGE_FOX_SECTION=true
REACT_APP_FEATURE_PUBLIC_TRADE_ROUTE=false
REACT_APP_FEATURE_LIMIT_ORDERS=true

# logging
REACT_APP_REDUX_WINDOW=false
Expand Down Expand Up @@ -42,6 +40,8 @@ REACT_APP_UNCHAINED_COSMOS_WS_URL=wss://dev-api.cosmos.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_HTTP_URL=https://dev-api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_WS_URL=wss://dev-api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_V1_HTTP_URL=https://dev-api.thorchain-v1.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_HTTP_URL=https://dev-api.solana.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_WS_URL=wss://dev-api.solana.shapeshift.com

# nodes
REACT_APP_ETHEREUM_NODE_URL=https://dev-api.ethereum.shapeshift.com/api/v1/jsonrpc
Expand All @@ -54,6 +54,10 @@ REACT_APP_ARBITRUM_NODE_URL=https://dev-api.arbitrum.shapeshift.com/api/v1/jsonr
REACT_APP_ARBITRUM_NOVA_NODE_URL=https://dev-api.arbitrum-nova.shapeshift.com/api/v1/jsonrpc
REACT_APP_BASE_NODE_URL=https://dev-api.base.shapeshift.com/api/v1/jsonrpc
REACT_APP_THORCHAIN_NODE_URL=https://dev-daemon.thorchain.shapeshift.com
REACT_APP_SOLANA_NODE_URL=https://dev-api.solana.shapeshift.com/api/v1/jsonrpc

# thorchain
REACT_APP_MIDGARD_URL=https://dev-indexer.thorchain.shapeshift.com/v2

# 0x
REACT_APP_ZRX_BASE_URL=https://dev-api.proxy.shapeshift.com/api/v1/zrx/
4 changes: 4 additions & 0 deletions .env.develop
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# feature flags
REACT_APP_FEATURE_LIMIT_ORDERS=true
REACT_APP_FEATURE_PUBLIC_TRADE_ROUTE=false

# mixpanel
REACT_APP_MIXPANEL_TOKEN=1c1369f6ea23a6404bac41b42817cc4b
Expand Down Expand Up @@ -36,6 +37,8 @@ REACT_APP_UNCHAINED_COSMOS_WS_URL=wss://dev-api.cosmos.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_HTTP_URL=https://dev-api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_WS_URL=wss://dev-api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_V1_HTTP_URL=https://dev-api.thorchain-v1.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_HTTP_URL=https://dev-api.solana.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_WS_URL=wss://dev-api.solana.shapeshift.com

# nodes
REACT_APP_ETHEREUM_NODE_URL=https://dev-api.ethereum.shapeshift.com/api/v1/jsonrpc
Expand All @@ -48,6 +51,7 @@ REACT_APP_ARBITRUM_NODE_URL=https://dev-api.arbitrum.shapeshift.com/api/v1/jsonr
REACT_APP_ARBITRUM_NOVA_NODE_URL=https://dev-api.arbitrum-nova.shapeshift.com/api/v1/jsonrpc
REACT_APP_BASE_NODE_URL=https://dev-api.base.shapeshift.com/api/v1/jsonrpc
REACT_APP_THORCHAIN_NODE_URL=https://dev-daemon.thorchain.shapeshift.com
REACT_APP_SOLANA_NODE_URL=https://dev-api.solana.shapeshift.com/api/v1/jsonrpc

# thorchain
REACT_APP_MIDGARD_URL=https://dev-indexer.thorchain.shapeshift.com/v2
3 changes: 3 additions & 0 deletions .env.private
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ REACT_APP_UNCHAINED_COSMOS_WS_URL=wss://api.cosmos.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_HTTP_URL=https://api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_WS_URL=wss://api.thorchain.shapeshift.com
REACT_APP_UNCHAINED_THORCHAIN_V1_HTTP_URL=https://api.thorchain-v1.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_HTTP_URL=https://api.solana.shapeshift.com
REACT_APP_UNCHAINED_SOLANA_WS_URL=wss://api.solana.shapeshift.com

# nodes
REACT_APP_ETHEREUM_NODE_URL=https://api.ethereum.shapeshift.com/api/v1/jsonrpc
Expand All @@ -46,6 +48,7 @@ REACT_APP_ARBITRUM_NODE_URL=https://api.arbitrum.shapeshift.com/api/v1/jsonrpc
REACT_APP_ARBITRUM_NOVA_NODE_URL=https://api.arbitrum-nova.shapeshift.com/api/v1/jsonrpc
REACT_APP_BASE_NODE_URL=https://api.base.shapeshift.com/api/v1/jsonrpc
REACT_APP_THORCHAIN_NODE_URL=https://daemon.thorchain.shapeshift.com
REACT_APP_SOLANA_NODE_URL=https://api.solana.shapeshift.com/api/v1/jsonrpc

# thorchain
REACT_APP_MIDGARD_URL=https://indexer.thorchain.shapeshift.com/v2
31 changes: 15 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
"@formatjs/intl-locale": "^3.0.2",
"@formatjs/intl-numberformat": "^8.10.3",
"@formatjs/intl-pluralrules": "^5.2.14",
"@json-rpc-tools/utils": "^1.7.6",
"@keepkey/hdwallet-keepkey-rest": "1.40.42",
"@keepkey/keepkey-sdk": "0.2.57",
"@ledgerhq/hw-transport-webusb": "^6.29.2",
Expand All @@ -94,18 +95,18 @@
"@shapeshiftoss/caip": "workspace:^",
"@shapeshiftoss/chain-adapters": "workspace:^",
"@shapeshiftoss/errors": "workspace:^",
"@shapeshiftoss/hdwallet-coinbase": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-core": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-keepkey": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-keplr": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-ledger": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-native": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-native-vault": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-phantom": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.55.11-mipd.5",
"@shapeshiftoss/hdwallet-coinbase": "1.55.11",
"@shapeshiftoss/hdwallet-core": "1.55.11",
"@shapeshiftoss/hdwallet-keepkey": "1.55.11",
"@shapeshiftoss/hdwallet-keepkey-webusb": "1.55.11",
"@shapeshiftoss/hdwallet-keplr": "1.55.11",
"@shapeshiftoss/hdwallet-ledger": "1.55.11",
"@shapeshiftoss/hdwallet-ledger-webusb": "1.55.11",
"@shapeshiftoss/hdwallet-metamask-multichain": "1.55.11",
"@shapeshiftoss/hdwallet-native": "1.55.11",
"@shapeshiftoss/hdwallet-native-vault": "1.55.11",
"@shapeshiftoss/hdwallet-phantom": "1.55.11",
"@shapeshiftoss/hdwallet-walletconnectv2": "1.55.11",
"@shapeshiftoss/swapper": "workspace:^",
"@shapeshiftoss/types": "workspace:^",
"@shapeshiftoss/unchained-client": "workspace:^",
Expand All @@ -124,7 +125,6 @@
"@walletconnect/core": "^2.15.1",
"@walletconnect/utils": "^2.15.1",
"@walletconnect/web3wallet": "^1.14.1",
"@wherever/react-notification-feed": "^0.4.4",
"alchemy-sdk": "^3.4.1",
"allsettled-polyfill": "^1.0.4",
"axios": "^1.7.4",
Expand Down Expand Up @@ -252,7 +252,7 @@
"@walletconnect/web3-provider": "^1.8.0",
"@welldone-software/why-did-you-render": "^7.0.1",
"assert": "^2.0.0",
"axios-retry": "^4.0.0",
"axios-retry": "^4.5.0",
"chalk": "5.3.0",
"circular-dependency-plugin": "^5.2.2",
"cli-progress": "^3.12.0",
Expand All @@ -268,7 +268,7 @@
"eslint-plugin-simple-import-sort": "^10.0.0",
"fast-json-stable-stringify": "^2.1.0",
"happy-dom": "^12.10.3",
"http-proxy-middleware": "^2.0.6",
"http-proxy-middleware": "^2.0.7",
"inquirer": "8.2.4",
"jscodeshift": "^0.15.2",
"limiter": "^2.1.0",
Expand Down Expand Up @@ -313,7 +313,6 @@
"react-scripts/workbox-webpack-plugin": "^7.1.0",
"p-queue": "^6.6.2",
"web3": "4.2.1-dev.a0d6730.0",
"@wherever/react-notification-feed/wagmi": "^0.10.12",
"react-scripts@^5.0.1": "patch:react-scripts@npm%3A5.0.1#./.yarn/patches/react-scripts-npm-5.0.1-d06bd2d5ad.patch"
}
}
13 changes: 10 additions & 3 deletions packages/caip/src/adapters/banxa/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import entries from 'lodash/entries'
import toLower from 'lodash/toLower'

import type { AssetId } from '../../assetId/assetId'
import type { ChainId } from '../../chainId/chainId'
Expand All @@ -24,6 +23,8 @@ import {
optimismChainId,
polygonAssetId,
polygonChainId,
solanaChainId,
solAssetId,
thorchainAssetId,
thorchainChainId,
} from '../../constants'
Expand All @@ -44,6 +45,7 @@ const AssetIdToBanxaTickerMap = {
[baseAssetId]: 'eth',
[polygonAssetId]: 'matic', // TODO: check that Banxa update this to POL upstream
[thorchainAssetId]: 'rune',
[solAssetId]: 'sol',
'eip155:1/erc20:0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9': 'aave',
'eip155:1/erc20:0xbb0e17ef65f82ab018d8edd776e8dd940327b28b': 'axs',
'eip155:1/erc20:0x4d224452801aced8b2f0aebe155379bb5d594381': 'ape',
Expand Down Expand Up @@ -92,6 +94,10 @@ const AssetIdToBanxaTickerMap = {
'eip155:42161/erc20:0xaf88d065e77c8cc2239327c5edb3a432268e5831': 'usdc',
'eip155:43114/erc20:0x9702230a8ea53601f5cd2dc00fdbc13d4df4a8c7': 'usdt',
'eip155:43114/erc20:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e': 'usdc',
'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v':
'usdc',
'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp/token:Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB':
'usdt',
} as Record<AssetId, string>

export const getSupportedBanxaAssets = () =>
Expand All @@ -100,8 +106,8 @@ export const getSupportedBanxaAssets = () =>
ticker,
}))

export const assetIdToBanxaTicker = (assetId: string): string | undefined =>
AssetIdToBanxaTickerMap[toLower(assetId)]
export const assetIdToBanxaTicker = (assetId: AssetId): string | undefined =>
AssetIdToBanxaTickerMap[assetId]

/**
* map ChainIds to Banxa blockchain codes (ETH, BTC, COSMOS),
Expand All @@ -123,6 +129,7 @@ const chainIdToBanxaBlockchainCodeMap: Record<ChainId, string> = {
[arbitrumChainId]: 'ARB',
[baseChainId]: 'BASE',
[thorchainChainId]: 'THORCHAIN',
[solanaChainId]: 'SOL',
} as const

/**
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit 116c53b

Please sign in to comment.