Fix transaction currency on quotations
Build and deploy Docker image / build (push) Successful in 51s
Build and deploy Docker image / build (push) Successful in 51s
This commit is contained in:
@@ -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`)
|
||||
|
||||
Reference in New Issue
Block a user