New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@exodus/models

Package Overview
Dependencies
Maintainers
0
Versions
136
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exodus/models - npm Package Compare versions

Comparing version 8.2.6 to 8.2.7

11

CHANGELOG.md

@@ -0,1 +1,12 @@

8.2.6 / 2020-10-09
------------------
- same as 8.3.0, to avoid re-publishing all asset libs that depends on ~8.2.x
8.3.0 / 2020-10-09
------------------
- add WalletAccount .icon, .color
8.2.4 / 2020-06-25

@@ -2,0 +13,0 @@ ------------------

36

lib/wallet-account/index.js

@@ -6,3 +6,3 @@ "use strict";

});
exports.default = exports.LEDGER_SRC = exports.TREZOR_SRC = exports.EXODUS_SRC = void 0;
exports.default = exports.getDefaultLabel = exports.DEFAULT_ICONS = exports.DEFAULT_COLORS = exports.LEDGER_SRC = exports.TREZOR_SRC = exports.EXODUS_SRC = void 0;

@@ -23,3 +23,24 @@ var _proxyFreeze = _interopRequireDefault(require("proxy-freeze"));

exports.LEDGER_SRC = LEDGER_SRC;
const DEFAULT_COLORS = Object.freeze({
exodus: '#ff3974',
trezor: '#7b39ff',
ledger: '#f5e400'
});
exports.DEFAULT_COLORS = DEFAULT_COLORS;
const DEFAULT_ICONS = Object.freeze({
exodus: 'exodus',
trezor: 'trezor',
ledger: 'trezor'
});
exports.DEFAULT_ICONS = DEFAULT_ICONS;
const capFirst = str => str[0].toUpperCase() + str.slice(1);
const getDefaultLabel = ({
source,
index
}) => index === 0 ? capFirst(source) : '';
exports.getDefaultLabel = getDefaultLabel;
const isColor = str => typeof str === 'string' && /^#[0-9a-fA-F]{3,6}/.test(str);

@@ -75,8 +96,15 @@

if (color && !isColor(color)) {
color = color || DEFAULT_COLORS[source];
icon = icon || DEFAULT_ICONS[source];
label = label || getDefaultLabel({
source,
index
});
if (!isColor(color)) {
throw new Error('expected "color" to be a hex string');
}
if (icon && typeof icon !== 'string') {
throw new Error('expected "icon" to be a string');
if (typeof icon !== 'string' || !icon.length) {
throw new Error('expected "icon" to be a non-empty string');
}

@@ -83,0 +111,0 @@

2

package.json
{
"name": "@exodus/models",
"version": "8.2.6",
"version": "8.2.7",
"description": "Exodus models",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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