Skip to content

fix(android): update reject overrides to use nullable code param for …#85

Merged
mountiny merged 2 commits into
Expensify:mainfrom
jakubstec:fix/react-native-wallet-nullable-reject-code
Jun 15, 2026
Merged

fix(android): update reject overrides to use nullable code param for …#85
mountiny merged 2 commits into
Expensify:mainfrom
jakubstec:fix/react-native-wallet-nullable-reject-code

Conversation

@jakubstec

Copy link
Copy Markdown
Contributor

Details

RN 0.85 updated the Promise interface in react-native so that the code parameter in all reject overrides is now String? (nullable) instead of String. This change updates Utils.kt to match the new interface signatures, fixing a compilation error when building with RN 0.85.3.

Related Issues

Expensify/App#91629

Manual Tests

Build the Android app with RN 0.85.3 - previously failed to compile due to signature mismatch, now builds successfully.

Linked PRs

Expensify/App#92484
https://github.com/Expensify/Mobile-Expensify/pull/13959

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@jakubstec

Copy link
Copy Markdown
Contributor Author

I have read the CLA Document and I hereby sign the CLA

JakubKorytko
JakubKorytko previously approved these changes Jun 12, 2026

@JakubKorytko JakubKorytko left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. The only thing I'd consider is applying the code ?: "..." fallback consistently, but it's optional polish, not a blocker.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Android Promise implementation in Utils.getAsyncResult to match React Native 0.85’s updated Promise.reject overload signatures (where the code parameter is now nullable), fixing a compile-time override mismatch when building against RN 0.85.3.

Changes:

  • Updated Promise.reject(...) overrides in Utils.kt to accept code: String? to align with RN 0.85’s interface.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread android/src/main/java/com/expensify/wallet/Utils.kt
Comment thread android/src/main/java/com/expensify/wallet/Utils.kt
Comment thread android/src/main/java/com/expensify/wallet/Utils.kt
Comment thread android/src/main/java/com/expensify/wallet/Utils.kt Outdated
Comment thread android/src/main/java/com/expensify/wallet/Utils.kt Outdated
Comment thread android/src/main/java/com/expensify/wallet/Utils.kt Outdated
@mountiny mountiny merged commit ed43766 into Expensify:main Jun 15, 2026
6 checks passed
@os-botify

os-botify Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

🚀 Published to npm in 0.1.22 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants