diff --git a/packages/app-staking/src/Account/Bonding.tsx b/packages/app-staking/src/Account/Bond.tsx similarity index 97% rename from packages/app-staking/src/Account/Bonding.tsx rename to packages/app-staking/src/Account/Bond.tsx index b8a8c25ee5..4b483513d3 100644 --- a/packages/app-staking/src/Account/Bonding.tsx +++ b/packages/app-staking/src/Account/Bond.tsx @@ -30,7 +30,7 @@ const stashOptions = [ { text: 'Controller account', value: 2 } ]; -class Bonding extends React.PureComponent { +class Bond extends React.PureComponent { state: State = { controllerId: null, destination: 0, @@ -147,4 +147,4 @@ class Bonding extends React.PureComponent { } } -export default translate(Bonding); +export default translate(Bond); diff --git a/packages/app-staking/src/Account/BondExtra.tsx b/packages/app-staking/src/Account/BondExtra.tsx new file mode 100644 index 0000000000..c17162f8bf --- /dev/null +++ b/packages/app-staking/src/Account/BondExtra.tsx @@ -0,0 +1,98 @@ +// Copyright 2017-2019 @polkadot/ui-staking authors & contributors +// 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/ui-app/types'; + +import BN from 'bn.js'; +import React from 'react'; +import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/ui-app'; + +import translate from '../translate'; + +type Props = I18nProps & { + accountId: string, + isOpen: boolean, + onClose: () => void +}; + +type State = { + maxAdditional?: BN +}; + +class BondExtra extends React.PureComponent { + state: State = {}; + + render () { + const { accountId, isOpen, onClose, t } = this.props; + const { maxAdditional } = this.state; + const canSubmit = !!maxAdditional && maxAdditional.gtn(0); + + if (!isOpen) { + return null; + } + + return ( + + {this.renderContent()} + + +