Daniel Ternyak 84bae60c02
Refactor Generate Transaction (#960)
* Make generic modal

* Allow generic modals to be injected into send button component

* Refactor generate transaction, cleanup transaction sagas, simplify signing process

* Get passing unit tests

* Make previous test more comprehensive

* Fix ts errors
2018-01-29 16:58:07 -06:00

21 lines
627 B
TypeScript

import { signTransactionRequested, TSignTransactionRequested } from 'actions/transaction';
import React, { Component } from 'react';
import { connect } from 'react-redux';
interface DispatchProps {
signTransactionRequested: TSignTransactionRequested;
}
interface OwnProps {
isWeb3: boolean;
withSigner(signer: TSignTransactionRequested): React.ReactElement<any> | null;
}
class Container extends Component<DispatchProps & OwnProps, {}> {
public render() {
return this.props.withSigner(this.props.signTransactionRequested);
}
}
export const WithSigner = connect(null, { signTransactionRequested })(Container);