Socket
Socket
Sign inDemoInstall

@metamask/controllers

Package Overview
Dependencies
295
Maintainers
7
Versions
78
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 30.1.0 to 30.2.0

4

dist/constants.d.ts

@@ -0,1 +1,2 @@

import { NetworkType } from './network/NetworkController';
export declare const MAINNET = "mainnet";

@@ -29,4 +30,7 @@ export declare const RPC = "rpc";

};
export declare const TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL: {
[K in NetworkType]: string;
};
export declare const OPENSEA_PROXY_URL = "https://proxy.metaswap.codefi.network/opensea/v1/api/v1";
export declare const OPENSEA_API_URL = "https://api.opensea.io/api/v1";
export declare const OPENSEA_TEST_API_URL = "https://testnets-api.opensea.io/api/v1";
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OPENSEA_TEST_API_URL = exports.OPENSEA_API_URL = exports.OPENSEA_PROXY_URL = exports.TESTNET_TICKER_SYMBOLS = exports.ASSET_TYPES = exports.GWEI = exports.ERC1155_TOKEN_RECEIVER_INTERFACE_ID = exports.ERC1155_METADATA_URI_INTERFACE_ID = exports.ERC1155_INTERFACE_ID = exports.ERC721_ENUMERABLE_INTERFACE_ID = exports.ERC721_METADATA_INTERFACE_ID = exports.ERC721_INTERFACE_ID = exports.ERC20 = exports.ERC1155 = exports.ERC721 = exports.GANACHE_CHAIN_ID = exports.RINKEBY_CHAIN_ID = exports.IPFS_DEFAULT_GATEWAY_URL = exports.FALL_BACK_VS_CURRENCY = exports.RPC = exports.MAINNET = void 0;
exports.OPENSEA_TEST_API_URL = exports.OPENSEA_API_URL = exports.OPENSEA_PROXY_URL = exports.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL = exports.TESTNET_TICKER_SYMBOLS = exports.ASSET_TYPES = exports.GWEI = exports.ERC1155_TOKEN_RECEIVER_INTERFACE_ID = exports.ERC1155_METADATA_URI_INTERFACE_ID = exports.ERC1155_INTERFACE_ID = exports.ERC721_ENUMERABLE_INTERFACE_ID = exports.ERC721_METADATA_INTERFACE_ID = exports.ERC721_INTERFACE_ID = exports.ERC20 = exports.ERC1155 = exports.ERC721 = exports.GANACHE_CHAIN_ID = exports.RINKEBY_CHAIN_ID = exports.IPFS_DEFAULT_GATEWAY_URL = exports.FALL_BACK_VS_CURRENCY = exports.RPC = exports.MAINNET = void 0;
exports.MAINNET = 'mainnet';

@@ -38,2 +38,14 @@ exports.RPC = 'rpc';

};
// TYPED NetworkType TICKER SYMBOLS
exports.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL = {
rinkeby: 'RinkebyETH',
goerli: 'GoerliETH',
ropsten: 'RopstenETH',
kovan: 'KovanETH',
mainnet: '',
rpc: '',
localhost: '',
optimism: '',
optimismTest: '',
};
// APIs

@@ -40,0 +52,0 @@ exports.OPENSEA_PROXY_URL = 'https://proxy.metaswap.codefi.network/opensea/v1/api/v1';

@@ -195,4 +195,13 @@ "use strict";

const _a = this.state.provider, { rpcTarget, chainId, nickname } = _a, providerState = __rest(_a, ["rpcTarget", "chainId", "nickname"]);
// If testnet the ticker symbol should use a testnet prefix
const ticker = type in constants_1.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL &&
constants_1.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL[type].length > 0
? constants_1.TESTNET_NETWORK_TYPE_TO_TICKER_SYMBOL[type]
: 'ETH';
this.update({
provider: Object.assign(Object.assign({}, providerState), { type, ticker: 'ETH', chainId: NetworksChainId[type] }),
provider: Object.assign(Object.assign({}, providerState), {
type,
ticker,
chainId: NetworksChainId[type],
}),
});

@@ -199,0 +208,0 @@ this.refreshNetwork();

4

package.json
{
"name": "@metamask/controllers",
"version": "30.1.0",
"version": "30.2.0",
"description": "Collection of platform-agnostic modules for creating secure data models for cryptocurrency wallets",

@@ -32,3 +32,3 @@ "keywords": [

"lint:misc": "prettier '**/*.json' '**/*.md' '!CHANGELOG.md' '**/*.yml' '!.yarnrc.yml' --ignore-path .gitignore",
"prepack": "yarn build",
"prepack": "./scripts/prepack.sh",
"setup": "yarn install",

@@ -35,0 +35,0 @@ "test": "jest",

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc