Skip to content

Commit

Permalink
Add the rest of stable wallets
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamj1232 committed May 14, 2024
1 parent 50b7f0f commit 2aaf8e3
Show file tree
Hide file tree
Showing 4 changed files with 208 additions and 171 deletions.
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"dependencies": {
"@safe-global/safe-apps-provider": "^0.18.0",
"@safe-global/safe-apps-sdk": "^8.1.0",
"@web3-onboard/arcana-auth": "^2.0.0-alpha.1",
"@web3-onboard/arcana-auth": "^2.1.0-viem.1",
"@web3-onboard/bitget": "^2.1.0-viem.1",
"@web3-onboard/blocto": "^2.1.0-viem.1",
"@web3-onboard/capsule": "^2.0.3-viem.1",
Expand All @@ -16,13 +16,13 @@
"@web3-onboard/frame": "^2.1.0-viem.1",
"@web3-onboard/frontier": "^2.1.0-viem.1",
"@web3-onboard/gas": "^2.2.0-viem.1",
"@web3-onboard/gnosis": "^2.2.2-alpha.1",
"@web3-onboard/gnosis": "^2.3.0-viem.1",
"@web3-onboard/infinity-wallet": "^2.1.0-viem.1",
"@web3-onboard/injected-wallets": "^2.11.0-viem.4",
"@web3-onboard/keepkey": "^2.3.8-alpha.1",
"@web3-onboard/keystone": "^2.3.8-alpha.1",
"@web3-onboard/ledger": "^2.7.0-viem.1",
"@web3-onboard/magic": "^2.1.7-alpha.1",
"@web3-onboard/magic": "^2.2.0-viem.1",
"@web3-onboard/metamask": "^2.1.0-viem.1",
"@web3-onboard/mew-wallet": "^2.1.0-viem.1",
"@web3-onboard/phantom": "^2.1.0-viem.1",
Expand All @@ -31,13 +31,13 @@
"@web3-onboard/sequence": "^2.1.0-viem.1",
"@web3-onboard/taho": "^2.1.0-viem.1",
"@web3-onboard/torus": "^2.3.0-viem.1",
"@web3-onboard/transaction-preview": "^2.0.9-alpha.1",
"@web3-onboard/transaction-preview": "^2.1.0-viem.1",
"@web3-onboard/trezor": "^2.4.4-alpha.1",
"@web3-onboard/trust": "^2.1.0-viem.1",
"@web3-onboard/uauth": "^2.1.2-alpha.1",
"@web3-onboard/venly": "^2.0.0-alpha.1",
"@web3-onboard/uauth": "^2.2.0-viem.1",
"@web3-onboard/venly": "^2.1.0-viem.1",
"@web3-onboard/walletconnect": "^2.6.0-viem.1",
"@web3-onboard/web3auth": "^2.2.3-alpha.1",
"@web3-onboard/web3auth": "^2.3.0-viem.1",
"@web3-onboard/xdefi": "^2.1.0-viem.1",
"@web3-onboard/zeal": "^2.1.0-viem.1",
"ethers": "^5.5.2",
Expand All @@ -48,7 +48,7 @@
},
"scripts": {
"w3o-latest-prod": "yarn add '@web3-onboard/react' '@web3-onboard/coinbase' '@web3-onboard/transaction-preview' '@web3-onboard/dcent' '@web3-onboard/frontier' '@web3-onboard/fortmatic' '@web3-onboard/frame' '@web3-onboard/gas' '@web3-onboard/gnosis' '@web3-onboard/keepkey' '@web3-onboard/keystone' '@web3-onboard/ledger' '@web3-onboard/infinity-wallet' '@web3-onboard/injected-wallets' '@web3-onboard/magic' '@web3-onboard/phantom' '@web3-onboard/portis' '@web3-onboard/sequence' '@web3-onboard/trezor' '@web3-onboard/trust' '@web3-onboard/torus' '@web3-onboard/taho' '@web3-onboard/web3auth' '@web3-onboard/walletconnect' '@web3-onboard/enkrypt' '@web3-onboard/mew-wallet' '@web3-onboard/xdefi' '@web3-onboard/uauth' '@web3-onboard/zeal' '@web3-onboard/cede-store' '@web3-onboard/venly' '@web3-onboard/blocto' '@web3-onboard/arcana-auth' '@web3-onboard/bitget' '@web3-onboard/metamask' '@web3-onboard/capsule'",
"w3o-latest-alpha": "yarn add '@web3-onboard/react@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/venly@next' '@web3-onboard/blocto@next' '@web3-onboard/arcana-auth@next' '@web3-onboard/bitget@next' '@web3-onboard/metamask@next' '@web3-onboard/capsule@next'",
"w3o-latest-release": "yarn add '@web3-onboard/react@next' '@web3-onboard/coinbase@next' '@web3-onboard/transaction-preview@next' '@web3-onboard/dcent@next' '@web3-onboard/frontier@next' '@web3-onboard/fortmatic@next' '@web3-onboard/frame@next' '@web3-onboard/gas@next' '@web3-onboard/gnosis@next' '@web3-onboard/keepkey@next' '@web3-onboard/keystone@next' '@web3-onboard/ledger@next' '@web3-onboard/infinity-wallet@next' '@web3-onboard/injected-wallets@next' '@web3-onboard/magic@next' '@web3-onboard/phantom@next' '@web3-onboard/portis@next' '@web3-onboard/sequence@next' '@web3-onboard/trezor@next' '@web3-onboard/trust@next' '@web3-onboard/torus@next' '@web3-onboard/taho@next' '@web3-onboard/web3auth@next' '@web3-onboard/walletconnect@next' '@web3-onboard/enkrypt@next' '@web3-onboard/mew-wallet@next' '@web3-onboard/xdefi@next' '@web3-onboard/uauth@next' '@web3-onboard/zeal@next' '@web3-onboard/cede-store@next' '@web3-onboard/venly@next' '@web3-onboard/blocto@next' '@web3-onboard/arcana-auth@next' '@web3-onboard/bitget@next' '@web3-onboard/metamask@next' '@web3-onboard/capsule@next'",
"start": "HTTPS=true react-app-rewired start",
"start-staging": "REACT_APP_API_URL=wss://staging.api.blocknative.com/v0 REACT_APP_STAGING=true HTTPS=true HTTPS=true react-scripts start",
"start-local": "REACT_APP_API_URL=ws://localhost:54100/v0 REACT_APP_STAGING=true HTTPS=true react-scripts start",
Expand Down
9 changes: 5 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,13 @@ const App = () => {

useEffect(() => {
async function getEtherGasFromRPC() {
try{

const customHttpProvider = new ethers.providers.JsonRpcProvider(infuraRPC)
try {
const customHttpProvider = new ethers.providers.JsonRpcProvider(
infuraRPC
)
if (!customHttpProvider) return console.warn('No provider found')
const fee = await customHttpProvider.getFeeData()

// Occasionally gas values are returned undefined
if (
!fee ||
Expand Down
67 changes: 27 additions & 40 deletions src/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import bloctoModule from '@web3-onboard/blocto'
import bitgetModule from '@web3-onboard/bitget'
import metamaskModule from '@web3-onboard/metamask'
import arcanaAuthModule from '@web3-onboard/arcana-auth'
import metamaskSDK from '@web3-onboard/metamask'
import capsuleModule, {
Environment,
OAuthMethod,
Expand Down Expand Up @@ -172,18 +171,6 @@ const arcanaAuth = arcanaAuthModule({
clientID: 'xar_test_c9c3bc702eb13255c58dab0e74cfa859711c13cb'
})

const metamaskSDKWallet = metamaskSDK({
options: {
extensionOnly: false,
i18nOptions: {
enabled: true
},
dappMetadata: {
name: 'Demo Web3Onboard'
}
}
})

const capsule = capsuleModule({
environment: Environment.DEVELOPMENT,
apiKey: '992bbd9146d5de8ad0419f141d9a7ca7',
Expand All @@ -208,33 +195,33 @@ export const initWeb3Onboard = init({
walletConnect,
ledger,
trezor,
// coinbase,
// phantom,
// gnosis,
// trust,
// taho,
// bitget,
// enkrypt,
// infinityWallet,
// mewWallet,
// keepkey,
// keystone,
// magic,
// fortmatic,
// portis,
// torus,
// // dcent,
// sequence,
// uauth,
// web3auth,
// zeal,
// frontier,
// xdefi,
// frameWallet,
// cedeStore,
// venly,
// blocto,
// arcanaAuth,
coinbase,
phantom,
gnosis,
trust,
taho,
bitget,
enkrypt,
infinityWallet,
mewWallet,
keepkey,
keystone,
magic,
fortmatic,
portis,
torus,
// dcent,
sequence,
uauth,
web3auth,
zeal,
frontier,
xdefi,
frameWallet,
cedeStore,
venly,
blocto,
arcanaAuth,
// capsule
],
chains: [
Expand Down
Loading

0 comments on commit 2aaf8e3

Please sign in to comment.