Open
Description
Describe the bug
DefaultMoneyStrategy's round is called instead of custom MoneyStrategy.
In the Vendure config, entityOptions.moneyStrategy is set to our custom MoneyStrategy implementation. The custom ColumnOptions is used by Vendure, but the round method is never called.
With the debugger I found the root cause:
https://github.com/vendure-ecommerce/vendure/blob/master/packages/core/src/common/round-money.ts#L15
When it first gets the MoneyStrategy it will still be the default vendure config, if I remove the state saving, it will work as expected, as later the getConfig returns the Vendure config given by us.
Expected behavior
Use the round method of the configured custom MoneyStrategy
Environment:
- @vendure/core version: 3.1.2
- Nodejs version: 20
- Database: postgres 16