diff --git a/packages/app-staking/src/Account/Unbond.tsx b/packages/app-staking/src/Account/Unbond.tsx new file mode 100644 index 0000000000..2968ac3b68 --- /dev/null +++ b/packages/app-staking/src/Account/Unbond.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 { AccountId } from '@polkadot/types'; +import BN from 'bn.js'; +import { Button, InputAddress, InputBalance, Modal, TxButton } from '@polkadot/ui-app'; +import { I18nProps } from '@polkadot/ui-app/types'; +import React from 'react'; + +import translate from '../translate'; + +type Props = I18nProps & { + controllerId?: AccountId | null, + isOpen: boolean, + onClose: () => void +}; + +type State = { + maxUnbond?: BN +}; + +class Unbond extends React.PureComponent { + state: State = {}; + + render () { + const { controllerId, isOpen, onClose, t } = this.props; + const { maxUnbond } = this.state; + const canSubmit = !!maxUnbond && maxUnbond.gtn(0); + + if (!isOpen) { + return null; + } + + return ( + + {this.renderContent()} + + +