@daimo/pay 1.7.5 → 1.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.js +29 -18
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -22,7 +22,7 @@ import { WalletSignTransactionError, WalletSendTransactionError } from '@solana/
|
|
|
22
22
|
import { normalize } from 'viem/ens';
|
|
23
23
|
|
|
24
24
|
var name = "@daimo/pay";
|
|
25
|
-
var version = "1.7.
|
|
25
|
+
var version = "1.7.6";
|
|
26
26
|
var author = "Daimo";
|
|
27
27
|
var homepage = "https://pay.daimo.com";
|
|
28
28
|
var license = "BSD-2-Clause license";
|
|
@@ -61,7 +61,7 @@ var keywords = [
|
|
|
61
61
|
"crypto"
|
|
62
62
|
];
|
|
63
63
|
var dependencies = {
|
|
64
|
-
"@daimo/pay-common": "1.7.
|
|
64
|
+
"@daimo/pay-common": "1.7.6",
|
|
65
65
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
66
66
|
"@solana/wallet-adapter-base": "^0.9.23",
|
|
67
67
|
"@solana/wallet-adapter-react": "^0.15.35",
|
|
@@ -536,6 +536,7 @@ const walletConfigs = {
|
|
|
536
536
|
},
|
|
537
537
|
"metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK": {
|
|
538
538
|
name: "MetaMask",
|
|
539
|
+
shortName: "MetaMask",
|
|
539
540
|
icon: jsx(Logos$1.MetaMask, {}),
|
|
540
541
|
iconConnector: jsx(Logos$1.MetaMask, {}),
|
|
541
542
|
iconShouldShrink: true,
|
|
@@ -4874,32 +4875,42 @@ const useWallets = (isMobile) => {
|
|
|
4874
4875
|
const context = usePayContext();
|
|
4875
4876
|
if (isMobile) {
|
|
4876
4877
|
const mobileWallets = [];
|
|
4877
|
-
// Add
|
|
4878
|
-
mobileWallets.push({
|
|
4879
|
-
id: "me.rainbow",
|
|
4880
|
-
...walletConfigs["me.rainbow"],
|
|
4881
|
-
});
|
|
4882
|
-
// Add MetaMask second
|
|
4883
|
-
const metaMaskConnector = connectors.find((c) => c.id === "metaMask");
|
|
4884
|
-
if (metaMaskConnector) {
|
|
4885
|
-
mobileWallets.push({
|
|
4886
|
-
id: metaMaskConnector.id,
|
|
4887
|
-
connector: metaMaskConnector,
|
|
4888
|
-
...walletConfigs["metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK"],
|
|
4889
|
-
});
|
|
4890
|
-
}
|
|
4891
|
-
// Add WalletConnect and other wallets
|
|
4878
|
+
// Add injected wallet (if any) first
|
|
4892
4879
|
connectors.forEach((connector) => {
|
|
4893
4880
|
if (connector.id === "metaMask")
|
|
4894
4881
|
return;
|
|
4882
|
+
if (connector.id === "walletConnect")
|
|
4883
|
+
return;
|
|
4895
4884
|
if (isCoinbaseWalletConnector(connector.id))
|
|
4896
4885
|
return;
|
|
4897
4886
|
mobileWallets.push({
|
|
4898
4887
|
id: connector.id,
|
|
4899
4888
|
connector,
|
|
4900
|
-
|
|
4889
|
+
shortName: connector.name,
|
|
4890
|
+
iconConnector: jsx("img", { src: connector.icon, alt: connector.name }),
|
|
4891
|
+
iconShape: "squircle",
|
|
4901
4892
|
});
|
|
4902
4893
|
});
|
|
4894
|
+
function addIfNotPresent(idList) {
|
|
4895
|
+
if (mobileWallets.find((w) => idList.includes(w.id)))
|
|
4896
|
+
return;
|
|
4897
|
+
const wallet = assertNotNull(walletConfigs[idList], () => `missing ${idList}`);
|
|
4898
|
+
mobileWallets.push({
|
|
4899
|
+
id: idList,
|
|
4900
|
+
...wallet,
|
|
4901
|
+
});
|
|
4902
|
+
}
|
|
4903
|
+
addIfNotPresent("me.rainbow");
|
|
4904
|
+
addIfNotPresent("metaMask, metaMask-io, io.metamask, io.metamask.mobile, metaMaskSDK");
|
|
4905
|
+
// Add WalletConnect last
|
|
4906
|
+
const walletConnectConnector = connectors.find((c) => c.id === "walletConnect");
|
|
4907
|
+
if (walletConnectConnector) {
|
|
4908
|
+
mobileWallets.push({
|
|
4909
|
+
id: walletConnectConnector.id,
|
|
4910
|
+
connector: walletConnectConnector,
|
|
4911
|
+
...walletConfigs[walletConnectConnector.id],
|
|
4912
|
+
});
|
|
4913
|
+
}
|
|
4903
4914
|
return mobileWallets;
|
|
4904
4915
|
}
|
|
4905
4916
|
const wallets = connectors.map((connector) => {
|