Skip to content
This repository has been archived by the owner on Jul 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #346 from LedgerHQ/erc20updates
Browse files Browse the repository at this point in the history
Erc20 updates
  • Loading branch information
gre authored Sep 7, 2019
2 parents 772671d + 68b86a9 commit a77901e
Show file tree
Hide file tree
Showing 11 changed files with 1,438 additions and 1,375 deletions.
12 changes: 6 additions & 6 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
"@ledgerhq/hw-transport": "^4.68.4",
"@ledgerhq/hw-transport-u2f": "^4.68.4",
"@ledgerhq/hw-transport-web-ble": "^4.68.4",
"@ledgerhq/hw-transport-webusb": "^4.68.4",
"@ledgerhq/live-common": "^7.12.2",
"@ledgerhq/hw-transport-webusb": "^4.69.0",
"@ledgerhq/live-common": "7.14.0-alpha.0",
"axios": "^0.19.0",
"babel-polyfill": "^6.26.0",
"bignumber.js": "^9.0.0",
"flow-bin": "^0.106.2",
"flow-bin": "^0.107.0",
"material-ui": "^1.0.0-beta.44",
"qrcode": "^1.4.1",
"react": "^16.9.0",
Expand All @@ -22,15 +22,15 @@
"react-router-dom": "^5.0.1",
"react-scripts": "3.1.1",
"react-select": "^3.0.4",
"react-table": "^6.10.0",
"react-table": "^6.10.1",
"redux": "^4.0.4",
"redux-devtools-extension": "^2.13.8",
"redux-thunk": "^2.2.0",
"reselect": "^4.0.0",
"rxjs": "^6.5.2",
"rxjs": "^6.5.3",
"styled-components": "^4.3.2",
"timeago.js": "^4.0.0-beta.2",
"victory": "^33.0.4"
"victory": "^33.0.5"
},
"scripts": {
"start": "HTTS=true react-scripts start",
Expand Down
13 changes: 12 additions & 1 deletion demo/src/demos/assets/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,21 @@ const columns = [
width: 80,
accessor: "livesupport"
},
{
Header: "Delisted?",
width: 80,
accessor: "delisted"
},
{
Header: "type",
width: 120,
accessor: "typeText"
},
{
Header: "id",
width: 120,
accessor: "id"
},
{
Header: "Name",
accessor: "name"
Expand Down Expand Up @@ -142,7 +152,7 @@ const counterpartFor = c =>
: ethereum;

const Assets = () => {
const tokens = listTokens();
const tokens = listTokens({ withDelisted: true });
const currencies = listCryptoCurrencies();
const all = useMemo(() => currencies.concat(tokens), [tokens, currencies]);
const tickers = useMarketcapTickers() || [];
Expand Down Expand Up @@ -221,6 +231,7 @@ const Assets = () => {
exchange,
loading,
livesupport,
delisted: t.delisted ? "yes" : "no",
usdValue
};
});
Expand Down
89 changes: 48 additions & 41 deletions demo/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1449,10 +1449,10 @@
"@ledgerhq/hw-transport" "^4.68.4"
create-hash "^1.1.3"

"@ledgerhq/hw-app-eth@4.68.4":
version "4.68.4"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.68.4.tgz#90e606ffc85872063313ac6c19b4b64f7d00c9bf"
integrity sha512-fLy04GNAZOdtut0j5bf6BvByLtxqefckqpABmXM84wo6Ae579EjIbMrOdJ+ojigVlHIu1nXFzZbxzSwci+I9cA==
"@ledgerhq/hw-app-eth@4.69.2":
version "4.69.2"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-app-eth/-/hw-app-eth-4.69.2.tgz#abc72b359a79fe1e6945db76a67583c9b9d15e89"
integrity sha512-NLBqP9wuILRopjQpZOcxu0zXi4ezwyXE45byaqiAWcDuvRDFYiBFItDfSfQnWXsqUHyh2QKqggvLPBc2uofakA==
dependencies:
"@ledgerhq/errors" "^4.68.4"
"@ledgerhq/hw-transport" "^4.68.4"
Expand Down Expand Up @@ -1494,10 +1494,10 @@
"@ledgerhq/logs" "^4.68.2"
rxjs "^6.5.2"

"@ledgerhq/hw-transport-webusb@^4.68.4":
version "4.68.4"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-4.68.4.tgz#c80b3588b696dad360ea5a7a3e455b4cd2605154"
integrity sha512-nIC+FYmsgjpJPqKjtd4Y4yyPXC8LfLQo+CQ1JeWEYdqzSAgPsUWSbts5wTV0+hldsOb+BtYA1dGhEG4VfwIyVQ==
"@ledgerhq/hw-transport-webusb@^4.69.0":
version "4.69.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-webusb/-/hw-transport-webusb-4.69.0.tgz#b626befb4e2b8725b87505f065ea5c12ea3dff2d"
integrity sha512-5gEiE7VhNj/tKSdLclXkln6nuEJG1ysnqB9tOEWh5SVVUMg+BgBcIZXEUbSON4k9bihwftDp/M3BvCYOsdcS7w==
dependencies:
"@ledgerhq/devices" "^4.68.4"
"@ledgerhq/errors" "^4.68.4"
Expand All @@ -1513,15 +1513,15 @@
"@ledgerhq/errors" "^4.68.4"
events "^3.0.0"

"@ledgerhq/live-common@^7.12.2":
version "7.12.2"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-7.12.2.tgz#093f673bea2e200f86d95917924de3cd55d43bf0"
integrity sha512-3sCywx0Rq1rYTvUdmVA7YDdaNAEQYDz2cuyT/vMDKyJvsmfYmrbCPIqL+owIOZRLek4mmCnbksa4hMmgu8Q4dA==
"@ledgerhq/live-common@7.14.0-alpha.0":
version "7.14.0-alpha.0"
resolved "https://registry.yarnpkg.com/@ledgerhq/live-common/-/live-common-7.14.0-alpha.0.tgz#54b2f4dfdb1afb745959e8e5ad8a40a6997dcc51"
integrity sha512-MjypXq0JCV4eKPm0ue6Rzc19hh0q5sYuSIzFPZMHms8y6Re3gwK3Cc64mqFfeP8vZ3ZHgd2CCGTLIJhyMhKFRw==
dependencies:
"@ledgerhq/compressjs" "1.3.2"
"@ledgerhq/errors" "4.68.4"
"@ledgerhq/hw-app-btc" "4.68.4"
"@ledgerhq/hw-app-eth" "4.68.4"
"@ledgerhq/hw-app-eth" "4.69.2"
"@ledgerhq/hw-app-xrp" "4.68.4"
"@ledgerhq/hw-transport" "4.68.4"
"@ledgerhq/hw-transport-mocker" "4.68.4"
Expand All @@ -1542,8 +1542,8 @@
ripple-bs58check "^2.0.2"
ripple-hashes "^0.3.1"
ripple-lib "1.1.2"
rxjs "^6.5.2"
rxjs-compat "^6.5.2"
rxjs "^6.5.3"
rxjs-compat "^6.5.3"

"@ledgerhq/[email protected]", "@ledgerhq/logs@^4.68.2":
version "4.68.2"
Expand Down Expand Up @@ -5300,10 +5300,10 @@ flatten@^1.0.2:
resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
integrity sha1-2uRqnXj74lKSJYzB54CkHZXAN4I=

flow-bin@^0.106.2:
version "0.106.2"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.106.2.tgz#624db7c04b00879ac14853434817c7bc5e1419db"
integrity sha512-pALWFKf+AQiX4VfSEdxruj2bSMigsrAcg8djV6Hue2y3FJyiA/Z42UkEv6zEvSIpDj1EL+cRBvJNUx6L2+gdTQ==
flow-bin@^0.107.0:
version "0.107.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.107.0.tgz#b37bfcce51204d35d58f8eb93b3a76b52291e4cc"
integrity sha512-hsmwO5Q0+XUXaO2kIKLpleUNNBSFcsGEQGBOTEC/KR/4Ez695I1fweX/ioSjbU4RWhPZhkIqnpbF9opVAauCHg==

flush-write-stream@^1.0.0:
version "1.0.3"
Expand Down Expand Up @@ -10083,10 +10083,10 @@ react-select@^3.0.4:
react-input-autosize "^2.2.1"
react-transition-group "^2.2.1"

react-table@^6.10.0:
version "6.10.0"
resolved "https://registry.yarnpkg.com/react-table/-/react-table-6.10.0.tgz#20444b19d8ca3c1a08e7544e5c3a93e4ba56690e"
integrity sha512-s/mQLI1+mNvlae45MfAZyZ04YIT3jUzWJqx34s0tfwpDdgJkpeK6vyzwMUkKFCpGODBxpjBOekYZzcEmk+2FiQ==
react-table@^6.10.1:
version "6.10.1"
resolved "https://registry.yarnpkg.com/react-table/-/react-table-6.10.1.tgz#f08188d88a585d5b27fc57e7ba9a5dc9db349edb"
integrity sha512-/DJwWb8/7E/KrRVRhOtJUg58Oc7aPgTK2asuXjsxsLbrozkBnR+8UMZQra4w1nrUrrPytqePEdKe9uI1vvmc+w==
dependencies:
classnames "^2.2.5"

Expand Down Expand Up @@ -10683,10 +10683,10 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"

rxjs-compat@^6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.5.2.tgz#e469070adf6260bdad195e9d4a39f444ae28b458"
integrity sha512-TRMkTp4FgSxE2HtGvxmgRukh3JqdFM7ejAj1Ti/VdodbPGfWvZR5+KdLKRV9jVDFyu2SknM8RD+PR54KGnoLjg==
rxjs-compat@^6.5.3:
version "6.5.3"
resolved "https://registry.yarnpkg.com/rxjs-compat/-/rxjs-compat-6.5.3.tgz#18440949b2678bf87a78a754009676b2c49183dc"
integrity sha512-BIJX2yovz3TBpjJoAZyls2QYuU6ZiCaZ+U96SmxQpuSP/qDUfiXPKOVLbThBB2WZijNHkdTTJXKRwvv5Y48H7g==

rxjs@^6.4.0, rxjs@^6.5.2:
version "6.5.2"
Expand All @@ -10695,6 +10695,13 @@ rxjs@^6.4.0, rxjs@^6.5.2:
dependencies:
tslib "^1.9.0"

rxjs@^6.5.3:
version "6.5.3"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.3.tgz#510e26317f4db91a7eb1de77d9dd9ba0a4899a3a"
integrity sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==
dependencies:
tslib "^1.9.0"

[email protected]:
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
Expand Down Expand Up @@ -12039,10 +12046,10 @@ [email protected]:
core-util-is "1.0.2"
extsprintf "^1.2.0"

victory-area@^33.0.1:
version "33.0.1"
resolved "https://registry.yarnpkg.com/victory-area/-/victory-area-33.0.1.tgz#b75122cb92c8cd78ec7978ed3a1f6f1aea04aec1"
integrity sha512-IfCaiOgyocMgBQ/9zQWrLFM/q0N03lMbE1Zg20ff/RIEFzHm6N192Y4ADtoWfIDxWE9eZ994LHINbXYO/49kKg==
victory-area@^33.0.5:
version "33.0.5"
resolved "https://registry.yarnpkg.com/victory-area/-/victory-area-33.0.5.tgz#4dff4e5aebe2865bfa78c20bf9af1b8b51301054"
integrity sha512-dE3m1TepoLnpZjAHMiQdY+fplXIIKBVNBGisVVPIpcH0pemGds9bOVovj3xSFWmk3Mkip0Gbe+G8DJgHQYXLeA==
dependencies:
d3-shape "^1.2.0"
lodash "^4.17.15"
Expand Down Expand Up @@ -12182,10 +12189,10 @@ victory-legend@^33.0.1:
prop-types "^15.5.8"
victory-core "^33.0.1"

victory-line@^33.0.1:
version "33.0.1"
resolved "https://registry.yarnpkg.com/victory-line/-/victory-line-33.0.1.tgz#b982ee4c037d23df2eb376b8780767a23dfccb3e"
integrity sha512-VOrS8Wwvjc3lI3Z6Ti249jKE10ZV+ITH1tXXfwTTMUVFE3jvTYiWAzuL6HOnM+gfrTHN2laV+m9/Cky4tALziQ==
victory-line@^33.0.5:
version "33.0.5"
resolved "https://registry.yarnpkg.com/victory-line/-/victory-line-33.0.5.tgz#602f8312d8f143357edc2b1e8de059a07ff98e16"
integrity sha512-vICCakjS66s37lWymHE2z8gQTDRD2t79dGMXhpNskMjDfWIg+iMl3lEmeaoSvWrf8AYDHT1nMKVNy+0cbeAtbQ==
dependencies:
d3-shape "^1.2.0"
lodash "^4.17.15"
Expand Down Expand Up @@ -12288,12 +12295,12 @@ victory-zoom-container@^33.0.1:
prop-types "^15.5.8"
victory-core "^33.0.1"

victory@^33.0.4:
version "33.0.4"
resolved "https://registry.yarnpkg.com/victory/-/victory-33.0.4.tgz#6820611e2df82bc813050ebc2340d3ce698948de"
integrity sha512-8sRnoR9twsrOLhy5V5Q6rN0nVF2iAjsRNWXuz6Wswfld5qkhcLM14KTtjPVHLfyeoCtB0Xmvo3U5PubQh6+0xg==
victory@^33.0.5:
version "33.0.5"
resolved "https://registry.yarnpkg.com/victory/-/victory-33.0.5.tgz#9265afd85cd07f2c4142eacc52159752ebfac69c"
integrity sha512-dTHUwpiekbAwh1SNTbXWhp4siKFsareJRLVf2NuzFfxzAk9eQUQeTDvaBsbNkAkYZBP3YoUf/xwmMzgd6ZfWcA==
dependencies:
victory-area "^33.0.1"
victory-area "^33.0.5"
victory-axis "^33.0.1"
victory-bar "^33.0.1"
victory-box-plot "^33.0.1"
Expand All @@ -12307,7 +12314,7 @@ victory@^33.0.4:
victory-errorbar "^33.0.1"
victory-group "^33.0.1"
victory-legend "^33.0.1"
victory-line "^33.0.1"
victory-line "^33.0.5"
victory-pie "^33.0.3"
victory-polar-axis "^33.0.1"
victory-scatter "^33.0.1"
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "git",
"url": "git://github.com/LedgerHQ/ledger-live-common"
},
"version": "7.13.1",
"version": "7.14.0-alpha.0",
"main": "lib/index.js",
"license": "MIT",
"scripts": {
Expand Down Expand Up @@ -45,7 +45,7 @@
"@ledgerhq/compressjs": "1.3.2",
"@ledgerhq/errors": "4.68.4",
"@ledgerhq/hw-app-btc": "4.68.4",
"@ledgerhq/hw-app-eth": "4.69.1",
"@ledgerhq/hw-app-eth": "4.69.2",
"@ledgerhq/hw-app-xrp": "4.68.4",
"@ledgerhq/hw-transport": "4.68.4",
"@ledgerhq/hw-transport-mocker": "4.68.4",
Expand All @@ -66,8 +66,8 @@
"ripple-bs58check": "^2.0.2",
"ripple-hashes": "^0.3.1",
"ripple-lib": "1.1.2",
"rxjs": "^6.5.2",
"rxjs-compat": "^6.5.2"
"rxjs": "^6.5.3",
"rxjs-compat": "^6.5.3"
},
"devDependencies": {
"axios": "^0.19.0",
Expand All @@ -78,14 +78,14 @@
"babel-preset-flow": "^6.23.0",
"babel-preset-react": "^6.24.1",
"babel-preset-stage-0": "^6.24.1",
"cross-env": "^5.2.0",
"cross-env": "^5.2.1",
"eslint": "^6.2.2",
"eslint-config-airbnb": "^18.0.1",
"eslint-config-prettier": "^6.1.0",
"eslint-plugin-flowtype": "^4.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"flow-bin": "^0.106.3",
"flow-bin": "^0.107.0",
"flow-copy-source": "^2.0.8",
"flow-typed": "^2.6.1",
"glob": "^7.1.4",
Expand Down
4 changes: 3 additions & 1 deletion scripts/crypto-assets-importer/importers/erc20.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
const contractAddress = common.contract_address;
const parentCurrency = inferParentCurrency(common);
const disableCountervalue = !!common.disable_countervalue;
const delisted = !!common.delisted;
try {
invariant(
typeof parentCurrency === "string" && parentCurrency,
Expand Down Expand Up @@ -79,7 +80,8 @@ module.exports = {
name,
ledgerSignature,
contractAddress,
disableCountervalue
disableCountervalue,
delisted
];
})
};
Loading

0 comments on commit a77901e

Please sign in to comment.