fix: Add new Google Wallet Tap & Pay error codes#38
Conversation
…constants with deprecation suppressions
Summary of ChangesHello @matheuscamposbuilders, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! Este pull request aprimora a integração com a Google Wallet, adicionando um conjunto abrangente de novos códigos de erro da API Tap & Pay. As mudanças garantem que a aplicação possa lidar com uma gama mais ampla de cenários de erro, melhorando a robustez e a experiência do usuário. Além disso, foram realizadas atualizações nas definições de tipos e nos mocks para manter a paridade entre as plataformas e facilitar o desenvolvimento e teste futuros. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
Este pull request adiciona novos códigos de erro do Google Wallet e atualiza as definições de tipo e mocks correspondentes. As alterações parecem corretas em sua maior parte, mas identifiquei alguns erros críticos de sintaxe nos arquivos Kotlin (GoogleWalletImplementation.kt, ErrorCode.kt, e GoogleWalletMock.kt) que parecem ser resultado de um erro de cópia e cola. Blocos de código markdown foram inseridos diretamente no código, o que impedirá a compilação. Corrigir esses erros é essencial para que a aplicação funcione.
android/src/googleWallet/java/com/builders/wallet/googletapandpay/GoogleWalletImplementation.kt
Outdated
Show resolved
Hide resolved
android/src/googleWallet/java/com/builders/wallet/googletapandpay/util/ErrorCode.kt
Outdated
Show resolved
Hide resolved
android/src/googleWallet/java/com/builders/wallet/googletapandpay/util/ErrorCode.kt
Outdated
Show resolved
Hide resolved
android/src/main/java/com/builders/wallet/googletapandpay/GoogleWalletMock.kt
Outdated
Show resolved
Hide resolved
neijrbuilders
left a comment
There was a problem hiding this comment.
Coloquei alguns comentarios. E outra duvida onde viw que essas constants estavam DEPRECATION ?
android/src/googleWallet/java/com/builders/wallet/googletapandpay/util/ErrorCode.kt
Outdated
Show resolved
Hide resolved
android/src/googleWallet/java/com/builders/wallet/googletapandpay/util/ErrorCode.kt
Outdated
Show resolved
Hide resolved
… credentials timeout and remove deprecation flags.
… credentials timeout and remove deprecation flags.
…' of github-work:platformbuilders/wallet-bridge-react-native into feature/get-more-status-code-constants-of-google-wallet
src/google-wallet.ios.ts
Outdated
| TAP_AND_PAY_TOKENIZE_ERROR: 9, | ||
| TAP_AND_PAY_TOKEN_ACTIVATION_REQUIRED: 10, | ||
| TAP_AND_PAY_USER_CANCELED_FLOW: 11, | ||
| TAP_AND_PAY_ENROLL_FOR_VIRTUAL_CARDS_FAILED: 12, |
There was a problem hiding this comment.
Depois temos que ver esse arquivo do google-wallet e samsung-wallet para ios não fazem muito sentido.
Resumo das Alterações
1. Android (Kotlin)
GoogleWalletImplementation.kt:@SuppressWarnings("deprecation")para silenciar avisos sobre o uso de constantes legadas da Google Wallet, comoTAP_AND_PAY_CHECK_ELIGIBILITY_ERROReTAP_AND_PAY_PAYMENT_CREDENTIALS_DELIVERY_TIMEOUT.GoogleWalletErrorCode.kt:SAVE_CARD_ERRORINELIGIBLE_FOR_TOKENIZATIONTOKENIZATION_DECLINEDTOKENIZE_ERRORTOKEN_ACTIVATION_REQUIREDUSER_CANCELED_FLOWENROLL_FOR_VIRTUAL_CARDS_FAILEDGoogleWalletMock.kt:2. Definições de Tipos e Stubs (TypeScript/iOS)
src/types/google-wallet.types.ts:GoogleWalletConstantspara incluir as novas propriedades de erro mencionadas acima, acompanhadas de comentários descritivos em português explicando o significado de cada código.src/google-wallet.ios.ts:iOS_STUB_CONSTANTSpara manter a paridade com a nova interface, garantindo que o código iOS (stub) não quebre com a mudança dos tipos.src/__tests__/__mocks__/index.ts:setLogListenereremoveLogListenertanto no módulo Google quanto no Samsung.3. Gerenciamento de Projeto
package.json:1.1.1para1.1.2.Detalhes das Novas Constantes Adicionadas
TAP_AND_PAY_SAVE_CARD_ERRORTAP_AND_PAY_INELIGIBLE_FOR_TOKENIZATIONTAP_AND_PAY_TOKENIZATION_DECLINEDTAP_AND_PAY_TOKENIZE_ERRORTAP_AND_PAY_TOKEN_ACTIVATION_REQUIREDTAP_AND_PAY_USER_CANCELED_FLOWTAP_AND_PAY_ENROLL_FOR_VIRTUAL_CARDS_FAILED