diff --git a/packages/ui-app/src/AddressInfo.tsx b/packages/ui-app/src/AddressInfo.tsx index 4183aeff9a..531a8edbb9 100644 --- a/packages/ui-app/src/AddressInfo.tsx +++ b/packages/ui-app/src/AddressInfo.tsx @@ -2,25 +2,25 @@ // This software may be modified and distributed under the terms // of the Apache-2.0 license. See the LICENSE file for details. -import { DerivedBalances } from '@polkadot/api-derive/types'; +import { DerivedBalances, DerivedStaking } from '@polkadot/api-derive/types'; import { BareProps, I18nProps } from './types'; import React from 'react'; import styled from 'styled-components'; -import { withCalls, withMulti } from '@polkadot/ui-api'; import { formatBalance, formatNumber } from '@polkadot/util'; +import { Icon, Tooltip, TxButton } from '@polkadot/ui-app'; +import { withCalls, withMulti } from '@polkadot/ui-api'; import translate from './translate'; import CryptoType from './CryptoType'; -import Bonded from './Bonded'; import Label from './Label'; -import Unlocking from './Unlocking'; type Props = BareProps & I18nProps & { balances_all?: DerivedBalances, children?: React.ReactNode, + staking_info?: DerivedStaking, value: string, - withBalance?: boolean | { available?: boolean, bonded?: boolean, free?: boolean, locked?: boolean }, + withBalance?: boolean | { available?: boolean, bonded?: boolean, free?: boolean, redeemable?: boolean, unlocking?: boolean }, withExtended?: boolean | { crypto?: boolean, nonce?: boolean } }; @@ -51,9 +51,9 @@ class AddressInfo extends React.PureComponent { } private renderBalances () { - const { balances_all, t, value, withBalance = true } = this.props; + const { balances_all, staking_info, t, withBalance = true } = this.props; const balanceDisplay = withBalance === true - ? { available: true, bonded: true, free: true, locked: true } + ? { available: true, bonded: true, free: true, redeemable: true, unlocking: true } : withBalance ? withBalance : undefined; @@ -79,19 +79,28 @@ class AddressInfo extends React.PureComponent { {balanceDisplay.bonded && ( <>