Fix transaction currency on quotations
Build and deploy Docker image / build (push) Successful in 51s

This commit is contained in:
Ruslan Bakiev
2026-08-24 21:10:09 +07:00
parent 2f1aa30d6b
commit d34db71b51
4 changed files with 40 additions and 28 deletions
+3
View File
@@ -99,6 +99,7 @@ const demoRoutes: DemoRoute[] = [
const demoNote = JSON.stringify({ seed: 'empty-team-workspace' })
const demoPricingCountryCode = process.env.DEMO_PRICING_COUNTRY_CODE ?? 'RU'
const demoClientCurrency = process.env.DEMO_CLIENT_CURRENCY ?? 'RUB'
function stableUuid(teamUuid: string, entity: string, index: number): string {
const hex = createHash('sha256')
@@ -128,6 +129,7 @@ export async function ensureDemoWorkspaceData(access: DemoWorkspaceAccess): Prom
const needsPricingBackfill = demoQuotationPricingCount > 0 || demoOrderPricingCount > 0
const kyc = needsCalculations || needsOrders || needsPricingBackfill
? await ensureDemoKycPricingContext({
teamUuid: access.teamUuid,
userId: access.userId,
countryCode: demoPricingCountryCode,
})
@@ -179,6 +181,7 @@ export async function ensureDemoWorkspaceData(access: DemoWorkspaceAccess): Prom
const price = await lockCurrencyPrice({
sourceAmount: route.amountUsd,
sourceCurrency: 'USD',
clientCurrency: demoClientCurrency,
pricingCountryCode: kyc.countryCode,
})
const pricingEffectiveDate = new Date(`${price.rateEffectiveDate}T00:00:00.000Z`)