Show confirm transaction copy during hardware wallet signing (#454)

* Add msg for users to confirm tx on hw

* Update msg
This commit is contained in:
James Prado 2017-11-27 23:52:52 -05:00 committed by Daniel Ternyak
parent 37184e4c4e
commit 34ca5a6d1d
1 changed files with 21 additions and 2 deletions

View File

@ -32,7 +32,13 @@ import {
import { UnitKey, Wei, getDecimal, toWei } from 'libs/units';
import { isValidETHAddress } from 'libs/validators';
// LIBS
import { IWallet, Balance, Web3Wallet } from 'libs/wallet';
import {
IWallet,
Balance,
Web3Wallet,
LedgerWallet,
TrezorWallet
} from 'libs/wallet';
import pickBy from 'lodash/pickBy';
import React from 'react';
// REDUX
@ -265,6 +271,8 @@ export class SendTransaction extends React.Component<Props, State> {
? getDecimal('ether')
: (this.state.token && this.state.token.decimal) || 0;
const isWeb3Wallet = this.props.wallet instanceof Web3Wallet;
const isLedgerWallet = this.props.wallet instanceof LedgerWallet;
const isTrezorWallet = this.props.wallet instanceof TrezorWallet;
return (
<TabSection>
<section className="Tab-content">
@ -353,7 +361,18 @@ export class SendTransaction extends React.Component<Props, State> {
{generateTxProcessing && (
<div className="container">
<div className="row form-group text-center">
<Spinner size="x5" />
{isLedgerWallet || isTrezorWallet ? (
<div>
<p>
<b>
Confirm transaction on hardware wallet
</b>
</p>
<Spinner size="x2" />
</div>
) : (
<Spinner size="x2" />
)}
</div>
</div>
)}