diff --git a/i18n/locales/en/common.json b/i18n/locales/en/common.json index b6f6d2f4fe..a873c837a9 100644 --- a/i18n/locales/en/common.json +++ b/i18n/locales/en/common.json @@ -63,6 +63,8 @@ "Confirm (Fee: 1 LSK)": "Confirm (Fee: 1 LSK)", "Confirm (Fee: {{fee}} LSK)": "Confirm (Fee: {{fee}} LSK)", "Confirm to register your second passphrase on the blockchain.": "Confirm to register your second passphrase on the blockchain.", + "Confirm transaction on Ledger Nano S": "Confirm transaction on Ledger Nano S", + "Confirm transfer": "Confirm transfer", "Confirm vote on Ledger Nano S": "Confirm vote on Ledger Nano S", "Confirm your name": "Confirm your name", "Confirmation in the next step": "Confirmation in the next step", diff --git a/jest.config.js b/jest.config.js index 30ff8e1289..bb6a807186 100644 --- a/jest.config.js +++ b/jest.config.js @@ -40,8 +40,6 @@ module.exports = { 'app/src/ipc.js', 'app/src/ledger.js', 'src/actions/liskService.js', - 'src/actions/peers.js', // FollowUp #1515 - 'src/actions/peers.js', // FollowUp #1515 'src/actions/transactions.js', 'src/components/account/stories.js', 'src/components/accountInitialization/index.js', @@ -57,15 +55,14 @@ module.exports = { 'src/components/newsFeed/news.js', 'src/components/passphrase/create/create.js', 'src/components/passphraseCreation/index.js', - 'src/components/passphraseSteps/index.js', // FollowUp #1515 - 'src/components/passphraseSteps/index.js', // FollowUp #1515 + 'src/components/passphraseSteps/index.js', + 'src/components/register/register.js', + 'src/components/request/specifyRequest.js', + 'src/components/receive/index.js', 'src/components/request/index.js', 'src/components/register/register.js', 'src/components/resultBox/index.js', - 'src/components/resultBox/resultBox.js', // FollowUp #1515 - 'src/components/resultBox/resultBox.js', // FollowUp #1515 'src/components/searchBar/index.js', // Passing in mocha but not in Jest - 'src/components/send/steps/confirm/confirm.js', // FollowUp #1515 'src/components/send/steps/form/stories.js', 'src/components/spinner/stories.js', 'src/components/toaster/stories.js', diff --git a/src/actions/peers.js b/src/actions/peers.js index e40acfe6a9..874d2ff595 100644 --- a/src/actions/peers.js +++ b/src/actions/peers.js @@ -10,6 +10,7 @@ import { extractAddress, extractPublicKey } from '../utils/account'; import { accountLoggedIn, accountLoading, accountLoggedOut } from './account'; import accountConfig from '../constants/account'; import settings from '../constants/settings'; +import { loginType } from '../constants/hwConstants'; const peerSet = (data, config) => ({ data: Object.assign({ @@ -37,7 +38,7 @@ const login = (dispatch, getState, data, config) => { // eslint-disable-line max publicKey, address, network: code || 0, - loginType: data.hwInfo ? 1 : 0, + loginType: data.hwInfo ? loginType.ledger : loginType.normal, peerAddress: data.network.nodes[0], hwInfo: data.hwInfo ? data.hwInfo : {}, }; diff --git a/src/actions/peers.test.js b/src/actions/peers.test.js index a91588859d..1c61eef3b0 100644 --- a/src/actions/peers.test.js +++ b/src/actions/peers.test.js @@ -133,6 +133,15 @@ describe('actions: peers', () => { expect(dispatch).to.have.been.calledWith(); }); + it('dispatch liskAPIClientSet action when hwAccount is logged in ', () => { + const network = { + testnet: true, + }; + + liskAPIClientSet({ passphrase, network, hwInfo: {} })(dispatch, getState); + expect(dispatch).to.have.been.calledWith(match.hasNested('data.options.nodes', networks.testnet.nodes)); + }); + it('dispatch liskAPIClientSet action even if network.address is undefined', () => { liskAPIClientSet({ passphrase, network: {} })(dispatch, getState); diff --git a/src/components/resultBox/resultBox.js b/src/components/resultBox/resultBox.js index 1380f291c3..ecfa163bbb 100644 --- a/src/components/resultBox/resultBox.js +++ b/src/components/resultBox/resultBox.js @@ -18,6 +18,17 @@ class ResultBox extends React.Component { return this.props.followedAccounts.find(account => account.address === address) === undefined; } + handleRetryButton() { + this.props.transactionFailedClear(); + this.props.prevStep({ + success: null, + account: this.props.account, + recipient: this.props.recipient, + amount: this.props.amount, + password: { value: '' }, + }); + } + render() { return (
@@ -47,7 +58,7 @@ class ResultBox extends React.Component { {this.props.success && this.props.recipientId && this.isNotYetFollowed(this.props.recipientId) ?
-