⬆️ Upgrade dependencies
This commit is contained in:
@@ -40,9 +40,10 @@ const createStripePaymentIntent =
|
||||
: stripeKeys.live.secretKey,
|
||||
{ apiVersion: '2022-11-15' }
|
||||
)
|
||||
const amount =
|
||||
const amount = Math.round(
|
||||
Number(parseVariables(variables)(options.amount)) *
|
||||
(isZeroDecimalCurrency(options.currency) ? 1 : 100)
|
||||
(isZeroDecimalCurrency(options.currency) ? 1 : 100)
|
||||
)
|
||||
if (isNaN(amount))
|
||||
throw new TRPCError({
|
||||
code: 'BAD_REQUEST',
|
||||
|
||||
@@ -61,11 +61,6 @@ const evaluateSetVariableExpression =
|
||||
const evaluating = parseVariables(variables, { fieldToParse: 'id' })(
|
||||
str.includes('return ') ? str : `return ${str}`
|
||||
)
|
||||
console.log(
|
||||
variables.map((v) => v.id),
|
||||
...variables.map((v) => parseGuessedValueType(v.value)),
|
||||
evaluating
|
||||
)
|
||||
try {
|
||||
const func = Function(...variables.map((v) => v.id), evaluating)
|
||||
return func(...variables.map((v) => parseGuessedValueType(v.value)))
|
||||
|
||||
Reference in New Issue
Block a user