Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: App fails to resume on update #222

Merged
merged 9 commits into from
Nov 6, 2024

Conversation

erdemyerebasmaz
Copy link
Collaborator

This PR addresses

and includes several enchantments and fixes related to the iOS build process, account state management and Firebase initialization.

Changelist:

  • Eagerly load AccountCubit
  • Simplify AccountState:
    • Use GetInfoResponse? directly on AccountState instead of mapping it to individual fields
    • Rename initial to IsOnboardingComplete and set it's default value to false for clarity
    • Save BigInt values as strings for better serialization.
    • Add toJson and fromJson extensions to GetInfoResponse for improved data handling
    • Implement null handling in AccountState.fromJson
  • Check if onboarding is complete before attempting to reconnect

Other changelist:

  • Firebase: Prevent duplicate Firebase initialization by checking if an app instance already exists before initializing
  • fix: Create artifacts with the iOS build
  • chore: Upgrade dependencies with melos pub-upgrade
  • Make sdkConnectivityCubit final to improve code safety.
  • Remove the unused registrationRequested parameter from the updateProfile function in UserProfileCubit.

@erdemyerebasmaz erdemyerebasmaz changed the base branch from main to enter_payment_info_fullscreen November 4, 2024 08:51
@erdemyerebasmaz erdemyerebasmaz marked this pull request as ready for review November 4, 2024 13:12
Copy link
Member

@roeierez roeierez left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@dangeross dangeross left a comment

Choose a reason for hiding this comment

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

LGTM

@erdemyerebasmaz erdemyerebasmaz force-pushed the resume-on-update-hydrated-bloc branch 3 times, most recently from 7692c17 to cff6106 Compare November 5, 2024 10:37
Base automatically changed from enter_payment_info_fullscreen to main November 6, 2024 18:24
* Use GetInfoResponse directly on AccountState
* Rename initial to isInitial
* Save BigInt's as string
* Set isInitial default value to true
* Add toJson fromJson extensions to GetInfoResponse
* Add null handling to AccountState.fromJson
* Rename isInitial to isOnboardingComplete
* Remove unused registrationRequested param from UserProfileCubit updateProfile fn.
* Make sdkConnectivityCubit final
Set minimum deployment target on iOS to 15.6
@erdemyerebasmaz erdemyerebasmaz merged commit 42362ea into main Nov 6, 2024
1 check passed
erdemyerebasmaz added a commit that referenced this pull request Nov 6, 2024
… page (#223)

* Fix: App fails to resume on update (#222)

* fix: Create artifacts with iOS build

* Simplify AccountState

* Use GetInfoResponse directly on AccountState
* Rename initial to isInitial
* Save BigInt's as string
* Set isInitial default value to true
* Add toJson fromJson extensions to GetInfoResponse
* Add null handling to AccountState.fromJson

* Check if onboarding is complete before attempting to reconnect

* Rename isInitial to isOnboardingComplete
* Remove unused registrationRequested param from UserProfileCubit updateProfile fn.
* Make sdkConnectivityCubit final

* Eagerly load AccountCubit

* Prevent duplicate Firebase initialization if an app instance already exists

* Initialize Firebase with project ID

* chore: melos pub-upgrade

* Update cocoapods and reinstall pods

* chore: update dependencies to latest

Set minimum deployment target on iOS to 15.6

* Track newly received payments on LN Address page

* Stay on "Receive via Lightning Address" page when new payments are received

* Do not show "Payment failed" flushbar on "Receive via Lightning Address" page

* Show successful payment route once for each payment

* Do not show it for the same payments both pending & completed status updates

* Skip the first item on the stream

* Do not cancel stream subscription if payment fails on LN Address page

* Fix payment tracking for lightning invoices & swaps

* Remove the 1 second delay before showing successful payment route

* Clarify the comments

* Refactor LNURL payment tracking

* Do pre-filtering while listening the stream and change it's type to PaymentData?
* Only process pending status of LNURL payments
* Remove _processedPayments logic

* Rename trackPayment fn to trackPaymentEvents

Add logs to _trackNewPayments

* Disable particles on successful payment route for payments received on LN Address page
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.

3 participants