{
  "version": 3,
  "sources": ["../../../../../src/utils/transactions/getDecodedDataField/helpers/getSmartDecodedParts.ts"],
  "sourcesContent": ["import { TransactionTypesEnum } from 'types/enums.types';\nimport { DecodeMethodEnum } from 'types/serverTransactions.types';\nimport { decodeByMethod } from './decodeByMethod';\n\ninterface ISmartDecodedParts {\n  parts: string[];\n  decodedParts: string[];\n  identifier?: string;\n}\n\nexport const getSmartDecodedParts = ({\n  parts,\n  decodedParts,\n  identifier\n}: ISmartDecodedParts) => {\n  const smartDecodedParts = [...decodedParts];\n\n  if (parts[0] === TransactionTypesEnum.ESDTNFTTransfer && parts[2]) {\n    smartDecodedParts[2] = decodeByMethod({\n      data: parts[2],\n      decodeMethod: DecodeMethodEnum.decimal\n    });\n  }\n\n  if (identifier === TransactionTypesEnum.ESDTNFTTransfer && parts[1]) {\n    const base64Buffer = Buffer.from(String(parts[1]), 'base64');\n    smartDecodedParts[1] = decodeByMethod({\n      data: base64Buffer.toString('hex'),\n      decodeMethod: DecodeMethodEnum.decimal\n    });\n  }\n\n  return smartDecodedParts;\n};\n"],
  "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,0BAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAqC,6BACrCC,EAAiC,0CACjCC,EAA+B,4BAQxB,MAAMJ,EAAuB,CAAC,CACnC,MAAAK,EACA,aAAAC,EACA,WAAAC,CACF,IAA0B,CACxB,MAAMC,EAAoB,CAAC,GAAGF,CAAY,EAS1C,GAPID,EAAM,CAAC,IAAM,uBAAqB,iBAAmBA,EAAM,CAAC,IAC9DG,EAAkB,CAAC,KAAI,kBAAe,CACpC,KAAMH,EAAM,CAAC,EACb,aAAc,mBAAiB,OACjC,CAAC,GAGCE,IAAe,uBAAqB,iBAAmBF,EAAM,CAAC,EAAG,CACnE,MAAMI,EAAe,OAAO,KAAK,OAAOJ,EAAM,CAAC,CAAC,EAAG,QAAQ,EAC3DG,EAAkB,CAAC,KAAI,kBAAe,CACpC,KAAMC,EAAa,SAAS,KAAK,EACjC,aAAc,mBAAiB,OACjC,CAAC,CACH,CAEA,OAAOD,CACT",
  "names": ["getSmartDecodedParts_exports", "__export", "getSmartDecodedParts", "__toCommonJS", "import_enums", "import_serverTransactions", "import_decodeByMethod", "parts", "decodedParts", "identifier", "smartDecodedParts", "base64Buffer"]
}
