We were working on custom discount module where it allows customers to use the points assigned by the admin on checkout(kind of rewards point in magento). To give discount on the applied discount, we need to reload the quote after applying discount. Following code snippets helped us to do so.
require(
[
'Magento_Checkout/js/model/quote',
'Magento_Checkout/js/model/cart/totals-processor/default'
],
function(
quote,
totalsDefaultProvider
) {
totalsDefaultProvider.estimateTotals(quote.shippingAddress());
}
);
Let us know if you are trying achieve the same. We will guide you for the same.