Newer
Older
// Copyright 2015-2018 Parity Technologies (UK) Ltd.
// This file is part of Parity.
//
import React, { Component } from 'react';
import { chainName$, withoutLoading } from '@parity/light.js';
import { inject, observer } from 'mobx-react';
import light from '@parity/light.js-react';
import { withProps } from 'recompose';
import check from '../../assets/img/icons/check.svg';
import loading from '../../assets/img/icons/loading.svg';
import withTokens from '../../utils/withTokens';
Luke Schoen
committed
import { blockscoutTxUrl } from '../../utils/blockscout';
// Number of confirmations to consider a transaction successful
const MIN_CONFIRMATIONS = 6;
chainName: () => chainName$().pipe(withoutLoading())
@withTokens
@withProps(({ match: { params: { tokenAddress } }, tokens }) => ({
token: tokens[tokenAddress]
}))
@observer
class Sent extends Component {
// If we refresh on this page, return to homepage
if (!this.props.sendStore.txStatus) {
this.handleGoToHomepage();
}
handleGoToHomepage = () => {
const { history, sendStore } = this.props;
sendStore.clear();
history.push('/');
};
Luke Schoen
committed
confirmationsCount={sendStore.confirmations}
confirmationsMinimum={MIN_CONFIRMATIONS}
Luke Schoen
committed
txStatus={sendStore.txStatus}
</div>
);
}
}
export default Sent;