2018-01-29 22:58:07 +00:00
|
|
|
import { GenerateTransactionFactory } from './GenerateTransactionFactory';
|
|
|
|
import React from 'react';
|
|
|
|
import translate from 'translations';
|
2018-03-20 13:11:04 +00:00
|
|
|
import { ScheduleTransactionFactory } from './ScheduleTransactionFactory';
|
2018-01-29 22:58:07 +00:00
|
|
|
|
2018-03-20 13:11:04 +00:00
|
|
|
interface Props {
|
|
|
|
scheduling?: boolean;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const GenerateTransaction: React.SFC<Props> = props => {
|
|
|
|
if (props.scheduling) {
|
|
|
|
return (
|
|
|
|
<ScheduleTransactionFactory
|
|
|
|
withProps={({ disabled, isWeb3Wallet, onClick }) => (
|
|
|
|
<button disabled={disabled} className="btn btn-info btn-block" onClick={onClick}>
|
|
|
|
{isWeb3Wallet ? translate('SCHEDULE_schedule') : translate('DEP_signtx')}
|
|
|
|
</button>
|
|
|
|
)}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2018-03-23 16:41:47 +00:00
|
|
|
<GenerateTransactionFactory
|
|
|
|
withProps={({ disabled, isWeb3Wallet, onClick }) => (
|
2018-03-20 13:11:04 +00:00
|
|
|
<button disabled={disabled} className="btn btn-info btn-block" onClick={onClick}>
|
|
|
|
{isWeb3Wallet ? translate('SEND_generate') : translate('DEP_signtx')}
|
|
|
|
</button>
|
2018-03-23 16:41:47 +00:00
|
|
|
)}
|
|
|
|
/>
|
2018-03-20 13:11:04 +00:00
|
|
|
);
|
|
|
|
};
|