mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-11 10:36:53 +00:00
20 lines
559 B
TypeScript
20 lines
559 B
TypeScript
import { AppState } from 'reducers';
|
|
import { getTimeBounty } from './fields';
|
|
import BN from 'bn.js';
|
|
import { timeBountyValidator } from 'libs/validators';
|
|
|
|
interface ICurrentTimeBounty {
|
|
raw: string;
|
|
value: BN;
|
|
}
|
|
|
|
const isValidCurrentTimeBounty = (state: AppState) => {
|
|
const currentTimeBounty = getTimeBounty(state);
|
|
|
|
return timeBountyValidator(currentTimeBounty.value);
|
|
};
|
|
|
|
const getCurrentTimeBounty = (state: AppState): ICurrentTimeBounty => getTimeBounty(state);
|
|
|
|
export { getCurrentTimeBounty, ICurrentTimeBounty, isValidCurrentTimeBounty };
|