[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser] 249/311: Bug 1747898 - P2. Fix issues in `promptToSaveCreditCard` r=sgalich, tgiles a=dmeehan
This is an automated email from the git hooks/post-receive script.
pierov pushed a commit to branch geckoview-99.0.1-11.0-1
in repository tor-browser.
commit d7b021492d73d8357dc48ec77f259aacfcdb0854
Author: Dimi <dlee@xxxxxxxxxxx>
AuthorDate: Tue Mar 22 21:21:07 2022 +0000
Bug 1747898 - P2. Fix issues in `promptToSaveCreditCard` r=sgalich,tgiles a=dmeehan
There are two bugs in promptToSaveCreditCard
1. `newCreditCard` doesn't contain `record` memeber variable
2. `creditCard.record` should use `cc-name`, `cc-number`, etc to access
data instead of `record.name`, `record.number`
Differential Revision: https://phabricator.services.mozilla.com/D141767
---
.../components/formautofill/android/FormAutofillPrompter.jsm | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/toolkit/components/formautofill/android/FormAutofillPrompter.jsm b/toolkit/components/formautofill/android/FormAutofillPrompter.jsm
index c94dce7064301..fff633d5a70a3 100644
--- a/toolkit/components/formautofill/android/FormAutofillPrompter.jsm
+++ b/toolkit/components/formautofill/android/FormAutofillPrompter.jsm
@@ -49,19 +49,13 @@ let FormAutofillPrompter = {
let newCreditCard;
if (creditCard.guid) {
let originalCCData = await storage.creditCards.get(creditCard.guid);
-
- newCreditCard = CreditCard.fromGecko(originalCCData || creditCard.record);
- newCreditCard.record.name = creditCard.record.name;
- newCreditCard.record.number = creditCard.record.number;
- newCreditCard.record.expMonth = creditCard.record.expMonth;
- newCreditCard.record.expYear = creditCard.record.expYear;
- newCreditCard.record.type = creditCard.record.type;
+ newCreditCard = { ...originalCCData, ...creditCard.record };
} else {
- newCreditCard = creditCard;
+ newCreditCard = creditCard.record;
}
prompt.asyncShowPrompt(
- this._createMessage([CreditCard.fromGecko(newCreditCard.record)]),
+ this._createMessage([CreditCard.fromGecko(newCreditCard)]),
result => {
const selectedCreditCard = result?.selection?.value;
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits