[Gift Cards] Fix decoding error when gift card amount has non-integer value #9795
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes: #9793
Description
This PR fixes a decoding error for stores using the Gift Cards extension, if the gift card in an order has an amount that is a non-integer. This is because the
amountproperty forOrderGiftCardwas mistakenly given anInt64type, so it couldn't handle gift card amounts with decimal values. This is resolved by updating theamountto use aDoubletype to handle those non-integer amounts.Changes
amountproperty inOrderGiftCardin the Networking layer to useDoubletype.amountattribute in theOrderGiftCardentity in the Storage layer useDoubletype. This includes a new Core Data model and migration test for the change.Testing instructions
Prerequisites
To test
Screenshots
RELEASE-NOTES.txtif necessary.