Skip to content

Commit

Permalink
v17.2.0: adds 6963 support for MetaMask, Uniswap and Rainbow
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNe0x1 committed Aug 1, 2024
1 parent c337b5b commit 896ca51
Show file tree
Hide file tree
Showing 16 changed files with 926 additions and 598 deletions.
284 changes: 172 additions & 112 deletions dist/esm/index.evm.js

Large diffs are not rendered by default.

348 changes: 204 additions & 144 deletions dist/esm/index.js

Large diffs are not rendered by default.

82 changes: 47 additions & 35 deletions dist/esm/index.solana.js

Large diffs are not rendered by default.

284 changes: 172 additions & 112 deletions dist/umd/index.evm.js

Large diffs are not rendered by default.

348 changes: 204 additions & 144 deletions dist/umd/index.js

Large diffs are not rendered by default.

82 changes: 47 additions & 35 deletions dist/umd/index.solana.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.evm.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-evm",
"moduleName": "Web3Wallets",
"version": "17.1.0",
"version": "17.2.0",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.evm.js",
"module": "dist/esm/index.evm.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets",
"moduleName": "Web3Wallets",
"version": "17.1.0",
"version": "17.2.0",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.js",
"module": "dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion package.solana.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@depay/web3-wallets-solana",
"moduleName": "Web3Wallets",
"version": "17.1.0",
"version": "17.2.0",
"description": "One-Stop-Shop JavaScript library to integrate various web3 crypto wallets and multiple blockchains at once with a single interface.",
"main": "dist/umd/index.solana.js",
"module": "dist/esm/index.solana.js",
Expand Down
11 changes: 11 additions & 0 deletions src/getWallets.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ const getWallets = async(args)=>{

let drip = (args && typeof args.drip === 'function') ? args.drip : undefined

// eip6963
window['_eip6963Providers'] = {}
const announceProvider = (event)=>{
if(event?.detail?.info?.uuid) {
window['_eip6963Providers'][event?.detail?.info?.uuid] = event.detail.provider
}
}
window.addEventListener("eip6963:announceProvider", announceProvider)
window.dispatchEvent(new Event("eip6963:requestProvider"))
window.removeEventListener("eip6963:announceProvider", announceProvider)

let availableWallets = await Promise.all(

Object.keys(wallets).map(
Expand Down
2 changes: 2 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const supported = [
wallets.TrustEVM,
wallets.Rabby,
wallets.Uniswap,
wallets.Rainbow,
wallets.PhantomEVM,
wallets.BraveEVM,
wallets.OKXEvm,
Expand Down Expand Up @@ -65,6 +66,7 @@ const supported = [
wallets.Solflare,
wallets.Rabby,
wallets.Uniswap,
wallets.Rainbow,
wallets.BraveEVM,
wallets.BraveSVM,
wallets.Opera,
Expand Down
4 changes: 4 additions & 0 deletions src/wallets.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import Opera from './wallets/Opera'
import PhantomEVM from './wallets/Phantom.evm'
import Rabby from './wallets/Rabby'
import Uniswap from './wallets/Uniswap'
import Rainbow from './wallets/Rainbow'
import TokenPocket from './wallets/TokenPocket'
import TrustEVM from './wallets/Trust.evm'
import WalletConnectV2 from './wallets/WalletConnectV2'
Expand All @@ -27,6 +28,7 @@ export default {
TrustEVM,
Rabby,
Uniswap,
Rainbow,
BraveEVM,
Opera,
MagicEdenEVM,
Expand Down Expand Up @@ -103,6 +105,7 @@ import PhantomEVM from './wallets/Phantom.evm'
import PhantomSVM from './wallets/Phantom.svm'
import Rabby from './wallets/Rabby'
import Uniswap from './wallets/Uniswap'
import Rainbow from './wallets/Rainbow'
import SolanaMobileWalletAdapter from './wallets/SolanaMobileWalletAdapter'
import Solflare from './wallets/Solflare'
import TokenPocket from './wallets/TokenPocket'
Expand All @@ -127,6 +130,7 @@ export default {
Solflare,
Rabby,
Uniswap,
Rainbow,
BraveEVM,
BraveSVM,
MagicEdenEVM,
Expand Down
29 changes: 17 additions & 12 deletions src/wallets/MetaMask.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions src/wallets/Rainbow.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 12 additions & 1 deletion src/wallets/Uniswap.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/wallets/WindowEthereum.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ export default class WindowEthereum {
!window?.ethereum?.isBraveWallet &&
// Uniswap Wallet
!window?.ethereum?.isUniswapWallet &&
// Rainbow
!window?.ethereum?.isRainbow &&
// OKX Wallet
!window?.okxwallet
)
Expand Down

0 comments on commit 896ca51

Please sign in to comment.