Skip to content

Commit

Permalink
v12.8.0: adds MagicEden wallet support + improves wallet support for …
Browse files Browse the repository at this point in the history
…Brave and Backpack
  • Loading branch information
0xNe0x1 committed Feb 25, 2024
1 parent faaf1c3 commit 474f927
Show file tree
Hide file tree
Showing 21 changed files with 249 additions and 189 deletions.
2 changes: 1 addition & 1 deletion dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/react-dialog-stack@8"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/react-shadow-dom@5"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/js-verify-signature-web@3"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-blockchains@9.3.4"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-blockchains@9"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-client@10"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/web3-tokens@10"></script>
<script crossorigin src="https://cdn.jsdelivr.net/npm/@depay/react-token-image@5"></script>
Expand Down
54 changes: 27 additions & 27 deletions dist/esm/index.bundle.js

Large diffs are not rendered by default.

43 changes: 26 additions & 17 deletions dist/esm/index.evm.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ supported.evm = ['ethereum', 'bsc', 'polygon', 'arbitrum', 'optimism', 'base', '
supported.svm = [];
supported.solana = [];

var _wallets$CoinbaseEVM, _wallets$CoinbaseEVM$, _wallets$MetaMask, _wallets$MetaMask$inf, _wallets$PhantomSVM, _wallets$PhantomSVM$i, _wallets$TrustEVM, _wallets$TrustEVM$inf, _wallets$Binance, _wallets$Binance$info, _wallets$CryptoCom, _wallets$CryptoCom$in, _wallets$Coin98EVM, _wallets$Coin98EVM$in, _wallets$Brave, _wallets$Brave$info, _wallets$Rabby, _wallets$Rabby$info, _wallets$Backpack, _wallets$Backpack$inf, _wallets$Glow, _wallets$Glow$info, _wallets$Solflare, _wallets$Solflare$inf, _wallets$HyperPay, _wallets$HyperPay$inf, _wallets$WindowEthere, _wallets$WindowEthere2, _Blockchains$solana, _wallets$WindowSolana, _wallets$WindowSolana2;
var _wallets$CoinbaseEVM, _wallets$CoinbaseEVM$, _wallets$MetaMask, _wallets$MetaMask$inf, _wallets$PhantomSVM, _wallets$PhantomSVM$i, _wallets$TrustEVM, _wallets$TrustEVM$inf, _wallets$Binance, _wallets$Binance$info, _wallets$CryptoCom, _wallets$CryptoCom$in, _wallets$Coin98EVM, _wallets$Coin98EVM$in, _wallets$BraveEVM, _wallets$BraveEVM$inf, _wallets$MagicEdenEVM, _wallets$MagicEdenEVM2, _wallets$Rabby, _wallets$Rabby$info, _wallets$Backpack, _wallets$Backpack$inf, _wallets$Glow, _wallets$Glow$info, _wallets$Solflare, _wallets$Solflare$inf, _wallets$HyperPay, _wallets$HyperPay$inf, _wallets$WindowEthere, _wallets$WindowEthere2, _Blockchains$solana, _wallets$WindowSolana, _wallets$WindowSolana2;
var allWallets = [{
"name": "Coinbase",
"extensions": ["CoinbaseEVM", "CoinbaseSVM"],
Expand All @@ -81,7 +81,7 @@ var allWallets = [{
}
},
"logo": (_wallets$CoinbaseEVM = wallets.CoinbaseEVM) === null || _wallets$CoinbaseEVM === void 0 ? void 0 : (_wallets$CoinbaseEVM$ = _wallets$CoinbaseEVM.info) === null || _wallets$CoinbaseEVM$ === void 0 ? void 0 : _wallets$CoinbaseEVM$.logo,
"blockchains": _toConsumableArray(supported.evm)
"blockchains": _toConsumableArray(supported)
}, {
"name": "MetaMask",
"extension": "MetaMask",
Expand Down Expand Up @@ -134,7 +134,7 @@ var allWallets = [{
}
},
"logo": (_wallets$PhantomSVM = wallets.PhantomSVM) === null || _wallets$PhantomSVM === void 0 ? void 0 : (_wallets$PhantomSVM$i = _wallets$PhantomSVM.info) === null || _wallets$PhantomSVM$i === void 0 ? void 0 : _wallets$PhantomSVM$i.logo,
"blockchains": _toConsumableArray(supported.solana)
"blockchains": _toConsumableArray(supported)
}, {
"name": "Trust Wallet",
"extensions": ["TrustEVM", "TrustSVM"],
Expand All @@ -156,7 +156,7 @@ var allWallets = [{
}
},
"logo": (_wallets$TrustEVM = wallets.TrustEVM) === null || _wallets$TrustEVM === void 0 ? void 0 : (_wallets$TrustEVM$inf = _wallets$TrustEVM.info) === null || _wallets$TrustEVM$inf === void 0 ? void 0 : _wallets$TrustEVM$inf.logo,
"blockchains": _toConsumableArray(supported.evm)
"blockchains": _toConsumableArray(supported)
}, {
"name": "Binance Wallet",
"extension": "Binance",
Expand Down Expand Up @@ -222,12 +222,17 @@ var allWallets = [{
}
},
"logo": (_wallets$Coin98EVM = wallets.Coin98EVM) === null || _wallets$Coin98EVM === void 0 ? void 0 : (_wallets$Coin98EVM$in = _wallets$Coin98EVM.info) === null || _wallets$Coin98EVM$in === void 0 ? void 0 : _wallets$Coin98EVM$in.logo,
"blockchains": _toConsumableArray(supported.evm)
"blockchains": _toConsumableArray(supported)
}, {
"name": "Brave",
"extension": "Brave",
"logo": (_wallets$Brave = wallets.Brave) === null || _wallets$Brave === void 0 ? void 0 : (_wallets$Brave$info = _wallets$Brave.info) === null || _wallets$Brave$info === void 0 ? void 0 : _wallets$Brave$info.logo,
"blockchains": _toConsumableArray(supported.evm)
"extensions": ["BraveEVM", "BraveSVM"],
"logo": (_wallets$BraveEVM = wallets.BraveEVM) === null || _wallets$BraveEVM === void 0 ? void 0 : (_wallets$BraveEVM$inf = _wallets$BraveEVM.info) === null || _wallets$BraveEVM$inf === void 0 ? void 0 : _wallets$BraveEVM$inf.logo,
"blockchains": _toConsumableArray(supported)
}, {
"name": "Magic Eden",
"extensions": ["MagicEdenEVM", "MagicEdenSVM"],
"logo": (_wallets$MagicEdenEVM = wallets.MagicEdenEVM) === null || _wallets$MagicEdenEVM === void 0 ? void 0 : (_wallets$MagicEdenEVM2 = _wallets$MagicEdenEVM.info) === null || _wallets$MagicEdenEVM2 === void 0 ? void 0 : _wallets$MagicEdenEVM2.logo,
"blockchains": _toConsumableArray(supported)
}, {
"name": "Rainbow",
"desktop": {
Expand Down Expand Up @@ -324,15 +329,17 @@ var allWallets = [{
}, {
"name": "Backpack",
"extension": "Backpack",
"desktop": {
"qr": "SolanaPay"
},
"desktop": {},
"mobile": {
"ios": {
"qr": "SolanaPay"
"open": function open() {
return "backpack://ul/v1/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
}
},
"android": {
"qr": "SolanaPay"
"open": function open() {
return "backpack://ul/v1/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
}
}
},
"logo": (_wallets$Backpack = wallets.Backpack) === null || _wallets$Backpack === void 0 ? void 0 : (_wallets$Backpack$inf = _wallets$Backpack.info) === null || _wallets$Backpack$inf === void 0 ? void 0 : _wallets$Backpack$inf.logo,
Expand All @@ -344,21 +351,21 @@ var allWallets = [{
"qr": function qr() {
return window.location.toString();
},
"solanaPay": "true"
"solanaPay": true
},
"mobile": {
"ios": {
"qr": function qr() {
return window.location.toString();
},
"solanaPay": "true"
"solanaPay": true
},
"android": {
"connect": "SolanaMobileWalletAdapter",
"qr": function qr() {
return window.location.toString();
},
"solanaPay": "true"
"solanaPay": true
}
},
"logo": (_wallets$Glow = wallets.Glow) === null || _wallets$Glow === void 0 ? void 0 : (_wallets$Glow$info = _wallets$Glow.info) === null || _wallets$Glow$info === void 0 ? void 0 : _wallets$Glow$info.logo,
Expand Down Expand Up @@ -4806,7 +4813,9 @@ var ClosableProvider = (function (props) {
}, 800); // timeout to prevent beforeunload error in case browser redirects to wallet (e.g. Solana Mobile Wallet Adapter)

return function () {
window.removeEventListener('beforeunload', preventReload);
setTimeout(function () {
window.removeEventListener('beforeunload', preventReload);
}, 800);
};
}, [closable, props.closable]);
return /*#__PURE__*/React.createElement(ClosableContext.Provider, {
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.evm.js.map

Large diffs are not rendered by default.

43 changes: 26 additions & 17 deletions dist/esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ supported.evm = ['ethereum', 'bsc', 'polygon', 'arbitrum', 'optimism', 'base', '
supported.svm = ['solana'];
supported.solana = ['solana'];

var _wallets$CoinbaseEVM, _wallets$CoinbaseEVM$, _wallets$MetaMask, _wallets$MetaMask$inf, _wallets$PhantomSVM, _wallets$PhantomSVM$i, _wallets$TrustEVM, _wallets$TrustEVM$inf, _wallets$Binance, _wallets$Binance$info, _wallets$CryptoCom, _wallets$CryptoCom$in, _wallets$Coin98EVM, _wallets$Coin98EVM$in, _wallets$Brave, _wallets$Brave$info, _wallets$Rabby, _wallets$Rabby$info, _wallets$Backpack, _wallets$Backpack$inf, _wallets$Glow, _wallets$Glow$info, _wallets$Solflare, _wallets$Solflare$inf, _wallets$HyperPay, _wallets$HyperPay$inf, _wallets$WindowEthere, _wallets$WindowEthere2, _Blockchains$solana, _wallets$WindowSolana, _wallets$WindowSolana2;
var _wallets$CoinbaseEVM, _wallets$CoinbaseEVM$, _wallets$MetaMask, _wallets$MetaMask$inf, _wallets$PhantomSVM, _wallets$PhantomSVM$i, _wallets$TrustEVM, _wallets$TrustEVM$inf, _wallets$Binance, _wallets$Binance$info, _wallets$CryptoCom, _wallets$CryptoCom$in, _wallets$Coin98EVM, _wallets$Coin98EVM$in, _wallets$BraveEVM, _wallets$BraveEVM$inf, _wallets$MagicEdenEVM, _wallets$MagicEdenEVM2, _wallets$Rabby, _wallets$Rabby$info, _wallets$Backpack, _wallets$Backpack$inf, _wallets$Glow, _wallets$Glow$info, _wallets$Solflare, _wallets$Solflare$inf, _wallets$HyperPay, _wallets$HyperPay$inf, _wallets$WindowEthere, _wallets$WindowEthere2, _Blockchains$solana, _wallets$WindowSolana, _wallets$WindowSolana2;
var allWallets = [{
"name": "Coinbase",
"extensions": ["CoinbaseEVM", "CoinbaseSVM"],
Expand All @@ -83,7 +83,7 @@ var allWallets = [{
}
},
"logo": (_wallets$CoinbaseEVM = wallets.CoinbaseEVM) === null || _wallets$CoinbaseEVM === void 0 ? void 0 : (_wallets$CoinbaseEVM$ = _wallets$CoinbaseEVM.info) === null || _wallets$CoinbaseEVM$ === void 0 ? void 0 : _wallets$CoinbaseEVM$.logo,
"blockchains": _toConsumableArray(supported.evm)
"blockchains": _toConsumableArray(supported)
}, {
"name": "MetaMask",
"extension": "MetaMask",
Expand Down Expand Up @@ -136,7 +136,7 @@ var allWallets = [{
}
},
"logo": (_wallets$PhantomSVM = wallets.PhantomSVM) === null || _wallets$PhantomSVM === void 0 ? void 0 : (_wallets$PhantomSVM$i = _wallets$PhantomSVM.info) === null || _wallets$PhantomSVM$i === void 0 ? void 0 : _wallets$PhantomSVM$i.logo,
"blockchains": _toConsumableArray(supported.solana)
"blockchains": _toConsumableArray(supported)
}, {
"name": "Trust Wallet",
"extensions": ["TrustEVM", "TrustSVM"],
Expand All @@ -158,7 +158,7 @@ var allWallets = [{
}
},
"logo": (_wallets$TrustEVM = wallets.TrustEVM) === null || _wallets$TrustEVM === void 0 ? void 0 : (_wallets$TrustEVM$inf = _wallets$TrustEVM.info) === null || _wallets$TrustEVM$inf === void 0 ? void 0 : _wallets$TrustEVM$inf.logo,
"blockchains": _toConsumableArray(supported.evm)
"blockchains": _toConsumableArray(supported)
}, {
"name": "Binance Wallet",
"extension": "Binance",
Expand Down Expand Up @@ -224,12 +224,17 @@ var allWallets = [{
}
},
"logo": (_wallets$Coin98EVM = wallets.Coin98EVM) === null || _wallets$Coin98EVM === void 0 ? void 0 : (_wallets$Coin98EVM$in = _wallets$Coin98EVM.info) === null || _wallets$Coin98EVM$in === void 0 ? void 0 : _wallets$Coin98EVM$in.logo,
"blockchains": _toConsumableArray(supported.evm)
"blockchains": _toConsumableArray(supported)
}, {
"name": "Brave",
"extension": "Brave",
"logo": (_wallets$Brave = wallets.Brave) === null || _wallets$Brave === void 0 ? void 0 : (_wallets$Brave$info = _wallets$Brave.info) === null || _wallets$Brave$info === void 0 ? void 0 : _wallets$Brave$info.logo,
"blockchains": _toConsumableArray(supported.evm)
"extensions": ["BraveEVM", "BraveSVM"],
"logo": (_wallets$BraveEVM = wallets.BraveEVM) === null || _wallets$BraveEVM === void 0 ? void 0 : (_wallets$BraveEVM$inf = _wallets$BraveEVM.info) === null || _wallets$BraveEVM$inf === void 0 ? void 0 : _wallets$BraveEVM$inf.logo,
"blockchains": _toConsumableArray(supported)
}, {
"name": "Magic Eden",
"extensions": ["MagicEdenEVM", "MagicEdenSVM"],
"logo": (_wallets$MagicEdenEVM = wallets.MagicEdenEVM) === null || _wallets$MagicEdenEVM === void 0 ? void 0 : (_wallets$MagicEdenEVM2 = _wallets$MagicEdenEVM.info) === null || _wallets$MagicEdenEVM2 === void 0 ? void 0 : _wallets$MagicEdenEVM2.logo,
"blockchains": _toConsumableArray(supported)
}, {
"name": "Rainbow",
"desktop": {
Expand Down Expand Up @@ -326,15 +331,17 @@ var allWallets = [{
}, {
"name": "Backpack",
"extension": "Backpack",
"desktop": {
"qr": "SolanaPay"
},
"desktop": {},
"mobile": {
"ios": {
"qr": "SolanaPay"
"open": function open() {
return "backpack://ul/v1/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
}
},
"android": {
"qr": "SolanaPay"
"open": function open() {
return "backpack://ul/v1/browse/".concat(encodeURIComponent(window.location.toString()), "?ref=").concat(encodeURIComponent(window.location.origin.toString()));
}
}
},
"logo": (_wallets$Backpack = wallets.Backpack) === null || _wallets$Backpack === void 0 ? void 0 : (_wallets$Backpack$inf = _wallets$Backpack.info) === null || _wallets$Backpack$inf === void 0 ? void 0 : _wallets$Backpack$inf.logo,
Expand All @@ -346,21 +353,21 @@ var allWallets = [{
"qr": function qr() {
return window.location.toString();
},
"solanaPay": "true"
"solanaPay": true
},
"mobile": {
"ios": {
"qr": function qr() {
return window.location.toString();
},
"solanaPay": "true"
"solanaPay": true
},
"android": {
"connect": "SolanaMobileWalletAdapter",
"qr": function qr() {
return window.location.toString();
},
"solanaPay": "true"
"solanaPay": true
}
},
"logo": (_wallets$Glow = wallets.Glow) === null || _wallets$Glow === void 0 ? void 0 : (_wallets$Glow$info = _wallets$Glow.info) === null || _wallets$Glow$info === void 0 ? void 0 : _wallets$Glow$info.logo,
Expand Down Expand Up @@ -4808,7 +4815,9 @@ var ClosableProvider = (function (props) {
}, 800); // timeout to prevent beforeunload error in case browser redirects to wallet (e.g. Solana Mobile Wallet Adapter)

return function () {
window.removeEventListener('beforeunload', preventReload);
setTimeout(function () {
window.removeEventListener('beforeunload', preventReload);
}, 800);
};
}, [closable, props.closable]);
return /*#__PURE__*/React.createElement(ClosableContext.Provider, {
Expand Down
2 changes: 1 addition & 1 deletion dist/esm/index.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 474f927

Please sign in to comment.