@layerswap/wallet-starknet 1.1.2 → 1.2.1

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.
@@ -92,7 +92,7 @@ const StarknetProvider = ({ children, walletConnectConfigs }) => {
92
92
  defaultConnectors.push(new InjectedConnector({ options: { id: "xverse" } }));
93
93
  }
94
94
  if ((isAndroid || isIOS) && !defaultConnectors.some(c => c.id === "braavos")) {
95
- const starknet = (await import('get-starknet-core')).default;
95
+ const starknet = (await import('@starknet-io/get-starknet-core')).default;
96
96
  const discoverWallets = (await starknet.getDiscoveryWallets()).filter(w => {
97
97
  return (isAndroid && w.downloads["android"]) || (isIOS && w.downloads["ios"]);
98
98
  });
@@ -96,7 +96,9 @@ export default function useStarknetConnection({ networks }) {
96
96
  id: connector.id,
97
97
  icon: resolveStarknetWalletIcon({ icon: connector.icon }),
98
98
  type: connector?.["_wallet"] ? 'injected' : 'other',
99
- installUrl: connector?.["_wallet"] ? undefined : connectorsConfigs.find(c => c.id === connector.id)?.installLink,
99
+ installUrl: connectorsConfigs.find(c => c.id === connector.id)?.installLink,
100
+ extensionNotFound: !connector?.["_wallet"] && connectorsConfigs.find(c => c.id === connector.id)?.installLink !== undefined,
101
+ providerName: name
100
102
  };
101
103
  });
102
104
  const switchAccount = async (connector, address) => {
@@ -1,3 +1,3 @@
1
1
  export const resolveStarknetWalletIcon = ({ icon }) => {
2
- return typeof icon === 'string' ? icon : (icon.light.startsWith('data:') ? icon.light : `data:image/svg+xml;base64,${btoa(icon.light.replaceAll('currentColor', '#FFFFFF'))}`);
2
+ return typeof icon === 'string' ? icon : (icon.dark.startsWith('data:') ? icon.dark : `data:image/svg+xml;base64,${btoa(icon.dark.replaceAll('currentColor', '#FFFFFF'))}`);
3
3
  };