{
  "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": "yCAUO,IAAMA,EAAuB,CAAC,CACnC,MAAAC,EACA,aAAAC,EACA,WAAAC,CACF,IAA0B,CACxB,IAAMC,EAAoB,CAAC,GAAGF,CAAY,EAS1C,GAPID,EAAM,CAAC,uBAA8CA,EAAM,CAAC,IAC9DG,EAAkB,CAAC,EAAIC,EAAe,CACpC,KAAMJ,EAAM,CAAC,EACb,sBACF,CAAC,GAGCE,uBAAuDF,EAAM,CAAC,EAAG,CACnE,IAAMK,EAAe,OAAO,KAAK,OAAOL,EAAM,CAAC,CAAC,EAAG,QAAQ,EAC3DG,EAAkB,CAAC,EAAIC,EAAe,CACpC,KAAMC,EAAa,SAAS,KAAK,EACjC,sBACF,CAAC,CACH,CAEA,OAAOF,CACT",
  "names": ["getSmartDecodedParts", "parts", "decodedParts", "identifier", "smartDecodedParts", "decodeByMethod", "base64Buffer"]
}
