* skeleton for Available and Unlocking * available (with bug) and unlocking balance * implement available according to the rust code * lint * unlock modal components * use tx button directly instead of useless modal withdrawUnbonded * use BN and move max to util * Sum unlockables * show unlockableSum and refactor * add unlockable button * lint * smaller padding around unlock button * cleanup and address comment * use labels directly instead of passing in props * function ordering and make private * fixme for vesting, function ordering * css in components * lint
32 lines
896 B
TypeScript
32 lines
896 B
TypeScript
// Copyright 2017-2019 @polkadot/ui-app 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 { BareProps } from './types';
|
|
|
|
import BN from 'bn.js';
|
|
import React from 'react';
|
|
import { AccountId, AccountIndex, Address } from '@polkadot/types';
|
|
import { Unlocking } from '@polkadot/ui-reactive';
|
|
|
|
import { classes } from './util';
|
|
|
|
export type Props = BareProps & {
|
|
bonded?: BN | Array<BN>,
|
|
params?: AccountId | AccountIndex | Address | string | Uint8Array | null,
|
|
withLabel?: boolean
|
|
};
|
|
|
|
export default class UnlockingDisplay extends React.PureComponent<Props> {
|
|
render () {
|
|
const { params, className, style } = this.props;
|
|
return (
|
|
<Unlocking
|
|
className={classes('ui--Unlocking', className)}
|
|
params={params}
|
|
style={style}
|
|
/>
|
|
);
|
|
}
|
|
}
|