Skip to content

Commit 87db3f0

Browse files
authored
fix: Use the correct currency for edit promotions form (medusajs#11307)
FIXES medusajs#11297
1 parent 604f46f commit 87db3f0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/admin/dashboard/src/routes/promotions/promotion-edit-details/components/edit-promotion-form/edit-promotion-details-form.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ export const EditPromotionDetailsForm = ({
233233
control={form.control}
234234
name="value"
235235
render={({ field: { onChange, ...field } }) => {
236+
const currencyCode =
237+
promotion.application_method?.currency_code ?? "USD"
238+
236239
return (
237240
<Form.Item>
238241
<Form.Label>
@@ -247,8 +250,8 @@ export const EditPromotionDetailsForm = ({
247250
onValueChange={(val) =>
248251
onChange(val ? parseInt(val) : null)
249252
}
250-
code={"USD"}
251-
symbol={getCurrencySymbol("USD")}
253+
code={currencyCode}
254+
symbol={getCurrencySymbol(currencyCode)}
252255
{...field}
253256
value={field.value}
254257
/>

0 commit comments

Comments
 (0)