{"version":3,"sources":["../../src/api/transactionSubmission/helpers.ts"],"sourcesContent":["export function ValidateFeePayerDataOnSubmission(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) {\n  const originalMethod = descriptor.value;\n  /* eslint-disable-next-line func-names, no-param-reassign */\n  descriptor.value = async function (...args: any[]) {\n    const [methodArgs] = args;\n\n    if (methodArgs.transaction.feePayerAddress && !methodArgs.feePayerAuthenticator) {\n      throw new Error(\"You are submitting a Fee Payer transaction but missing the feePayerAuthenticator\");\n    }\n\n    return originalMethod.apply(this, args);\n  };\n\n  return descriptor;\n}\n\nexport function ValidateFeePayerDataOnSimulation(target: unknown, propertyKey: string, descriptor: PropertyDescriptor) {\n  const originalMethod = descriptor.value;\n  /* eslint-disable-next-line func-names, no-param-reassign */\n  descriptor.value = async function (...args: any[]) {\n    const [methodArgs] = args;\n\n    if (methodArgs.transaction.feePayerAddress && !methodArgs.feePayerPublicKey) {\n      throw new Error(\"You are simulating a Fee Payer transaction but missing the feePayerPublicKey\");\n    }\n\n    return originalMethod.apply(this, args);\n  };\n\n  return descriptor;\n}\n"],"mappings":"AAAO,SAASA,EAAiCC,EAAiBC,EAAqBC,EAAgC,CACrH,IAAMC,EAAiBD,EAAW,MAElC,OAAAA,EAAW,MAAQ,kBAAmBE,EAAa,CACjD,GAAM,CAACC,CAAU,EAAID,EAErB,GAAIC,EAAW,YAAY,iBAAmB,CAACA,EAAW,sBACxD,MAAM,IAAI,MAAM,kFAAkF,EAGpG,OAAOF,EAAe,MAAM,KAAMC,CAAI,CACxC,EAEOF,CACT,CAEO,SAASI,EAAiCN,EAAiBC,EAAqBC,EAAgC,CACrH,IAAMC,EAAiBD,EAAW,MAElC,OAAAA,EAAW,MAAQ,kBAAmBE,EAAa,CACjD,GAAM,CAACC,CAAU,EAAID,EAErB,GAAIC,EAAW,YAAY,iBAAmB,CAACA,EAAW,kBACxD,MAAM,IAAI,MAAM,8EAA8E,EAGhG,OAAOF,EAAe,MAAM,KAAMC,CAAI,CACxC,EAEOF,CACT","names":["ValidateFeePayerDataOnSubmission","target","propertyKey","descriptor","originalMethod","args","methodArgs","ValidateFeePayerDataOnSimulation"]}