Conversation
# Conflicts: # cw_core/lib/db/sqlite.dart # lib/new-ui/pages/account_customizer.dart # lib/view_model/dashboard/dashboard_view_model.dart # res/values/strings_nl.arb
# Conflicts: # cw_core/lib/balance_card_style_settings.dart # cw_core/lib/db/sqlite.dart # lib/new-ui/pages/account_customizer.dart # lib/new-ui/pages/card_customizer.dart # lib/new-ui/viewmodels/card_customizer/card_customizer_event.dart
…ounts # Conflicts: # cw_core/lib/balance_card_style_settings.dart # cw_core/lib/db/sqlite.dart # lib/new-ui/pages/account_customizer.dart # lib/new-ui/pages/card_customizer.dart
# Conflicts: # cw_bitcoin/lib/electrum_wallet.dart # cw_core/lib/balance_card_style_settings.dart # cw_core/lib/format_fixed.dart # cw_core/lib/lnurl.dart # cw_core/lib/payment_uris.dart # cw_core/lib/wallet_info.dart # cw_monero/lib/api/wallet.dart # cw_monero/lib/monero_wallet_service.dart # cw_solana/lib/solana_client.dart # lib/cake_pay/src/widgets/rounded_overlay_cards_widget.dart # lib/core/address_validator.dart # lib/di.dart # lib/entities/default_settings_migration.dart # lib/new-ui/pages/account_customizer.dart # lib/new-ui/pages/card_customizer.dart # lib/new-ui/pages/receive_page.dart # lib/new-ui/pages/send_page.dart # lib/new-ui/pages/swap_page.dart # lib/new-ui/widgets/apps_widget.dart # lib/new-ui/widgets/changelog_modal.dart # lib/new-ui/widgets/coins_page/assets_history/asset_tile.dart # lib/new-ui/widgets/coins_page/assets_history/assets_history_section.dart # lib/new-ui/widgets/coins_page/assets_history/assets_top_bar.dart # lib/new-ui/widgets/coins_page/assets_history/history_section.dart # lib/new-ui/widgets/coins_page/assets_history/history_top_bar.dart # lib/new-ui/widgets/coins_page/assets_history/transaction_details_modal.dart # lib/new-ui/widgets/coins_page/cards/balance_card.dart # lib/new-ui/widgets/coins_page/cards/cards_view.dart # lib/new-ui/widgets/coins_page/mweb_ad.dart # lib/new-ui/widgets/coins_page/top_bar_widget/lightning_switcher.dart # lib/new-ui/widgets/coins_page/top_bar_widget/sync_bar.dart # lib/new-ui/widgets/line_tab_switcher.dart # lib/new-ui/widgets/long_press_menu.dart # lib/new-ui/widgets/receive_page/receive_bottom_buttons.dart # lib/new-ui/widgets/receive_page/receive_top_bar.dart # lib/new-ui/widgets/send_page/fiat_amount_bar.dart # lib/new-ui/widgets/send_page/send_amount_input.dart # lib/new-ui/widgets/swap_page/swap_send_external_modal.dart # lib/solana/cw_solana.dart # lib/src/screens/auth/auth_page.dart # lib/src/screens/connect_device/connect_device_page.dart # lib/src/screens/dashboard/pages/balance/crypto_balance_widget.dart # lib/src/screens/dashboard/sign_page.dart # lib/src/screens/dashboard/widgets/new_main_navbar_widget.dart # lib/src/screens/exchange/exchange_page.dart # lib/src/screens/nodes/pow_node_create_or_edit_page.dart # lib/src/screens/settings/display_settings_page.dart # lib/src/screens/settings/manage_nodes_page.dart # lib/src/screens/settings/silent_payments_settings.dart # lib/src/screens/transaction_details/rbf_details_page.dart # lib/view_model/dashboard/dashboard_view_model.dart # lib/view_model/hardware_wallet/hardware_wallet_view_model.dart # lib/view_model/hardware_wallet/ledger_view_model.dart # lib/view_model/send/send_view_model.dart # lib/view_model/transaction_details_view_model.dart # lib/view_model/wallet_address_list/wallet_address_list_view_model.dart # lib/zcash/cw_zcash.dart
| Future<void> saveCardOrder({int? excludingAccountId}) async { | ||
| for (int position = 0; position < _items.length; position++) { | ||
| final item = _items[position]; | ||
| if (item.accountListItem.id == excludingAccountId) { |
There was a problem hiding this comment.
I assume excludingAccountId was added to avoid overwriting hidden: true – I think it would be possible to remove it and simplify this function if the archiving logic was consolidated in one place, since then we could ensure saveCardOrder is never called before the list is rebuilt.
There was a problem hiding this comment.
Exactly, but if the page is closed prematurely and dispose is called, it would also call saveCardOrder which could then overwrite an archived account if that procedure isn't finished. So removing the excludingAccountId would also need to cover that case somehow. For now I'd keep the excludingAccountId for simplicity.
malik1004x
left a comment
There was a problem hiding this comment.
Good direction, just some minor improvements.
| definition: "BOOLEAN DEFAULT FALSE", | ||
| ); | ||
| // Version 11 account builds predate the ImportedNFT migration. | ||
| await _createImportedNFTTable(db); |
There was a problem hiding this comment.
Builds, yes – but migrations are made with production in mind, not testing builds – so this is unnecessary. You can't update a testing build into a testing build from another branch anyway.
| bool get hasLightningSupport => false; | ||
| bool get hasSilentPaymentsScanning => false; | ||
|
|
||
| bool get hasCoinControl => [ |
There was a problem hiding this comment.
We try to avoid wallet-specific conditions in generic code. You could instead do bool hasCoinControl => false and then voerride that with true in ElectrumWallet, MoneroWallet and DecredWallet.
| if (isBusy) { | ||
| return const SizedBox.square( | ||
| dimension: 20, | ||
| child: CircularProgressIndicator(strokeWidth: 2), |
There was a problem hiding this comment.
Please use CupertinoActivityIndicator instead – it fits the 6.x UI much better. It also has a radius parameter so you don't need a SizedBox.
| return double.tryParse(balance.trim().replaceAll(",", "")); | ||
| } | ||
|
|
||
| String? accountFiatBalance(AccountListItem account, DashboardViewModel dashboardViewModel) { |
There was a problem hiding this comment.
Why are these loose functions rather than methods? It's not very ergonomic considering you have to pass dashboardViewModel here as well.
Issue Number (if Applicable): Fixes #
Description
Please include a summary of the changes and which issue is fixed / feature is added.
Pull Request - Checklist