@bit-buccaneers/wallet-abstraction 0.0.7 → 0.0.9

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/dist/dev.js CHANGED
@@ -174,7 +174,7 @@ var EVM_WALLET_ID_MAP = {
174
174
  coinbaseWalletSDK: "coinbase",
175
175
  "io.rabby": "rabby",
176
176
  "me.rainbow": "rainbow",
177
- "com.exodus.wallet": "exodus",
177
+ "com.exodus.web3-wallet": "exodus",
178
178
  walletConnect: "walletconnect"
179
179
  };
180
180
  var SOLANA_WALLET_ID_MAP = {
@@ -1045,6 +1045,9 @@ var EVM_FALLBACK_CONNECTORS = [
1045
1045
  { id: "rainbow", create: createRainbowEvmMobileConnector },
1046
1046
  { id: "exodus", create: createExodusEvmMobileConnector }
1047
1047
  ];
1048
+ var cleanupWalletLocalStorage = () => {
1049
+ Object.keys(window.localStorage).filter((key) => key.startsWith("wagmi.")).forEach((key) => window.localStorage.removeItem(key));
1050
+ };
1048
1051
  var getEvmConnectors = () => {
1049
1052
  const wagmiConnectors = getConnectors(getEvmConfig());
1050
1053
  const connectors = wagmiConnectors.map((c) => ({
@@ -1061,6 +1064,7 @@ var getEvmConnectors = () => {
1061
1064
  return connectedResult(result.accounts[0], { chainId: result.chainId });
1062
1065
  },
1063
1066
  disconnect: async () => {
1067
+ cleanupWalletLocalStorage();
1064
1068
  await disconnect(getEvmConfig());
1065
1069
  },
1066
1070
  signMessage: async (message) => {
@@ -1212,7 +1216,9 @@ var SOLANA_FALLBACK_CONNECTORS = isMobile() ? [
1212
1216
  var getSolanaWallets = () => {
1213
1217
  const { get } = getWallets();
1214
1218
  const wallets = get();
1215
- const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).map(createSolanaConnector);
1219
+ const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
1220
+ return w.constructor.name !== "SolflareMetaMaskWallet";
1221
+ }).map(createSolanaConnector);
1216
1222
  addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
1217
1223
  return connectors;
1218
1224
  };
package/dist/dev.jsx CHANGED
@@ -169,7 +169,7 @@ var EVM_WALLET_ID_MAP = {
169
169
  coinbaseWalletSDK: "coinbase",
170
170
  "io.rabby": "rabby",
171
171
  "me.rainbow": "rainbow",
172
- "com.exodus.wallet": "exodus",
172
+ "com.exodus.web3-wallet": "exodus",
173
173
  walletConnect: "walletconnect"
174
174
  };
175
175
  var SOLANA_WALLET_ID_MAP = {
@@ -1056,6 +1056,9 @@ var EVM_FALLBACK_CONNECTORS = [
1056
1056
  { id: "rainbow", create: createRainbowEvmMobileConnector },
1057
1057
  { id: "exodus", create: createExodusEvmMobileConnector }
1058
1058
  ];
1059
+ var cleanupWalletLocalStorage = () => {
1060
+ Object.keys(window.localStorage).filter((key) => key.startsWith("wagmi.")).forEach((key) => window.localStorage.removeItem(key));
1061
+ };
1059
1062
  var getEvmConnectors = () => {
1060
1063
  const wagmiConnectors = getConnectors(getEvmConfig());
1061
1064
  const connectors = wagmiConnectors.map((c) => ({
@@ -1072,6 +1075,7 @@ var getEvmConnectors = () => {
1072
1075
  return connectedResult(result.accounts[0], { chainId: result.chainId });
1073
1076
  },
1074
1077
  disconnect: async () => {
1078
+ cleanupWalletLocalStorage();
1075
1079
  await disconnect(getEvmConfig());
1076
1080
  },
1077
1081
  signMessage: async (message) => {
@@ -1233,7 +1237,9 @@ var SOLANA_FALLBACK_CONNECTORS = isMobile() ? [
1233
1237
  var getSolanaWallets = () => {
1234
1238
  const { get } = getWallets();
1235
1239
  const wallets = get();
1236
- const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).map(createSolanaConnector);
1240
+ const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
1241
+ return w.constructor.name !== "SolflareMetaMaskWallet";
1242
+ }).map(createSolanaConnector);
1237
1243
  addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
1238
1244
  return connectors;
1239
1245
  };
package/dist/index.js CHANGED
@@ -174,7 +174,7 @@ var EVM_WALLET_ID_MAP = {
174
174
  coinbaseWalletSDK: "coinbase",
175
175
  "io.rabby": "rabby",
176
176
  "me.rainbow": "rainbow",
177
- "com.exodus.wallet": "exodus",
177
+ "com.exodus.web3-wallet": "exodus",
178
178
  walletConnect: "walletconnect"
179
179
  };
180
180
  var SOLANA_WALLET_ID_MAP = {
@@ -1040,6 +1040,9 @@ var EVM_FALLBACK_CONNECTORS = [
1040
1040
  { id: "rainbow", create: createRainbowEvmMobileConnector },
1041
1041
  { id: "exodus", create: createExodusEvmMobileConnector }
1042
1042
  ];
1043
+ var cleanupWalletLocalStorage = () => {
1044
+ Object.keys(window.localStorage).filter((key) => key.startsWith("wagmi.")).forEach((key) => window.localStorage.removeItem(key));
1045
+ };
1043
1046
  var getEvmConnectors = () => {
1044
1047
  const wagmiConnectors = getConnectors(getEvmConfig());
1045
1048
  const connectors = wagmiConnectors.map((c) => ({
@@ -1056,6 +1059,7 @@ var getEvmConnectors = () => {
1056
1059
  return connectedResult(result.accounts[0], { chainId: result.chainId });
1057
1060
  },
1058
1061
  disconnect: async () => {
1062
+ cleanupWalletLocalStorage();
1059
1063
  await disconnect(getEvmConfig());
1060
1064
  },
1061
1065
  signMessage: async (message) => {
@@ -1207,7 +1211,9 @@ var SOLANA_FALLBACK_CONNECTORS = isMobile() ? [
1207
1211
  var getSolanaWallets = () => {
1208
1212
  const { get } = getWallets();
1209
1213
  const wallets = get();
1210
- const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).map(createSolanaConnector);
1214
+ const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
1215
+ return w.constructor.name !== "SolflareMetaMaskWallet";
1216
+ }).map(createSolanaConnector);
1211
1217
  addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
1212
1218
  return connectors;
1213
1219
  };
package/dist/index.jsx CHANGED
@@ -169,7 +169,7 @@ var EVM_WALLET_ID_MAP = {
169
169
  coinbaseWalletSDK: "coinbase",
170
170
  "io.rabby": "rabby",
171
171
  "me.rainbow": "rainbow",
172
- "com.exodus.wallet": "exodus",
172
+ "com.exodus.web3-wallet": "exodus",
173
173
  walletConnect: "walletconnect"
174
174
  };
175
175
  var SOLANA_WALLET_ID_MAP = {
@@ -1051,6 +1051,9 @@ var EVM_FALLBACK_CONNECTORS = [
1051
1051
  { id: "rainbow", create: createRainbowEvmMobileConnector },
1052
1052
  { id: "exodus", create: createExodusEvmMobileConnector }
1053
1053
  ];
1054
+ var cleanupWalletLocalStorage = () => {
1055
+ Object.keys(window.localStorage).filter((key) => key.startsWith("wagmi.")).forEach((key) => window.localStorage.removeItem(key));
1056
+ };
1054
1057
  var getEvmConnectors = () => {
1055
1058
  const wagmiConnectors = getConnectors(getEvmConfig());
1056
1059
  const connectors = wagmiConnectors.map((c) => ({
@@ -1067,6 +1070,7 @@ var getEvmConnectors = () => {
1067
1070
  return connectedResult(result.accounts[0], { chainId: result.chainId });
1068
1071
  },
1069
1072
  disconnect: async () => {
1073
+ cleanupWalletLocalStorage();
1070
1074
  await disconnect(getEvmConfig());
1071
1075
  },
1072
1076
  signMessage: async (message) => {
@@ -1228,7 +1232,9 @@ var SOLANA_FALLBACK_CONNECTORS = isMobile() ? [
1228
1232
  var getSolanaWallets = () => {
1229
1233
  const { get } = getWallets();
1230
1234
  const wallets = get();
1231
- const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).map(createSolanaConnector);
1235
+ const connectors = wallets.filter(isWalletAdapterCompatibleStandardWallet).filter((w) => {
1236
+ return w.constructor.name !== "SolflareMetaMaskWallet";
1237
+ }).map(createSolanaConnector);
1232
1238
  addFallbackConnectors(connectors, SOLANA_FALLBACK_CONNECTORS);
1233
1239
  return connectors;
1234
1240
  };
@@ -1,2 +1,3 @@
1
1
  import type { EvmWalletConnector } from './types';
2
+ export declare const cleanupWalletLocalStorage: () => void;
2
3
  export declare const getEvmConnectors: () => EvmWalletConnector[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bit-buccaneers/wallet-abstraction",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "Solid.js web3 wallet abstraction for EVM and Solana",
5
5
  "license": "MIT",
6
6
  "author": "Bit Buccaneers",