Cart's delivery fee and Checkout's address validation both fetched the customer profile without forcing a cache refresh (2h TTL), then let that possibly-stale address book unconditionally overwrite the just-picked appState.address coordinates before building the fee/validation payload. Result: changing the address on Home didn't reliably move the cart's delivery fee, and Checkout's 'Alterar' could silently revert to the old address when the stale coordinates made the backend report it as not served. Force-refresh the profile fetch and only use it to fill genuine gaps in appState.address, never to override a live user selection.
367 lines
14 KiB
Swift
367 lines
14 KiB
Swift