Commit 69e32325 authored by attilak's avatar attilak

Only retrieve payment methods again when country code changed

parent c68cc30d
...@@ -71,6 +71,9 @@ define( ...@@ -71,6 +71,9 @@ define(
); );
/** Add view logic here if needed */ /** Add view logic here if needed */
return Component.extend({ return Component.extend({
defaults: {
countryCode: ""
},
initialize: function () { initialize: function () {
var self = this; var self = this;
...@@ -88,7 +91,10 @@ define( ...@@ -88,7 +91,10 @@ define(
} }
quote.shippingAddress.subscribe(function() { quote.shippingAddress.subscribe(function() {
self.setAdyenPaymentMethods(); if (!!quote.shippingAddress().countryId && self.countryCode !== quote.shippingAddress().countryId) {
self.countryCode = quote.shippingAddress().countryId;
self.setAdyenPaymentMethods();
}
}) })
}, },
setAdyenPaymentMethods: function() { setAdyenPaymentMethods: function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment