-
Notifications
You must be signed in to change notification settings - Fork 280
Integrate new design mockup with ViewModel #2653
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
base: new-design
Are you sure you want to change the base?
Conversation
… consistency and update related occurrences across codebase
…rt for BTC & refactor wallet type/token checks in view model
…sit/withdraw actions, and integrate Lightning transaction creation with updated priority handling
…in Lightning wallet integration in workflows
…flow for Bitcoin Lightning integration
…htning-specific functionality
…ementations across wallet types
… logic, add Bitcoin Lightning deposit/withdraw support
…ate the default LNURL domain
…t transaction direction logic
… consistency and update related occurrences across codebase
…rt for BTC & refactor wallet type/token checks in view model
…sit/withdraw actions, and integrate Lightning transaction creation with updated priority handling
…in Lightning wallet integration in workflows
…ementations across wallet types
… logic, add Bitcoin Lightning deposit/withdraw support
…ate the default LNURL domain
…t transaction direction logic
…nto new-design-mockup-integration
* feat: add Lightning Network support for Bitcoin wallets * refactor: rename `fiatConvertationStore` to `fiatConversionStore` for consistency and update related occurrences across codebase * feat: enhance address validation with Lightning Network invoice support for BTC & refactor wallet type/token checks in view model * feat: add support for Lightning invoice detection, refactor MWEB deposit/withdraw actions, and integrate Lightning transaction creation with updated priority handling * feat: add method to retrieve unused Spark deposit address for Bitcoin wallets * feat: add Breez API key support and update secrets handling for Bitcoin Lightning wallet integration in workflows * chore: update Breez SDK dependency to version 0.3.4 in pubspec files * Add bitcoin secrets config [skip ci] * feat: extend Lightning wallet functionality with transaction history fetching * feat: add LNURL-pay address detection and support in address parsing flow for Bitcoin Lightning integration * refactor: simplify `ReceivePageOption` logic * refactor: centralize `PaymentURI` generation logic across wallet types * feat: enhance `PaymentURI` handling with asynchronous support and Lightning-specific functionality * refactor: streamline `PaymentURI` logic and remove redundant URI implementations across wallet types * refactor: remove redundant debug print statement from `bitcoin_wallet_addresses.dart` * refactor: improve consistency in widget styling and centralized label logic, add Bitcoin Lightning deposit/withdraw support * feat: reload balance and tx history after sending a lightning transaction * feat: improve address formatting for human-readable addresses and update the default LNURL domain * fix: merge conflicts * feat: add error handling for LightningWallet initialization and adjust transaction direction logic * feat: enable private transactions by default in LightningWallet and update Breez SDK version to 0.4.2 * minor fixes [skip ci] * chore: fix some minor issues in comments (#2654) Signed-off-by: black5box <[email protected]> * fix: handle send-all functionality for LightningWallet transactions and adjust amount calculation logic * fix-german (#2659) * chore: update German localization strings for consistency and accuracy * chore: update German localization strings for consistency and accuracy [skip-ci] * feat: add LNURL support for address validation and LightningWallet compatibility, enhance error handling for OpenCryptoPay * fix: adjust LightningWallet amount parsing from 9 to 8 decimal places * feat: add LNURL support in LightningPaymentRequest and LightningWallet * Fix navigation gradient (#2657) * Fix navigation gradient * Fix CONFIG_ARGS formatting in app_config.sh (#2660) * fix: block wrongly parsed addresses (#2656) * fix: block wrongly parsed addresses * fix: move parsed address check into handlePaymentFlow method * fix: Handle QR URLs separately for pay anything flow * feat: add electrum seed support for Lightning * refactor: improve `parseFixed` logic and add comprehensive unit tests for edge cases (#2661) * Update cw_bitcoin/lib/bitcoin_wallet.dart [skip ci] * resolve conflict issue --------- Signed-off-by: black5box <[email protected]> Co-authored-by: Omar Hatem <[email protected]> Co-authored-by: black5box <[email protected]> Co-authored-by: tuxsudo <[email protected]> Co-authored-by: cyan <[email protected]> Co-authored-by: David Adegoke <[email protected]>
lib/new-ui/new_dashboard.dart
Outdated
| [ | ||
| getIt.get<NewHomePage>(), | ||
| getIt.get<WalletListPage>(), | ||
| getIt.get<ContactListPage>(), | ||
| getIt.get<CakeFeaturesPage>(), | ||
| Placeholder(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why define the array inside the build function?
This will cause the getters to be called every time this is rebuilt, and since they are registered as factories, then it will re-initialize them.
Extract the array outside of the build function and on its own final variable and just use it here
| if(FeatureFlag.hasNewUiExtraPages) | ||
| showModalBottomSheet( | ||
| context: context, | ||
| builder: (context) => SendPage(), | ||
| ); else Navigator.of(context).pushNamed(Routes.send); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reformat the code please, we have a rule for the line length as 100, please set it in your IDE and reformat the code.
Also, please use curly brackets for if/else conditions {}
|
|
||
| if (code == null) return; | ||
| if (code.isEmpty) return; | ||
| final uri = Uri.parse(code); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| final uri = Uri.parse(code); | |
| final uri = Uri.tryParse(code); | |
| if (uri == null) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reformat as well after setting the line length to 100
| [ | ||
| AssetsSection(dashboardViewModel: widget.dashboardViewModel,), | ||
| HistorySection(dashboardViewModel: widget.dashboardViewModel,), | ||
| ][_selectedTab], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as the earlier comment, why re-initialize them
| children.add(_buildCard(_selectedIndex!, parentWidth)); | ||
| } | ||
|
|
||
| return Observer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see an observable variable or a computed getter used here, so why the use of Observer?
also, please reformat the code
| class NavbarItemData { | ||
| final String iconPath; | ||
| final String text; | ||
|
|
||
| NavbarItemData(this.iconPath, this.text); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is the ontap?
| final List<NavbarItemData> _items = [ | ||
| NavbarItemData("assets/Home.svg", "Home"), | ||
| NavbarItemData("assets/Wallets.svg", "Wallets"), | ||
| NavbarItemData("assets/Contacts.svg", "Contacts"), | ||
| NavbarItemData("assets/Apps.svg", "Apps"), | ||
| NavbarItemData("assets/Charts.svg", "Charts"), | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yup initializing the list like this is good
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please reformat this back when you set the line length to 100 so I can review the actual changes
Issue Number (if Applicable): Fixes #
Description
Integrate the Home page from the design mockups into the app's current ViewModel. Also fixed positioning and sizing on the new navigation bar. The new UI is accessible by setting the hasNewUi feature flag.
Also merged Lightning wallet support into new-design to simplify working on Lightning-related UI elements.
Pull Request - Checklist