diff --git a/packages/ui-signer/src/Fees/Proposal.tsx b/packages/ui-signer/src/Fees/Proposal.tsx index 4360f874b8..3edeea4e15 100644 --- a/packages/ui-signer/src/Fees/Proposal.tsx +++ b/packages/ui-signer/src/Fees/Proposal.tsx @@ -10,6 +10,7 @@ import BN from 'bn.js'; import React from 'react'; import { Compact } from '@polkadot/types/codec'; import { withCall, withMulti } from '@polkadot/ui-api/index'; +import { Icon } from '@polkadot/ui-app/index'; import { balanceFormat } from '@polkadot/ui-reactive/util/index'; import translate from '../translate'; @@ -62,21 +63,21 @@ class Proposal extends React.PureComponent { return [ isBelowMinimum - ?
  • {t('proposal.belowmin', { + ?
    {t('proposal.belowmin', { defaultValue: 'The deposit is below the {{minimum}} minimum required for the proposal to be evaluated', replace: { minimum: balanceFormat(query_democracy_minimumDeposit) } - })}
  • + })} : undefined, extraAmount.isZero() ? undefined - :
  • {t('proposal.deposit', { + :
    {t('proposal.deposit', { defaultValue: 'The deposit of {{deposit}} will be reserved until the proposal is completed', replace: { deposit: balanceFormat(extraAmount) } - })}
  • + })} ]; } } diff --git a/packages/ui-signer/src/Fees/Transfer.tsx b/packages/ui-signer/src/Fees/Transfer.tsx index a97f7eb174..6bb79714bf 100644 --- a/packages/ui-signer/src/Fees/Transfer.tsx +++ b/packages/ui-signer/src/Fees/Transfer.tsx @@ -10,6 +10,7 @@ import BN from 'bn.js'; import React from 'react'; import { Compact } from '@polkadot/types/codec'; import { withCall, withMulti } from '@polkadot/ui-api/index'; +import { Icon } from '@polkadot/ui-app/index'; import { balanceFormat } from '@polkadot/ui-reactive/util/index'; import translate from '../translate'; @@ -73,17 +74,17 @@ class Transfer extends React.PureComponent { return [ isNoEffect - ?
  • {t('transfer.noeffect', { + ?
    {t('transfer.noeffect', { defaultValue: 'The final recipient amount is less than the existential amount, hence the total will be deducted from the sender, however the recipient account will not reflect the amount sent' - })}
  • + })} : undefined, isCreation - ?
  • {t('transfer.create', { + ?
    {t('transfer.create', { defaultValue: 'A fee of {{creationFee}} will be deducted from the sender since the destination account does not exist', replace: { creationFee: `${balanceFormat(fees.creationFee)}` } - })}
  • + })} : undefined ]; } diff --git a/packages/ui-signer/src/Fees/index.tsx b/packages/ui-signer/src/Fees/index.tsx index 0cd0d405ca..41076d4c04 100644 --- a/packages/ui-signer/src/Fees/index.tsx +++ b/packages/ui-signer/src/Fees/index.tsx @@ -10,6 +10,7 @@ import BN from 'bn.js'; import React from 'react'; import { Extrinsic, Method } from '@polkadot/types'; import { withCall, withMulti } from '@polkadot/ui-api/index'; +import { Icon } from '@polkadot/ui-app/index'; import { balanceFormat } from '@polkadot/ui-reactive/util/index'; import { compactToU8a } from '@polkadot/util'; @@ -136,44 +137,42 @@ class FeeDisplay extends React.PureComponent { className={[className, feeClass, 'padded'].join(' ')} key='txinfo' > -
      -
    • {t('fees', { - defaultValue: 'Fees totalling {{fees}} will be applied to the submission', - replace: { - fees: balanceFormat(allFees) - } - })}
    • -
    • {t('fees.explain', { - defaultValue: 'Fees includes the transaction fee and the per-byte fee' - })}
    • - {this.renderTransfer()} - {this.renderProposal()} - { - isRemovable && hasAvailable - ?
    • {t('fees.remove', { - defaultValue: 'Submitting this transaction will drop the account balance to below the existential amount, removing the account from the chain state and burning associated funds' - })}
    • - : undefined - }{ - hasAvailable - ? undefined - :
    • {t('fees.available', { - defaultValue: 'The account does not have the required funds available for this transaction with the current values' - })}
    • - }{ - isReserved - ?
    • {t('fees.reserved', { - defaultValue: 'This account does have a reserved/locked balance, not taken into account' - })}
    • - : undefined + {this.renderTransfer()} + {this.renderProposal()} + { + isRemovable && hasAvailable + ?
      {t('fees.remove', { + defaultValue: 'Submitting this transaction will drop the account balance to below the existential amount, removing the account from the chain state and burning associated funds' + })}
      + : undefined + }{ + hasAvailable + ? undefined + :
      {t('fees.available', { + defaultValue: 'The account does not have the required funds available for this transaction with the current provided values' + })}
      + }{ + isReserved + ?
      {t('fees.reserved', { + defaultValue: 'This account does have a reserved/locked balance, not taken into account' + })}
      + : undefined + } +
      {t('fees.explain', { + defaultValue: 'Fees includes the transaction fee and the per-byte fee' + })}
      +
      {t('fees', { + defaultValue: 'Fees totalling {{fees}} will be applied to the submission', + replace: { + fees: balanceFormat(allFees) } -
    • {t('total', { - defaultValue: '{{total}} total transaction amount (fees + value)', - replace: { - total: balanceFormat(allTotal) - } - })}
    • -
    + })} +
    {t('total', { + defaultValue: '{{total}} total transaction amount (fees + value)', + replace: { + total: balanceFormat(allTotal) + } + })}
    ); }