Certain SFields which have a DEFAULT status in the rippled codebase have not been updated to be "Optional" in the xrpl.js code repository. As of today, there are 37 instances of DEFAULT in the ledger-object definitions. One instance of this mis-match can be found in AMM's TradingFee parameter.
These fields need to be marked Optional. Furthermore, the associated RPC response models and the integration tests need to be strengthened to guard against these changes.
As an example, the PR #3153 fixes this type of issues in the Single-Asset-Vault ledger object.