/**
 * This file contains functions that convert BigNumberish to hex, string, and number
 */ import BigNumber from 'bignumber.js' ; import { BigNumberish } from './types' ; /**
 * Converts `hex` to string
 */ export const convertHexToString = ( hex ) : string => new BigNumber ( hex ) . toFixed ( ) ; /**
 * Converts `stringToConvert` to hex number
 */ export const convertStringToHex = ( stringToConvert ) : string => new BigNumber ( stringToConvert ) . toString ( 16 ) ; /**
 * Converts `value` to a number
 */ export const convertStringToNumber = ( value ) => new BigNumber ( value ) . toNumber ( ) ; /**
 * Converts `value` to a string.
 */ export const convertNumberToString = ( value ) : string => new BigNumber ( value ) . toFixed ( ) ;