{
  "version": 3,
  "sources": ["../../src/providers/strategies/helpers/signTransactions/helpers/getCommonData/helpers/getRecommendedGasPrice.ts"],
  "sourcesContent": ["import { IPlainTransactionObject } from 'lib/sdkCore';\nimport { recommendGasPrice } from 'lib/sdkDappUtils';\n\ninterface GetRecommendedGasPricePropsType {\n  transaction: IPlainTransactionObject;\n  gasPriceData?: {\n    initialGasPrice: number;\n    ppu: number;\n  };\n}\n\nexport function getRecommendedGasPrice({\n  transaction,\n  gasPriceData\n}: GetRecommendedGasPricePropsType) {\n  if (!gasPriceData) {\n    throw new Error('Gas price not found for nonce: ' + transaction.nonce);\n  }\n\n  const { initialGasPrice, ppu } = gasPriceData;\n\n  const newGasPrice = ppu\n    ? recommendGasPrice({\n        transactionDataLength: String(transaction?.data || '').length,\n        transactionGasLimit: transaction.gasLimit,\n        ppu\n      })\n    : initialGasPrice;\n\n  return newGasPrice;\n}\n"],
  "mappings": "yCAWO,SAASA,EAAuB,CACrC,YAAAC,EACA,aAAAC,CACF,EAAoC,CAClC,GAAI,CAACA,EACH,MAAM,IAAI,MAAM,kCAAoCD,EAAY,KAAK,EAGvE,GAAM,CAAE,gBAAAE,EAAiB,IAAAC,CAAI,EAAIF,EAUjC,OARoBE,EAChBC,EAAkB,CAChB,sBAAuB,OAAOJ,GAAa,MAAQ,EAAE,EAAE,OACvD,oBAAqBA,EAAY,SACjC,IAAAG,CACF,CAAC,EACDD,CAGN",
  "names": ["getRecommendedGasPrice", "transaction", "gasPriceData", "initialGasPrice", "ppu", "recommendGasPrice"]
}
