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

On-boarding: Set up the app and fund "Trading Wallet" #2

Closed
2 tasks done
Tracked by #1
bonomat opened this issue Jan 11, 2023 · 1 comment
Closed
2 tasks done
Tracked by #1

On-boarding: Set up the app and fund "Trading Wallet" #2

bonomat opened this issue Jan 11, 2023 · 1 comment
Labels

Comments

@bonomat
Copy link
Contributor

bonomat commented Jan 11, 2023

Goal

Let the user set up the app to have a funded trading wallet.

Start

User starts from 0, i.e. he just downloaded the app: on-boarding-welcome-screen.
The user should fund the wallet using lightning.

End

User ends on the trading/funded screen and has some money in his trading wallet

Out of focus

  • Evaluate the funding flow: We don't want to evaluate if the funding flow is the best in the world, but we want to educate the user how to get money into the wallet so that we can evaluate our USP: the trading flow.
  • Trading: Don't show the trading screen. We will continue with another flow on this
  • Wallet backup: Don’t show wallet backup details. Backup is important, but it’s not our main focus. We can evaluate the best backup options later.

Open TODOs

  • Create a state where trading is not enabled because you do not have any money yet: if you click on the trade tab with an empty wallet you will not be able to trade.
  • Rename the FOB on trading wallet to something like: Initial Funding.
@bonomat bonomat mentioned this issue Jan 11, 2023
5 tasks
@bonomat bonomat changed the title On-boarding: Set up the app to have a "Trading Wallet" Figma: On-boarding: Set up the app to have a "Trading Wallet" Jan 11, 2023
@bonomat bonomat changed the title Figma: On-boarding: Set up the app to have a "Trading Wallet" Figma: On-boarding: Set up the app and fund "Trading Wallet" Jan 11, 2023
@bonomat bonomat added the figma label Jan 11, 2023
@bonomat bonomat changed the title Figma: On-boarding: Set up the app and fund "Trading Wallet" On-boarding: Set up the app and fund "Trading Wallet" Jan 11, 2023
@holzeis holzeis assigned holzeis and unassigned holzeis Jan 11, 2023
@bonomat
Copy link
Contributor Author

bonomat commented Jan 23, 2023

Already in figma

@bonomat bonomat closed this as completed Jan 23, 2023
holzeis added a commit that referenced this issue Oct 8, 2023
Fixes an exception thrown at navigating after receiving a payment during funding the app.

```
══╡ EXCEPTION CAUGHT BY FOUNDATION LIBRARY ╞════════════════════════════════════════════════════════
The following assertion was thrown while dispatching notifications for GoRouterDelegate:
setState() or markNeedsBuild() called during build.
This Router<Object> widget cannot be marked as needing to build because the framework is already in
the process of building widgets. A widget can be marked as needing to be built during the build
phase only if one of its ancestors is currently building. This exception is allowed because the
framework builds parent widgets before children, which means a dirty descendant will always be
built. Otherwise, the framework might not visit this widget during this build phase.
The widget on which setState() or markNeedsBuild() was called was:
  Router<Object>
The widget which was currently being built when the offending call was made was:
  FundWalletModal

When the exception was thrown, this was the stack:
#0      Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:4862:9)
#1      Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:4874:6)
#2      State.setState (package:flutter/src/widgets/framework.dart:1158:15)
#3      _RouterState._handleRouterDelegateNotification (package:flutter/src/widgets/router.dart:791:5)
#4      ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:403:24)
#5      GoRouterDelegate.setNewRoutePath (package:go_router/src/delegate.dart:145:7)
#6      _RouterState._processParsedRouteInformation.<anonymous closure> (package:flutter/src/widgets/router.dart:753:34)
#7      SynchronousFuture.then (package:flutter/src/foundation/synchronous_future.dart:41:39)
#8      _RouterState._processRouteInformation (package:flutter/src/widgets/router.dart:745:8)
#9      _RouterState._handleRouteInformationProviderNotification (package:flutter/src/widgets/router.dart:762:5)
#10     ChangeNotifier.notifyListeners (package:flutter/src/foundation/change_notifier.dart:403:24)
#11     GoRouteInformationProvider.notifyListeners (package:go_router/src/information_provider.dart:141:11)
#12     GoRouteInformationProvider._setValue (package:go_router/src/information_provider.dart:149:7)
#13     GoRouteInformationProvider.go (package:go_router/src/information_provider.dart:171:5)
#14     GoRouter.go (package:go_router/src/router.dart:318:30)
#15     _FundWalletModalState.build (package:get_10101/features/wallet/onboarding/fund_wallet_modal.dart:68:28)
#16     StatefulElement.build (package:flutter/src/widgets/framework.dart:5409:27)
#17     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:5297:15)
#18     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:5462:11)
#19     Element.rebuild (package:flutter/src/widgets/framework.dart:5016:7)
#20     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2779:19)
#21     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:916:21)
#22     RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:360:5)
#23     SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:1297:15)
#24     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1227:9)
#25     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:1085:5)
#26     _invoke (dart:ui/hooks.dart:170:13)
#27     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:401:5)
#28     _drawFrame (dart:ui/hooks.dart:140:31)

The GoRouterDelegate sending notification was:
  Instance of 'GoRouterDelegate'
════════════════════════════════════════════════════════════════════════════════════════════════════
```
holzeis added a commit that referenced this issue Jan 25, 2024
This was constantly throwing errors in the logs whenever we got a new price as it is not allowed to update a late field multiple times.

```
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: LateInitializationError: Field '_price@1021144427' has already been initialized.
#0      LateError._throwFieldAlreadyInitialized (dart:_internal-patch/internal_patch.dart:192:5)
#1      TradeValuesChangeNotifier._price= (package:get_10101/features/trade/trade_value_change_notifier.dart:20:20)
#2      TradeValuesChangeNotifier.updatePrice (package:get_10101/features/trade/trade_value_change_notifier.dart:102:5)
#3      TradeValuesChangeNotifier.notify (package:get_10101/features/trade/trade_value_change_notifier.dart:119:7)
#4      new EventService.create.<anonymous closure> (package:get_10101/common/application/event_service.dart:21:20)
#5      _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#6      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#7      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#8      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:<…>
``
holzeis added a commit that referenced this issue Mar 18, 2024
If the app was closed when an order got filled, the pending order is not set anymore. This fixes

```
flutter: [INFO] TIME: 2024-03-18T08:02:02.796655Z r: Updated order state new_state: Filled,order_id: 95a65da8-fe2e-48ab-847d-dab47dac7b49
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Null check operator used on a null value
#0      SubmitOrderChangeNotifier.notify (package:get_10101/features/trade/submit_order_change_notifier.dart:105:24)
#1      new EventService.create.<anonymous closure> (package:get_10101/common/application/event_service.dart:21:20)
#2      _RootZone.runUnaryGuarded (dart:async/zone.dart:1594:10)
#3      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:339:11)
#4      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#5      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:784:19)
#6      _StreamController._add (dart:async/stream_controller.dart:658:7)
#7      _StreamController.add (dart:async/stream_controller.dart:606:5)
#8      _AsyncStarStreamController.add (dart:async-patch/async_patch.dart:76:16)
#9      FlutterRustBridgeBase.executeStream (package:flutter_rust_bridge/src/basic.dart)
<asynchronous suspension>
#10     ne<…>
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants