Socket
Socket
Sign inDemoInstall

@web3modal/core

Package Overview
Dependencies
Maintainers
11
Versions
374
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@web3modal/core - npm Package Compare versions

Comparing version 4.1.1 to 4.2.0-3f0d3b12.1

9

dist/esm/src/controllers/ApiController.js

@@ -107,2 +107,3 @@ import { subscribeKey as subKey } from 'valtio/utils';

page: '1',
chains: NetworkController.state.caipNetwork?.id,
entries: recommendedEntries,

@@ -133,2 +134,3 @@ include: includeWalletIds?.join(','),

entries,
chains: NetworkController.state.caipNetwork?.id,
include: includeWalletIds?.join(','),

@@ -157,2 +159,3 @@ exclude: exclude.join(',')

search,
chains: NetworkController.state.caipNetwork?.id,
include: includeWalletIds?.join(','),

@@ -169,2 +172,8 @@ exclude: excludeWalletIds?.join(',')

},
async reFetchWallets() {
state.page = 1;
state.wallets = [];
await ApiController.fetchFeaturedWallets();
await ApiController.fetchRecommendedWallets();
},
prefetch() {

@@ -171,0 +180,0 @@ const promises = [

3

dist/esm/src/controllers/ConnectorController.js

@@ -40,4 +40,7 @@ import { subscribeKey as subKey } from 'valtio/utils';

return state.connectors;
},
getConnector(id, rdns) {
return state.connectors.find(c => c.explorerId === id || c.info?.rdns === rdns);
}
};
//# sourceMappingURL=ConnectorController.js.map

@@ -10,2 +10,5 @@ import { ConstantsUtil } from './ConstantsUtil.js';

},
checkCaipNetwork(network, networkName = '') {
return network?.id.toLocaleLowerCase().includes(networkName.toLowerCase());
},
isAndroid() {

@@ -12,0 +15,0 @@ const ua = window.navigator.userAgent.toLowerCase();

@@ -5,2 +5,7 @@ import { describe, expect, it } from 'vitest';

const externalConnector = { id: 'external', type: 'EXTERNAL' };
const metamaskConnector = {
id: 'metamask',
type: 'INJECTED',
info: { rdns: 'io.metamask.com' }
};
describe('ConnectorController', () => {

@@ -20,4 +25,15 @@ it('should have valid default state', () => {

]);
ConnectorController.addConnector(metamaskConnector);
expect(ConnectorController.state.connectors).toEqual([
walletConnectConnector,
externalConnector,
metamaskConnector
]);
});
it('should return the correct connector on getConnector', () => {
expect(ConnectorController.getConnector('walletConnect', '')).toBe(walletConnectConnector);
expect(ConnectorController.getConnector('', 'io.metamask.com')).toBe(metamaskConnector);
expect(ConnectorController.getConnector('unknown', '')).toBeUndefined();
});
});
//# sourceMappingURL=ConnectorController.test.js.map

@@ -35,4 +35,5 @@ import { FetchUtil } from '../utils/FetchUtil.js';

searchWallet({ search }: Pick<ApiGetWalletsRequest, 'search'>): Promise<void>;
reFetchWallets(): Promise<void>;
prefetch(): void;
fetchAnalyticsConfig(): Promise<void>;
};

@@ -13,2 +13,3 @@ import type { Connector, EmailConnector } from '../utils/TypeUtil.js';

getConnectors(): Connector[];
getConnector(id: string, rdns?: string | null): Connector | undefined;
};

@@ -5,2 +5,3 @@ import type { Balance } from '@web3modal/common';

isMobile(): boolean;
checkCaipNetwork(network: CaipNetwork | undefined, networkName?: string): boolean | undefined;
isAndroid(): boolean;

@@ -7,0 +8,0 @@ isIos(): boolean;

2

dist/types/src/utils/TypeUtil.d.ts

@@ -39,3 +39,3 @@ import type { W3mFrameProvider } from '@web3modal/wallet';

}>;
export type SdkVersion = `${'html' | 'react' | 'vue'}-wagmi-${string}` | `${'html' | 'react' | 'vue'}-ethers5-${string}` | `${'html' | 'react' | 'vue'}-ethers-${string}`;
export type SdkVersion = `${'html' | 'react' | 'vue'}-wagmi-${string}` | `${'html' | 'react' | 'vue'}-ethers5-${string}` | `${'html' | 'react' | 'vue'}-ethers-${string}` | `${'html' | 'react' | 'vue'}-solana-${string}`;
export interface BaseError {

@@ -42,0 +42,0 @@ message?: string;

{
"name": "@web3modal/core",
"version": "4.1.1",
"version": "4.2.0-3f0d3b12.1",
"type": "module",

@@ -20,4 +20,4 @@ "main": "./dist/esm/index.js",

"dependencies": {
"@web3modal/common": "4.1.1",
"@web3modal/wallet": "4.1.1",
"@web3modal/common": "4.2.0-3f0d3b12.1",
"@web3modal/wallet": "4.2.0-3f0d3b12.1",
"valtio": "1.11.2"

@@ -24,0 +24,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc