Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Commit

Permalink
reject fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Pechalka committed Nov 27, 2018
1 parent 78f7d26 commit 4a584ae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/components/ConfirmationPopup/ConfirmationPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import Button from '../Button/Button';
const ConfirmationPopup = ({
from, to, approveCallback, rejectCallback, children,
content, txHash, totalAmount, accountBalance, insufficientFunds,
hidePending
}) => (
<div className='confirmation-popup'>
<span>
Expand Down Expand Up @@ -51,7 +52,7 @@ const ConfirmationPopup = ({
</Message>
</div>
<div className='confirmation-popup__buttons'>
<Button style={ { width: 250 } } color='turquoise' onClick={ rejectCallback }>
<Button style={ { width: 250 } } color='turquoise' onClick={ hidePending }>
Close window
</Button>
</div>
Expand Down
4 changes: 3 additions & 1 deletion src/containers/Application/ConfirmationPopup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { connect } from 'react-redux';
import web3 from 'web3';
import ConfirmationPopup, { TxDetailsContainer } from '../../components/ConfirmationPopup/ConfirmationPopup';
import { approve, reject, getDefaultAccountBalance } from '../../redux/wallet';
import { approve, reject, getDefaultAccountBalance, hidePending } from '../../redux/wallet';
import Input from '../../components/Input/Input';

class ConfirmationPopupContainer extends Component {
Expand Down Expand Up @@ -71,6 +71,7 @@ class ConfirmationPopupContainer extends Component {
insufficientFunds={ insufficientFunds }
approveCallback={ this.approve }
rejectCallback={ this.reject }
hidePending={() => this.props.hidePending()}
txHash={ lastTransactionId }
content={ (
<TxDetailsContainer>
Expand Down Expand Up @@ -125,5 +126,6 @@ export default connect(
{
approve,
reject,
hidePending
},
)(ConfirmationPopupContainer);
2 changes: 1 addition & 1 deletion src/redux/wallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ export const deleteAccount = address => (dispatch, getState) => new Promise((res
});

const showPending = payload => ({ type: 'SHOW_PENDING', payload });
const hidePending = () => ({ type: 'HIDE_PENDING' });
export const hidePending = () => ({ type: 'HIDE_PENDING' });


export const sendFunds = (_from, to, amount, _confirmationNumber = 3) => () => new Promise((resolve) => {
Expand Down

0 comments on commit 4a584ae

Please sign in to comment.