-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(order): Paid Total and Refunded Total #7373
Conversation
…re/order-endpoints
…re/order-endpoints-2
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Ignored Deployments
|
|
} as OrderTypes.UpdateOrderTransactionWithSelectorDTO, | ||
] | ||
@InjectTransactionManager("baseRepository_") | ||
// @ts-ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are several ts-ignore and any
's, let's see if we can resolve those.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it fixed the types but will keep the ignore as these methods are conflicting because TS is recoginizing them as member property
and when declaring as member functions
it complains.
I won't spend much time in it.
if (!trxs.length) { | ||
return | ||
} | ||
transformPropertiesToBigNumber(trxs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought conversion to BN happens automatically?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This property totals
is a generic JSONB object, so the conversion won't happen automatically as it does when the entity is a Big Number instance on the model.
This helper will basically create the raw_
properties of their correspondent values.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These transactions are created under the hood right? Consumers won't really know of them
Yeah, in Medusa they will be created when payments are captured or refunded. But the module will have the methods available to be used elsewhere if needed. |
No description provided.