()
| 743 | } |
| 744 | |
| 745 | function restoreBillingProfileNonSensitive() { |
| 746 | const saved = storage.get(BILLING_STORAGE_KEY, null); |
| 747 | if (!saved || typeof saved !== "object") { |
| 748 | setInputValue("billing-country-input", "US"); |
| 749 | setInputValue("billing-currency-input", "USD"); |
| 750 | return; |
| 751 | } |
| 752 | if (saved.billing_name) setInputValue("billing-name-input", saved.billing_name); |
| 753 | if (saved.country_code) setInputValue("billing-country-input", saved.country_code); |
| 754 | if (saved.currency) setInputValue("billing-currency-input", saved.currency); |
| 755 | if (saved.address_line1) setInputValue("billing-line1-input", saved.address_line1); |
| 756 | if (saved.address_city) setInputValue("billing-city-input", saved.address_city); |
| 757 | if (saved.address_state) setInputValue("billing-state-input", saved.address_state); |
| 758 | if (saved.postal_code) setInputValue("billing-postal-input", saved.postal_code); |
| 759 | onBillingCountryChanged(); |
| 760 | } |
| 761 | |
| 762 | function getBillingTemplates() { |
| 763 | const raw = storage.get(BILLING_TEMPLATE_STORAGE_KEY, []); |
no test coverage detected