diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index 23f5e927455b..d1afa76b8b75 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -14,54 +14,74 @@ jobs: prep-deps-npm: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Reconfigure git to use HTTP authentication + run: > + git config --global url."https://github.com/".insteadOf + ssh://git@github.com/ - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: - node-version: '10.x' - - name: Install npm 6 + deps via npm + node-version: '14.x' + - name: Install npm 7 + deps via npm run: | - sudo npm install -g npm@6.14.5 && npm install --no-save + sudo npm install -g npm@7.22.0 && npm install --no-save --legacy-peer-deps test-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Reconfigure git to use HTTP authentication + run: > + git config --global url."https://github.com/".insteadOf + ssh://git@github.com/ - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: - node-version: '10.x' - - name: Install npm 6 + deps via npm + node-version: '14.x' + - name: Install npm 7 + deps via npm run: | - sudo npm install -g npm@6.14.5 && npm install --no-save + sudo npm install -g npm@7.22.0 && npm install --no-save --legacy-peer-deps - name: lint run: npm run lint test-unit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Reconfigure git to use HTTP authentication + run: > + git config --global url."https://github.com/".insteadOf + ssh://git@github.com/ - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: - node-version: '10.x' - - name: Install npm 6 + deps via npm + node-version: '14.x' + - name: Install npm 7 + deps via npm run: | - sudo npm install -g npm@6.14.5 && npm install --no-save + sudo npm install -g npm@7.22.0 && npm install --no-save --legacy-peer-deps - name: test:coverage run: npm run test:coverage # test-integration-flat-chrome: # runs-on: ubuntu-latest # steps: - # - uses: actions/checkout@v1 + # - uses: actions/checkout@v2 + # with: + # persist-credentials: false # - name: Use Node.js ${{ matrix.node-version }} # uses: actions/setup-node@v1 # with: - # node-version: '10.x' - # - name: Install npm 6 + deps via npm + # node-version: '14.x' + # - name: Install npm 7 + deps via npm # run: | - # sudo npm install -g npm@6.14.5 && npm install --no-save + # sudo npm install -g npm@7.22.0 && npm install --no-save # - name: Enable Chrome # run: | # sudo apt-get update @@ -75,14 +95,16 @@ jobs: # test-e2e-chrome: # runs-on: ubuntu-latest # steps: - # - uses: actions/checkout@v1 + # - uses: actions/checkout@v2 + # with: + # persist-credentials: false # - name: Use Node.js ${{ matrix.node-version }} # uses: actions/setup-node@v1 # with: - # node-version: '10.x' - # - name: Install npm 6 + deps via npm + # node-version: '14.x' + # - name: Install npm 7 + deps via npm # run: | - # sudo npm install -g npm@6.14.5 && npm install --no-save + # sudo npm install -g npm@7.22.0 && npm install --no-save # - name: Enable Chrome # run: | # sudo apt-get update diff --git a/CHANGELOG.md b/CHANGELOG.md index 8801ebe5a256..f3bba47269fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ## Current Master +## 5.2.6 Tue Sep 21 2021 + +- [#466](https://github.com/poanetwork/nifty-wallet/pull/466) - Update NPM dependencies to match Node v14.x +- [#403](https://github.com/poanetwork/nifty-wallet/pull/403), [#467](https://github.com/poanetwork/nifty-wallet/pull/467) - Add D'CENT hardware wallet support + ## 5.2.5 Fri May 21 2021 - [#459](https://github.com/poanetwork/nifty-wallet/pull/459) - (Fix) Phishing detection diff --git a/app/_locales/en/messages.json b/app/_locales/en/messages.json index c69efac362fb..12b9e3ef1853 100644 --- a/app/_locales/en/messages.json +++ b/app/_locales/en/messages.json @@ -749,7 +749,7 @@ "description": "choice between creating or importing a new account" }, "orderOneHere": { - "message": "Order a Trezor or Ledger and keep your funds in cold storage" + "message": "Order a Trezor, Ledger or D'CENT and keep your funds in cold storage" }, "origin": { "message": "Origin" diff --git a/app/_locales/ko/messages.json b/app/_locales/ko/messages.json index b6fcce8650b9..cfb275c0c6ba 100644 --- a/app/_locales/ko/messages.json +++ b/app/_locales/ko/messages.json @@ -731,7 +731,7 @@ "description": "새 계정을 만들거나 가져오기 중에 선택하기" }, "orderOneHere": { - "message": "Trezor 혹은 Ledger를 구입하고 자금을 콜드 스토리지에 저장합니다" + "message": "Trezor, Ledger 혹은 D'CENT를 구입하고 자금을 콜드 스토리지에 저장합니다" }, "origin": { "message": "Origin" diff --git a/app/images/dcent-logo.svg b/app/images/dcent-logo.svg new file mode 100644 index 000000000000..7bbfe47168ff --- /dev/null +++ b/app/images/dcent-logo.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/app/manifest.json b/app/manifest.json index c6b93455d39b..48a86ab09e3a 100644 --- a/app/manifest.json +++ b/app/manifest.json @@ -1,7 +1,7 @@ { "name": "__MSG_appName__", "short_name": "__MSG_appName__", - "version": "5.2.5", + "version": "5.2.6", "manifest_version": 2, "author": "POA Network", "description": "__MSG_appDescription__", diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 2be702138f97..01150a76b910 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -50,10 +50,11 @@ import seedPhraseVerifier from './lib/seed-phrase-verifier' import log from 'loglevel' const TrezorKeyring = require('eth-trezor-keyring') const LedgerBridgeKeyring = require('eth-ledger-bridge-keyring') +import DcentKeyring from 'eth-dcent-keyring' import EthQuery from 'eth-query' import nanoid from 'nanoid' const { importTypes } = require('../../old-ui/app/accounts/import/enums') -const { LEDGER, TREZOR } = require('../../old-ui/app/components/connect-hardware/enum') +const { LEDGER, TREZOR, DCENT } = require('../../old-ui/app/components/connect-hardware/enum') const { ifPOA, ifXDai, ifRSK, getNetworkID, getDPath, setDPath } = require('../../old-ui/app/util') const { GasPriceOracle } = require('gas-price-oracle') import { @@ -192,7 +193,7 @@ module.exports = class MetamaskController extends EventEmitter { }) // key mgmt - const additionalKeyrings = [TrezorKeyring, LedgerBridgeKeyring] + const additionalKeyrings = [TrezorKeyring, LedgerBridgeKeyring, DcentKeyring] this.keyringController = new KeyringController({ keyringTypes: additionalKeyrings, initState: initState.KeyringController, @@ -763,6 +764,9 @@ module.exports = class MetamaskController extends EventEmitter { case LEDGER: keyringName = LedgerBridgeKeyring.type break + case DCENT: + keyringName = DcentKeyring.type + break default: throw new Error('MetamaskController:getKeyringForDevice - Unknown device') } diff --git a/old-ui/app/components/connect-hardware/connect-screen.js b/old-ui/app/components/connect-hardware/connect-screen.js index 4d38ae3ead68..a4c3c12535b1 100644 --- a/old-ui/app/components/connect-hardware/connect-screen.js +++ b/old-ui/app/components/connect-hardware/connect-screen.js @@ -1,7 +1,7 @@ import React, { Component } from 'react' import PropTypes from 'prop-types' import Button from '../../../../ui/app/components/button' -import { LEDGER, TREZOR } from './enum' +import { LEDGER, TREZOR, DCENT } from './enum' import { capitalizeFirstLetter } from '../../../../app/scripts/lib/util' const trezorCap = capitalizeFirstLetter(TREZOR) @@ -49,12 +49,24 @@ class ConnectScreen extends Component { ) } + renderConnectToDcentButton () { + return ( + + ) + } + renderButtons () { return (
{this.renderConnectToLedgerButton()} {this.renderConnectToTrezorButton()} + {this.renderConnectToDcentButton()}