Preconditions
Magento 2.x
Steps to reproduce
- Go to Checkout as Guest
- Add shipping information
- Click on COD payment
- Refresh page
Expected result
Shipping and Billing address are maintained.
Actual result
Shipping and Billing are missing, since checkout-data from LocalStorage (mage-cache-storage) is being deleted on payment selection.

How to fix
file view/frontend/web/js/view/payment/method-renderer/cashondelivery.js, add false after row 71.
before
return storage.put(
serviceUrl,
JSON.stringify(payload),
).done(function () {
cashondelivery.canShowCashOnDelivery(quote.paymentMethod().method == 'msp_cashondelivery');
getTotalsAction([]);
fullScreenLoader.stopLoader();
});
after
return storage.put(
serviceUrl,
JSON.stringify(payload),
false
).done(function () {
cashondelivery.canShowCashOnDelivery(quote.paymentMethod().method == 'msp_cashondelivery');
getTotalsAction([]);
fullScreenLoader.stopLoader();
});