{"version":3,"file":"UnexpectedAmountError.cjs","sources":["../../../src/errors/UnexpectedAmountError.ts"],"sourcesContent":["import type { Amount, AmountDecimals, AmountIdentifier } from '../Amount';\nimport { SdkError } from './SdkError';\n\n/** @category Errors */\nexport class UnexpectedAmountError extends SdkError {\n  readonly name: string = 'UnexpectedAmountError';\n\n  readonly amount: Amount;\n\n  readonly expectedIdentifier: AmountIdentifier;\n\n  readonly expectedDecimals: AmountDecimals;\n\n  constructor(\n    amount: Amount,\n    expectedIdentifier: AmountIdentifier,\n    expectedDecimals: AmountDecimals\n  ) {\n    const message =\n      `Expected amount of type [${expectedIdentifier} with ${expectedDecimals} decimals] ` +\n      `but got [${amount.identifier} with ${amount.decimals} decimals]. ` +\n      `Ensure the provided Amount is of the expected type.`;\n    super(message);\n    this.amount = amount;\n    this.expectedIdentifier = expectedIdentifier;\n    this.expectedDecimals = expectedDecimals;\n  }\n}\n"],"names":["UnexpectedAmountError","SdkError","name","constructor","amount","expectedIdentifier","expectedDecimals","message","identifier","decimals"],"mappings":";;;;;;AAGA;AACO,MAAMA,qBAAqB,SAASC,iBAAQ,CAAC;AACzCC,EAAAA,IAAI,GAAW,uBAAuB,CAAA;AAQ/CC,EAAAA,WAAW,CACTC,MAAc,EACdC,kBAAoC,EACpCC,gBAAgC,EAChC;AACA,IAAA,MAAMC,OAAO,GACV,CAAA,yBAAA,EAA2BF,kBAAmB,CAAQC,MAAAA,EAAAA,gBAAiB,aAAY,GACnF,CAAA,SAAA,EAAWF,MAAM,CAACI,UAAW,CAAQJ,MAAAA,EAAAA,MAAM,CAACK,QAAS,CAAA,YAAA,CAAa,GAClE,CAAoD,mDAAA,CAAA,CAAA;IACvD,KAAK,CAACF,OAAO,CAAC,CAAA;IACd,IAAI,CAACH,MAAM,GAAGA,MAAM,CAAA;IACpB,IAAI,CAACC,kBAAkB,GAAGA,kBAAkB,CAAA;IAC5C,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,CAAA;AAC1C,GAAA;AACF;;;;"}