{
  "version": 3,
  "sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getGasPriceOptions.ts"],
  "sourcesContent": ["import BigNumber from 'bignumber.js';\nimport { GAS_PRICE } from 'constants/mvx.constants';\nimport { EMPTY_PPU } from 'constants/placeholders.constants';\nimport { IPlainTransactionObject } from 'lib/sdkCore';\nimport { NetworkType } from 'types/network.types';\nimport { getRecommendedGasPrice } from './getRecommendedGasPrice';\n\ntype GetGasPriceOptionsParamsType = {\n  shard?: number;\n  gasStationMetadata: NetworkType['gasStationMetadata'];\n  transaction: IPlainTransactionObject;\n  initialGasPrice?: number;\n};\n\nexport const getGasPriceOptions = ({\n  shard,\n  gasStationMetadata,\n  transaction,\n  initialGasPrice = GAS_PRICE\n}: GetGasPriceOptionsParamsType) => {\n  const fastPpu = gasStationMetadata\n    ? gasStationMetadata[Number(shard)]?.fast\n    : EMPTY_PPU;\n\n  const fasterPpu = gasStationMetadata\n    ? gasStationMetadata[Number(shard)]?.faster\n    : EMPTY_PPU;\n\n  const standardGasPrice = getRecommendedGasPrice({\n    transaction,\n    gasPriceData: {\n      initialGasPrice,\n      ppu: EMPTY_PPU\n    }\n  });\n\n  const fastGasPrice = getRecommendedGasPrice({\n    transaction,\n    gasPriceData: {\n      initialGasPrice,\n      ppu: fastPpu\n    }\n  });\n\n  const fasterGasPrice = getRecommendedGasPrice({\n    transaction,\n    gasPriceData: {\n      initialGasPrice,\n      ppu: fasterPpu\n    }\n  });\n\n  const gasPriceOptions = [\n    {\n      label: 'Standard',\n      value: standardGasPrice\n    }\n  ];\n\n  const defaultFastGasPrice = new BigNumber(standardGasPrice)\n    .times(1.05)\n    .toNumber();\n\n  gasPriceOptions.push({\n    label: 'Fast',\n    value: BigNumber.max(fastGasPrice, defaultFastGasPrice).toNumber()\n  });\n\n  const defaultFasterGasPrice = new BigNumber(standardGasPrice)\n    .times(1.1)\n    .toNumber();\n\n  gasPriceOptions.push({\n    label: 'Faster',\n    value: BigNumber.max(fasterGasPrice, defaultFasterGasPrice).toNumber()\n  });\n\n  return gasPriceOptions;\n};\n"],
  "mappings": "2HAAA,OAAOA,MAAe,eAcf,IAAMC,EAAqB,CAAC,CACjC,MAAAC,EACA,mBAAAC,EACA,YAAAC,EACA,gBAAAC,EAAkB,GACpB,IAAoC,CAClC,IAAMC,EAAUH,EACZA,EAAmB,OAAOD,CAAK,CAAC,GAAG,KACnC,EAEEK,EAAYJ,EACdA,EAAmB,OAAOD,CAAK,CAAC,GAAG,OACnC,EAEEM,EAAmBC,EAAuB,CAC9C,YAAAL,EACA,aAAc,CACZ,gBAAAC,EACA,IAAK,CACP,CACF,CAAC,EAEKK,EAAeD,EAAuB,CAC1C,YAAAL,EACA,aAAc,CACZ,gBAAAC,EACA,IAAKC,CACP,CACF,CAAC,EAEKK,EAAiBF,EAAuB,CAC5C,YAAAL,EACA,aAAc,CACZ,gBAAAC,EACA,IAAKE,CACP,CACF,CAAC,EAEKK,EAAkB,CACtB,CACE,MAAO,WACP,MAAOJ,CACT,CACF,EAEMK,EAAsB,IAAIC,EAAUN,CAAgB,EACvD,MAAM,IAAI,EACV,SAAS,EAEZI,EAAgB,KAAK,CACnB,MAAO,OACP,MAAOE,EAAU,IAAIJ,EAAcG,CAAmB,EAAE,SAAS,CACnE,CAAC,EAED,IAAME,EAAwB,IAAID,EAAUN,CAAgB,EACzD,MAAM,GAAG,EACT,SAAS,EAEZ,OAAAI,EAAgB,KAAK,CACnB,MAAO,SACP,MAAOE,EAAU,IAAIH,EAAgBI,CAAqB,EAAE,SAAS,CACvE,CAAC,EAEMH,CACT",
  "names": ["BigNumber", "getGasPriceOptions", "shard", "gasStationMetadata", "transaction", "initialGasPrice", "fastPpu", "fasterPpu", "standardGasPrice", "getRecommendedGasPrice", "fastGasPrice", "fasterGasPrice", "gasPriceOptions", "defaultFastGasPrice", "BigNumber", "defaultFasterGasPrice"]
}
