MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / restoreBillingProfileNonSensitive

Function restoreBillingProfileNonSensitive

static/js/payment.js:745–760  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

743}
744
745function 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
762function getBillingTemplates() {
763 const raw = storage.get(BILLING_TEMPLATE_STORAGE_KEY, []);

Callers 1

payment.jsFile · 0.85

Calls 3

setInputValueFunction · 0.85
onBillingCountryChangedFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected