@exodus/assets
Advanced tools
Comparing version 5.0.0 to 6.0.0
@@ -0,1 +1,6 @@ | ||
6.0.0 / 2020-01-02 | ||
------------------ | ||
- `@exodus/assets-base` to `5.0.x` | ||
5.0.0 / 2019-11-16 | ||
@@ -2,0 +7,0 @@ ------------------ |
@@ -14,16 +14,31 @@ "use strict"; | ||
var _default = Object.entries(_assetsBase.default).reduce(reduce, {}); | ||
const assets = {}; | ||
exports.default = _default; | ||
for (const [assetName, asset] of Object.entries(_assetsBase.default)) { | ||
assets[assetName] = Object.assign({}, asset, { | ||
currency: _currency.UnitType.create(asset.units) | ||
}); | ||
} | ||
function reduce(assetsMap, [assetName, assetObj]) { | ||
return Object.assign(assetsMap, { | ||
[assetName]: map(assetName, assetObj) | ||
for (const [assetName, asset] of Object.entries(assets)) { | ||
Object.defineProperties(asset, { | ||
baseAsset: { | ||
get() { | ||
let baseAssetName = asset.name; | ||
if (asset.assetType === 'ETHEREUM_ERC20') baseAssetName = 'ethereum'; | ||
if (asset.assetType === 'TRON_TOKEN') baseAssetName = 'tronmainnet'; | ||
if (asset.assetType === 'VECHAIN_TOKEN') baseAssetName = 'vechainthor'; | ||
if (asset.name === 'neogas') baseAssetName = 'neo'; | ||
if (asset.name === 'ontologygas') baseAssetName = 'ontology'; | ||
if (asset.name === 'bcashclaim') baseAssetName = 'bcash'; | ||
if (asset.name === 'bitcoinsvclaim') baseAssetName = 'bitcoinsv'; | ||
if (asset.name === 'bgoldclaim') baseAssetName = 'bgold'; | ||
return assets[baseAssetName]; | ||
} | ||
} | ||
}); | ||
} | ||
function map(assetName, assetObj) { | ||
return Object.assign({}, assetObj, { | ||
currency: _currency.UnitType.create(assetObj.units) | ||
}); | ||
} | ||
var _default = assets; | ||
exports.default = _default; |
{ | ||
"name": "@exodus/assets", | ||
"version": "5.0.0", | ||
"version": "6.0.0", | ||
"description": "Exodus assets", | ||
@@ -13,5 +13,5 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@exodus/assets-base": "4.0.x", | ||
"@exodus/assets-base": "5.0.x", | ||
"@exodus/currency": "1.0.x" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2681
33
1
+ Added@exodus/assets-base@5.0.0(transitive)
- Removed@exodus/assets-base@4.0.6(transitive)
Updated@exodus/assets-base@5.0.x