MyCrypto/common/components/renderCbs/GasQuery.tsx

15 lines
363 B
TypeScript

import React from 'react';
import { Query } from './Query';
interface Props {
withQuery({ gasLimit }: { gasLimit: string | null }): React.ReactElement<any>;
}
export const GasQuery: React.SFC<Props> = ({ withQuery }) => (
<Query
params={['limit', 'gaslimit']}
withQuery={({ limit, gaslimit }) => withQuery({ gasLimit: limit || gaslimit })}
/>
);