2016-11-08 12:42:32 +01:00
|
|
|
// Copyright 2015, 2016 Ethcore (UK) Ltd.
|
|
|
|
// This file is part of Parity.
|
|
|
|
|
|
|
|
// Parity is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
|
|
|
// Parity is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
import React, { Component, PropTypes } from 'react';
|
|
|
|
|
2016-12-07 10:25:57 +01:00
|
|
|
import { nullableProptype } from '~/util/proptypes';
|
2016-12-05 11:47:13 +01:00
|
|
|
import TxHash from '~/ui/TxHash';
|
2016-11-15 19:05:16 +01:00
|
|
|
import {
|
2016-11-15 13:33:58 +01:00
|
|
|
POSTING_REQUEST, POSTED_REQUEST, REQUESTING_SMS
|
2016-11-15 19:05:16 +01:00
|
|
|
} from '../store';
|
2016-11-08 12:42:32 +01:00
|
|
|
|
2016-11-08 16:54:25 +01:00
|
|
|
import styles from './sendRequest.css';
|
2016-11-08 12:42:32 +01:00
|
|
|
|
2016-11-15 13:33:58 +01:00
|
|
|
export default class SendRequest extends Component {
|
2016-11-08 12:42:32 +01:00
|
|
|
static propTypes = {
|
2016-11-15 13:33:58 +01:00
|
|
|
step: PropTypes.any.isRequired,
|
2016-12-07 10:25:57 +01:00
|
|
|
tx: nullableProptype(PropTypes.any.isRequired)
|
2016-11-08 12:42:32 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2016-11-15 13:33:58 +01:00
|
|
|
const { step, tx } = this.props;
|
2016-11-08 12:42:32 +01:00
|
|
|
|
2016-11-17 12:26:59 +01:00
|
|
|
switch (step) {
|
|
|
|
case POSTING_REQUEST:
|
|
|
|
return (<p>A verification request will be sent to the contract. Please authorize this using the Parity Signer.</p>);
|
|
|
|
|
|
|
|
case POSTED_REQUEST:
|
|
|
|
return (
|
|
|
|
<div className={ styles.centered }>
|
|
|
|
<TxHash hash={ tx } maxConfirmations={ 1 } />
|
|
|
|
<p>Please keep this window open.</p>
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
case REQUESTING_SMS:
|
|
|
|
return (
|
2016-11-28 17:39:55 +01:00
|
|
|
<p>Requesting an SMS from the Parity server and waiting for the puzzle to be put into the contract.</p>
|
2016-11-17 12:26:59 +01:00
|
|
|
);
|
|
|
|
|
|
|
|
default:
|
|
|
|
return null;
|
2016-11-08 12:42:32 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|