diff --git a/.github/workflows/pr-any.yml b/.github/workflows/pr-any.yml index 9284f7652a6f..d3d23417eb8f 100644 --- a/.github/workflows/pr-any.yml +++ b/.github/workflows/pr-any.yml @@ -10,9 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - name: ${{ matrix.step }} run: | yarn install --immutable | grep -v 'YN0013' diff --git a/.github/workflows/push-master.yml b/.github/workflows/push-master.yml index 006a66c74ca5..74dac8b15b92 100644 --- a/.github/workflows/push-master.yml +++ b/.github/workflows/push-master.yml @@ -16,9 +16,6 @@ jobs: - uses: actions/checkout@v1 with: token: ${{ secrets.GH_PAT }} - - uses: actions/setup-node@v1 - with: - node-version: '12.x' - name: ${{ matrix.step }} env: CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} diff --git a/packages/page-accounts/src/Accounts/modals/ChangePass.tsx b/packages/page-accounts/src/Accounts/modals/ChangePass.tsx index 1078d0fa6abe..68613009cebe 100644 --- a/packages/page-accounts/src/Accounts/modals/ChangePass.tsx +++ b/packages/page-accounts/src/Accounts/modals/ChangePass.tsx @@ -2,71 +2,83 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { I18nProps } from '@polkadot/react-components/types'; - -import React from 'react'; -import { AddressRow, Button, Modal, Password, TxComponent } from '@polkadot/react-components'; -import { ActionStatus } from '@polkadot/react-components/Status/types'; +import React, { useCallback, useState } from 'react'; +import { AddressRow, Button, Modal, Password } from '@polkadot/react-components'; import keyring from '@polkadot/ui-keyring'; -import translate from '../../translate'; +import { useTranslation } from '../../translate'; -interface Props extends I18nProps { +interface Props { + className?: string; address: string; onClose: () => void; } -interface State { +interface NewPass { isNewValid: boolean; - isOldValid: boolean; newPass: string; +} + +interface OldPass { + isOldValid: boolean; oldPass: string; } -class ChangePass extends TxComponent { - public state: State = { - isNewValid: false, - isOldValid: false, - newPass: '', - oldPass: '' - }; - - public render (): React.ReactNode { - const { t } = this.props; - - return ( - - {this.renderContent()} - {this.renderButtons()} - - ); - } - - private renderButtons (): React.ReactNode { - const { onClose, t } = this.props; - const { isNewValid, isOldValid } = this.state; - - return ( - -