From 2e1a9d81d6dd350d2ada8dbe8d56b46ceb8027fd Mon Sep 17 00:00:00 2001 From: rahilmansuri1 Date: Fri, 21 Feb 2025 15:04:30 +0530 Subject: [PATCH] Add: github issue template for bug report --- .github/ISSUE_TEMPLATE/BUG-REPORT.yml | 67 ++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + src/assets/remote.png | Bin 0 -> 5137 bytes src/data/repository/setting_repository.py | 4 +- src/data/service/main_asset_page_service.py | 2 +- src/main.py | 2 +- src/model/enums/enums_model.py | 2 +- src/resources.qrc | 2 +- src/translations/en_IN.qm | Bin 130423 -> 130592 bytes src/translations/en_IN.ts | 20 ++++-- src/utils/common_utils.py | 5 +- src/utils/constant.py | 2 +- src/viewmodels/ln_endpoint_view_model.py | 2 +- src/viewmodels/term_view_model.py | 4 +- src/views/ui_about.py | 18 +++++ src/views/ui_fungible_asset.py | 2 +- src/views/ui_set_wallet_password.py | 6 +- src/views/ui_wallet_or_transfer_selection.py | 6 +- .../main_asset_page_service_test.py | 2 +- unit_tests/tests/ui_tests/ui_about_test.py | 2 + .../tests/ui_tests/ui_fungible_asset_test.py | 2 +- .../ui_tests/ui_set_wallet_password_test.py | 6 +- .../ui_wallet_or_transfer_selection_test.py | 10 +-- .../tests/utils_test/common_utils_test.py | 4 +- .../ln_endpoint_view_model_test.py | 4 +- .../viewmodel_tests/splash_view_model_test.py | 4 +- 26 files changed, 138 insertions(+), 41 deletions(-) create mode 100644 .github/ISSUE_TEMPLATE/BUG-REPORT.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 src/assets/remote.png diff --git a/.github/ISSUE_TEMPLATE/BUG-REPORT.yml b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml new file mode 100644 index 0000000..3cfb9fb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG-REPORT.yml @@ -0,0 +1,67 @@ +name: "Bug report" +description: "Create a report to help us improve" +labels: ["bug"] +body: + - type: textarea + id: bug_description + attributes: + label: "Bug description" + description: "Describe the issue, including steps to reproduce it. Add screenshots if useful." + placeholder: "What happened? What did you expect to happen?" + validations: + required: true + + - type: input + id: os_version + attributes: + label: "OS version" + description: "Example: Ubuntu 22.04, macOS 14.0, Windows 11" + validations: + required: true + + - type: input + id: app_version + attributes: + label: "App version" + description: "Find this in the About page of the app." + validations: + required: true + + - type: dropdown + id: mode + attributes: + label: "RLN node connection type" + options: + - Embedded + - Remote + validations: + required: true + + - type: dropdown + id: network + attributes: + label: "Bitcoin network" + options: + - Regtest + - Testnet + validations: + required: true + + - type: dropdown + id: installation_method + attributes: + label: "Installation method" + options: + - AppImage/DMG + - From source + validations: + required: true + + - type: textarea + id: logs + attributes: + label: "Logs and debug data" + description: "Attach the app data directory (location can be found in the About page) and any relevant console logs." + placeholder: "Drag and drop data directory and paste relevant console logs if any." + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..0086358 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: true diff --git a/src/assets/remote.png b/src/assets/remote.png new file mode 100644 index 0000000000000000000000000000000000000000..fc9545daa130f5f776ddeb26b541e6199ca1e8d0 GIT binary patch literal 5137 zcmV+s6z=PZP))KE+uFk;y2G41*(@2LXYkyYH=kIwc`-f+9mh_8cWIwu-h3(8r&WkT_s&Y0U_RS`~!JkhMY3CokZ$_PXFC z#gr*i+*!je8xj!mEM|zI)IeuZaRvkFvFnhLZKQwd0Oi+=;l6{q@pX+i_YiagN-_+= zsu1KgR?+q#7?T(AS=&|Sq*7U&b5{TcUm}@tGYB?@8u~&i9s&}QIyqFQmik6Y{3|us zMi`fnbcy=) zUavQ*IjpCzQQwEB9GT9uUYpU{3zYEeqmQY*fRx_nF5 z*zSW+cW4#oM>{&##EBENp+CGfJ=xICLyi56h`I+%qU`pQ0V3^FA;sJZZ|=L1#~!1m z5Iz%9pH@*aa|uHjM zyCAHdS@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majyd$K& zlpTft4>FNoIX7qHiP+CXMF|S#ExlMXT=VFfKaKchtpt`=!KcSfb@n7WwIOp$YetY} zQw!+BWRRX7p8}1~>(Gx3Jg9B!)GYNgnZ!x&Z~S=3b=l)T-|Tz4M?w~gh-Mr%z-9I~1E~#agJ9eh`Jvr8{HZBq zOVpQ=heaIPL_$Mh7j1;rr+0r8z5Z8`;#1==ksXf~DaCI94Q~a{+XHmRP%!YH{Qd$hcGk z*Uyv#Nku;Z6@lqGNEOLlMA8O^`f3j}?cfRi&BC5Q1R>P7=Swe_;8xoTSzBkwt-6$X z$GhBDtp#U@YOg_(Gp->{gB1Gb2yn3t)R4*oEoau*+G!&B4lYRTVyd^1+0Vyc~=0;3%1zkaO>u%|H zL(tVCgMNQY%aSE|Es3xVV7y=w@>ps0^)A8G7OG}XhQiic83Z5c3yzl4fO+#)3{BSc z4=HJPTWbv|9_Wc(2~MHwaHSafowAjT?G%ETT WalletType: try: value = local_store.get_value('walletType') wallet_type = WalletType.EMBEDDED_TYPE_WALLET - if value == 'connect': - wallet_type = WalletType.CONNECT_TYPE_WALLET + if value == WalletType.REMOTE_TYPE_WALLET.value: + wallet_type = WalletType.REMOTE_TYPE_WALLET return wallet_type except Exception as exe: return handle_exceptions(exe) diff --git a/src/data/service/main_asset_page_service.py b/src/data/service/main_asset_page_service.py index d24e25a..25a3157 100644 --- a/src/data/service/main_asset_page_service.py +++ b/src/data/service/main_asset_page_service.py @@ -78,7 +78,7 @@ def has_non_zero_balance(asset: AssetModel | None) -> bool: asset for asset in asset_detail.cfa if has_non_zero_balance(asset) ] - if WalletType.CONNECT_TYPE_WALLET.value == wallet_type.value and asset_detail.cfa is not None: + if WalletType.REMOTE_TYPE_WALLET.value == wallet_type.value and asset_detail.cfa is not None: for asset in asset_detail.cfa: if asset is None: continue diff --git a/src/main.py b/src/main.py index 46a54cb..62eb4db 100755 --- a/src/main.py +++ b/src/main.py @@ -71,7 +71,7 @@ def closeEvent(self, event): # pylint:disable=invalid-name if cache is not None: cache.invalidate_cache() wallet_type: WalletType = SettingRepository.get_wallet_type() - if wallet_type.value == WalletType.CONNECT_TYPE_WALLET.value or page_name in excluded_page: + if wallet_type.value == WalletType.REMOTE_TYPE_WALLET.value or page_name in excluded_page: QApplication.instance().quit() else: self.show_backup_progress() diff --git a/src/model/enums/enums_model.py b/src/model/enums/enums_model.py index 657fdf6..9dcee7c 100644 --- a/src/model/enums/enums_model.py +++ b/src/model/enums/enums_model.py @@ -66,7 +66,7 @@ class PaymentStatus(str, Enum): class WalletType(str, Enum): """Enum for wallet type""" EMBEDDED_TYPE_WALLET = 'embedded' - CONNECT_TYPE_WALLET = 'connect' + REMOTE_TYPE_WALLET = 'remote' class AssetType(str, Enum): diff --git a/src/resources.qrc b/src/resources.qrc index 95a6307..2ee0592 100644 --- a/src/resources.qrc +++ b/src/resources.qrc @@ -39,7 +39,7 @@ assets/qr_code.png assets/copy.png assets/embedded.png - assets/connect.png + assets/remote.png assets/configure_backup.png assets/show_mnemonic.png assets/hide_mnemonic.png diff --git a/src/translations/en_IN.qm b/src/translations/en_IN.qm index 9abaf1aef84abce40026edd1719a55c25b89ffd2..a07bdf5f3133f5dc4f01f684979ff91091b73aaf 100644 GIT binary patch delta 3016 zcmX|D2UJwo7Ts@NnVC0Dq!>g&1p;=WqOlPbL`)DXQbZ608;AtKu7d(mK?ypblAvM$ zqk<(0w%8&VOVp^bM8mg4G!|k*V-nlnuD{l2tyyo~$GhjAv-dvx+?W4qOI~a99h^S^ z;KLvPv}1tJ5AqoYr01^a*vy&%W#eq%!{4E7DhJw4g0flUvlz;WGN8{EC=J})uNKKz=KzJ(}{IJeaaGf$70$y08Yq?L2t41SW(m38jsY*8sLMcm_C-T#^1)wEN)rhjJZ?hLHNBX7G-+?!(;ZH8uiXPJ(?7 zOP#q{aM;fGzI8%#g9KPtofn$laOOd4gjNrjn`0-TYsYH9`*WdtB{7&#E(DdBfgXK? zkcAh4&KHEpW5g(HoiOg7V4$rkOs*^il%2wq=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W~IXIcxJ_uyXWSBaZMzHWNO?|E|;(L2cegBAJ4VJ~3Mr>eh z+x9R8wP5e`SYwJD|0lg7+O*hrHn3rWDSp^en!qAciq6sZrn@PnA2UrjW6BCj08(3+ zK3zo(4e~IR$t*>O7|lKT9^lwY>tZRSl>f>7U3IY+Y7^Sj5%%|5_@B8f6tt+(Oxvqg zi~aryC-8AC_SH4Q-lQd8%A$w&*X(x*x9njnoQ@6FE3%YE_#)q4%HG4*Pj? zFfY-L`g;Kj6SU*unbg0BcDAyTRO*=X54LUgi*&JX-EEbI4Kh*sj@}?pH}= zdYa!KK;9pQnb*DMIVrk1Z`nq`HOsucsf5;g)4bP{b({R2`CwKQqA_5V`TB|1^r$lP zPerM;iVNodc4Z+WZ|MeCPheJ9+Wo zIp656U*4s+&(z!ehwFQ8`n!dW5E{Dcqr{n593ErZJu8dehXCG`!Kd zw@e+vI$F9`M^SVeEQ6c*c2tdJ%I0GJcef?HPZU}Aw1jUY84FS@^9Pf(=qZ-fhZ{($ z&64`clOn!qSzmUOSBF?jMy>mxO)za$%AKxt7}>(|&Av3=STZd)_Hs>rZfTsv zQ${_pJazTr1*6vT*EUBgF5mKe;31CZ>sBR#3=Z0BwRIsX|7xrAzhio3a&E2WA}qmh9v2OT2i6gqR_5Twztd%wE#S`vdTQ}FUjMFr0 z?hc-%cej>ELwMWrw;tGC0xT}D9`uyxjE>eX-(seLN!EMi)LDn)*80YB>Tij)xo86* zyIGqr(s%7K0XExhmVJDl&FM@wgu2Bxmu?ie&m~(Y+h*!5~4W8qA(kYXon=s;_lyl;?{1O;9Bvl+W@Izd+)iEQwL@q8ki~k8vj3TMqx4l diff --git a/src/translations/en_IN.ts b/src/translations/en_IN.ts index 9c46caf..1437701 100644 --- a/src/translations/en_IN.ts +++ b/src/translations/en_IN.ts @@ -377,7 +377,7 @@ If you understand the above remarks and wish to proceed, press the button below connection_type - Select wallet connection type + RLN node connection type embedded @@ -1663,10 +1663,18 @@ If you understand the above remarks and wish to proceed, press the button below rgb_invoice_label RGB invoice - - - copied - Copied! - + + + copied + Copied! + + + data_directory_path_label + Data directory path: + + + remote + Remote + diff --git a/src/utils/common_utils.py b/src/utils/common_utils.py index 925ff2e..15793f1 100644 --- a/src/utils/common_utils.py +++ b/src/utils/common_utils.py @@ -40,6 +40,7 @@ from src.model.enums.enums_model import AssetType from src.model.enums.enums_model import NetworkEnumModel from src.model.enums.enums_model import TokenSymbol +from src.model.enums.enums_model import WalletType from src.model.selection_page_model import SelectionPageModel from src.utils.constant import APP_NAME from src.utils.constant import BITCOIN_EXPLORER_URL @@ -443,8 +444,8 @@ def close_button_navigation(parent, back_page_navigation=None): title = 'connection_type' logo_1_path = ':/assets/embedded.png' logo_1_title = 'embedded' - logo_2_path = ':/assets/connect.png' - logo_2_title = 'connect' + logo_2_path = ':/assets/remote.png' + logo_2_title = WalletType.REMOTE_TYPE_WALLET.value params = SelectionPageModel( title=title, logo_1_path=logo_1_path, diff --git a/src/utils/constant.py b/src/utils/constant.py index dabdc0a..a573571 100644 --- a/src/utils/constant.py +++ b/src/utils/constant.py @@ -26,7 +26,7 @@ NODE_PUB_KEY = 'node_pub_key' NETWORK_KET = 'network' IS_EMBEDDED_KEY = 'embedded' -IS_CONNECT_KEY = 'connect' +IS_REMOTE_KEY = 'remote' CACHE_FILE_NAME = { NetworkEnumModel.MAINNET: 'iris-wallet-catch-mainnet', NetworkEnumModel.TESTNET: 'iris-wallet-catch-testnet', diff --git a/src/viewmodels/ln_endpoint_view_model.py b/src/viewmodels/ln_endpoint_view_model.py index 3347347..4420a73 100644 --- a/src/viewmodels/ln_endpoint_view_model.py +++ b/src/viewmodels/ln_endpoint_view_model.py @@ -79,7 +79,7 @@ def on_error(self, error: Exception): self.stop_loading_message.emit(False) if error.message == QCoreApplication.translate('iris_wallet_desktop', 'not_initialized', None): self._page_navigation.set_wallet_password_page( - WalletType.CONNECT_TYPE_WALLET.value, + WalletType.REMOTE_TYPE_WALLET.value, ) elif error.message == QCoreApplication.translate('iris_wallet_desktop', 'wrong_password', None): self._page_navigation.enter_wallet_password_page() diff --git a/src/viewmodels/term_view_model.py b/src/viewmodels/term_view_model.py index c73fb58..1d83b73 100644 --- a/src/viewmodels/term_view_model.py +++ b/src/viewmodels/term_view_model.py @@ -26,8 +26,8 @@ def on_accept_click(self): title = 'connection_type' embedded_logo = ':/assets/embedded.png' logo_1_title = WalletType.EMBEDDED_TYPE_WALLET.value - connect_logo = ':/assets/connect.png' - logo_2_title = WalletType.CONNECT_TYPE_WALLET.value + connect_logo = ':/assets/remote.png' + logo_2_title = WalletType.REMOTE_TYPE_WALLET.value params = SelectionPageModel( title=title, logo_1_path=embedded_logo, diff --git a/src/views/ui_about.py b/src/views/ui_about.py index 99c202c..1cbecf7 100644 --- a/src/views/ui_about.py +++ b/src/views/ui_about.py @@ -124,6 +124,17 @@ def __init__(self, view_model): translation_key='announce_alias', value=self.get_bitcoin_config.announce_alias, v_layout=self.about_vertical_layout, ) + basepath = local_store.get_path() + self.data_directory_path = NodeInfoWidget( + translation_key='data_directory_path_label', value=basepath, v_layout=self.about_vertical_layout, + ) + + connection_type: WalletType = SettingRepository.get_wallet_type() + + self.rln_node_connection_type = NodeInfoWidget( + translation_key='connection_type', value=connection_type.value.capitalize(), v_layout=self.about_vertical_layout, + ) + self.privacy_policy_label = QLabel(self.about_widget) self.privacy_policy_label.setObjectName('privacy_policy_label') self.privacy_policy_label.setTextInteractionFlags( @@ -197,6 +208,13 @@ def retranslate_ui(self): 'iris_wallet_desktop', 'download_debug_log', None, ), ) + self.rln_node_connection_type.key_label.setText( + f"{ + QCoreApplication.translate( + 'iris_wallet_desktop', 'connection_type' + ) + }:", + ) def setup_ui_connection(self): """Set up connections for UI elements.""" diff --git a/src/views/ui_fungible_asset.py b/src/views/ui_fungible_asset.py index 522d5c6..ffc117a 100644 --- a/src/views/ui_fungible_asset.py +++ b/src/views/ui_fungible_asset.py @@ -477,7 +477,7 @@ def handle_backup_visibility(self): """This method handle the backup visibility on embedded or connect wallet type.""" wallet_type: WalletType = SettingRepository.get_wallet_type() self.sidebar = self._view_model.page_navigation.sidebar() - if WalletType.CONNECT_TYPE_WALLET.value == wallet_type.value: + if WalletType.REMOTE_TYPE_WALLET.value == wallet_type.value: self.sidebar.backup.hide() if WalletType.EMBEDDED_TYPE_WALLET.value == wallet_type.value: self.sidebar.backup.show() diff --git a/src/views/ui_set_wallet_password.py b/src/views/ui_set_wallet_password.py index b2c5c7d..4190b04 100644 --- a/src/views/ui_set_wallet_password.py +++ b/src/views/ui_set_wallet_password.py @@ -449,12 +449,12 @@ def close_navigation(self): """This method handled close button navigation""" if self.originating_page == WalletType.EMBEDDED_TYPE_WALLET.value: self._view_model.page_navigation.welcome_page() - if self.originating_page == WalletType.CONNECT_TYPE_WALLET.value: + if self.originating_page == WalletType.REMOTE_TYPE_WALLET.value: title = 'connection_type' embedded_path = ':/assets/embedded.png' embedded_title = WalletType.EMBEDDED_TYPE_WALLET.value - connect_path = ':/assets/connect.png' - connect_title = WalletType.CONNECT_TYPE_WALLET.value + connect_path = ':/assets/remote.png' + connect_title = WalletType.REMOTE_TYPE_WALLET.value params = SelectionPageModel( title=title, logo_1_path=embedded_path, diff --git a/src/views/ui_wallet_or_transfer_selection.py b/src/views/ui_wallet_or_transfer_selection.py index 1d49240..ac91d81 100644 --- a/src/views/ui_wallet_or_transfer_selection.py +++ b/src/views/ui_wallet_or_transfer_selection.py @@ -266,9 +266,9 @@ def handle_frame_click(self, _id): SettingRepository.set_wallet_type(WalletType.EMBEDDED_TYPE_WALLET) self._view_model.wallet_transfer_selection_view_model.start_node_for_embedded_option() - # Handle the 'connect' frame click event - elif _id == WalletType.CONNECT_TYPE_WALLET.value: - SettingRepository.set_wallet_type(WalletType.CONNECT_TYPE_WALLET) + # Handle the 'remote' frame click event + elif _id == WalletType.REMOTE_TYPE_WALLET.value: + SettingRepository.set_wallet_type(WalletType.REMOTE_TYPE_WALLET) self._view_model.page_navigation.ln_endpoint_page( 'wallet_selection_page', ) diff --git a/unit_tests/tests/service_tests/main_asset_page_service_test.py b/unit_tests/tests/service_tests/main_asset_page_service_test.py index 466f1f6..47d0d9f 100644 --- a/unit_tests/tests/service_tests/main_asset_page_service_test.py +++ b/unit_tests/tests/service_tests/main_asset_page_service_test.py @@ -110,7 +110,7 @@ def test_get_asset_when_wallet_type_connect( mock_is_exhausted_asset_enabled, ): """Test case for main asset page service when wallet type connect""" - wallet_type = mock_get_wallet_type(WalletType.CONNECT_TYPE_WALLET) + wallet_type = mock_get_wallet_type(WalletType.REMOTE_TYPE_WALLET) get_btc_balance = mock_get_btc_balance(mock_balance_response_data) refresh_asset = mock_refresh_transfer( RefreshTransferResponseModel(status=True), diff --git a/unit_tests/tests/ui_tests/ui_about_test.py b/unit_tests/tests/ui_tests/ui_about_test.py index 5afa59d..95328e3 100644 --- a/unit_tests/tests/ui_tests/ui_about_test.py +++ b/unit_tests/tests/ui_tests/ui_about_test.py @@ -348,6 +348,8 @@ def mock_node_info_widget(mocker): mock = mocker.patch( 'src.views.components.wallet_detail_frame.NodeInfoWidget', autospec=True, ) + mock_instance = mock.return_value + mock_instance.key_label = mocker.MagicMock() mocker.patch('src.views.ui_about.NodeInfoWidget', mock) # Print mock details diff --git a/unit_tests/tests/ui_tests/ui_fungible_asset_test.py b/unit_tests/tests/ui_tests/ui_fungible_asset_test.py index 4ec73b7..6c2e499 100644 --- a/unit_tests/tests/ui_tests/ui_fungible_asset_test.py +++ b/unit_tests/tests/ui_tests/ui_fungible_asset_test.py @@ -398,7 +398,7 @@ def test_handle_backup_visibility(create_fungible_asset_widget): # Mock the SettingRepository to return CONNECT_TYPE_WALLET with patch('src.views.ui_fungible_asset.SettingRepository.get_wallet_type') as mock_get_wallet_type: # Test for CONNECT_TYPE_WALLET - mock_get_wallet_type.return_value = WalletType.CONNECT_TYPE_WALLET + mock_get_wallet_type.return_value = WalletType.REMOTE_TYPE_WALLET # Call the method widget.handle_backup_visibility() diff --git a/unit_tests/tests/ui_tests/ui_set_wallet_password_test.py b/unit_tests/tests/ui_tests/ui_set_wallet_password_test.py index 31cdb72..8c74152 100644 --- a/unit_tests/tests/ui_tests/ui_set_wallet_password_test.py +++ b/unit_tests/tests/ui_tests/ui_set_wallet_password_test.py @@ -24,7 +24,7 @@ def set_wallet_password_widget(qtbot): mock_navigation = MagicMock() view_model = MagicMock(MainViewModel(mock_navigation)) widget = SetWalletPasswordWidget( - view_model, WalletType.CONNECT_TYPE_WALLET.value, + view_model, WalletType.REMOTE_TYPE_WALLET.value, ) qtbot.addWidget(widget) return widget @@ -39,7 +39,7 @@ def test_close_navigation(set_wallet_password_widget: SetWalletPasswordWidget): set_wallet_password_widget._view_model.page_navigation.welcome_page.assert_called_once() # Test for Connect Wallet Type - set_wallet_password_widget.originating_page = WalletType.CONNECT_TYPE_WALLET.value + set_wallet_password_widget.originating_page = WalletType.REMOTE_TYPE_WALLET.value set_wallet_password_widget.close_navigation() # Verify that wallet_connection_page is called with the correct parameters @@ -50,7 +50,7 @@ def test_close_navigation(set_wallet_password_widget: SetWalletPasswordWidget): params = args[0] assert params.title == 'connection_type' assert params.logo_1_title == WalletType.EMBEDDED_TYPE_WALLET.value - assert params.logo_2_title == WalletType.CONNECT_TYPE_WALLET.value + assert params.logo_2_title == WalletType.REMOTE_TYPE_WALLET.value def test_set_password_suggestion(set_wallet_password_widget: SetWalletPasswordWidget): diff --git a/unit_tests/tests/ui_tests/ui_wallet_or_transfer_selection_test.py b/unit_tests/tests/ui_tests/ui_wallet_or_transfer_selection_test.py index 86f10a7..d3a2378 100644 --- a/unit_tests/tests/ui_tests/ui_wallet_or_transfer_selection_test.py +++ b/unit_tests/tests/ui_tests/ui_wallet_or_transfer_selection_test.py @@ -25,8 +25,8 @@ def wallet_or_transfer_selection_widget(qtbot): title='connection_type', logo_1_title='embedded', logo_1_path=':/assets/embedded.png', - logo_2_title='connect', - logo_2_path=':/assets/connect.png', + logo_2_title='remote', + logo_2_path=':/assets/remote.png', callback='None', asset_id='None', ) @@ -42,7 +42,7 @@ def test_retranslate_ui(wallet_or_transfer_selection_widget: WalletOrTransferSel wallet_or_transfer_selection_widget.retranslate_ui() assert wallet_or_transfer_selection_widget.option_1_text_label.text() == 'embedded' - assert wallet_or_transfer_selection_widget.option_2_text_label.text() == 'connect' + assert wallet_or_transfer_selection_widget.option_2_text_label.text() == 'remote' def test_handle_frame_click_embedded_wallet(wallet_or_transfer_selection_widget: WalletOrTransferSelectionWidget, mocker): @@ -80,12 +80,12 @@ def test_handle_frame_click_connect_wallet(wallet_or_transfer_selection_widget: # Call the method with the connect wallet ID wallet_or_transfer_selection_widget.handle_frame_click( - WalletType.CONNECT_TYPE_WALLET.value, + WalletType.REMOTE_TYPE_WALLET.value, ) # Assertions mock_set_wallet_type.assert_called_once_with( - WalletType.CONNECT_TYPE_WALLET, + WalletType.REMOTE_TYPE_WALLET, ) mock_ln_endpoint_page.assert_called_once_with('wallet_selection_page') diff --git a/unit_tests/tests/utils_test/common_utils_test.py b/unit_tests/tests/utils_test/common_utils_test.py index e61194e..04405f3 100644 --- a/unit_tests/tests/utils_test/common_utils_test.py +++ b/unit_tests/tests/utils_test/common_utils_test.py @@ -542,8 +542,8 @@ def test_close_button_navigation_wallet_selection_page(mock_page_navigation): title='connection_type', logo_1_path=':/assets/embedded.png', logo_1_title='embedded', - logo_2_path=':/assets/connect.png', - logo_2_title='connect', + logo_2_path=':/assets/remote.png', + logo_2_title='remote', asset_id='none', asset_name=None, callback='none', diff --git a/unit_tests/tests/viewmodel_tests/ln_endpoint_view_model_test.py b/unit_tests/tests/viewmodel_tests/ln_endpoint_view_model_test.py index 18c7bd5..4e59b31 100644 --- a/unit_tests/tests/viewmodel_tests/ln_endpoint_view_model_test.py +++ b/unit_tests/tests/viewmodel_tests/ln_endpoint_view_model_test.py @@ -144,7 +144,7 @@ def test_on_error_wallet_not_initialized(mock_qcore, mock_logger, mock_toast_man # Verify navigation page change mock_page_navigation.set_wallet_password_page.assert_called_once_with( - WalletType.CONNECT_TYPE_WALLET.value, + WalletType.REMOTE_TYPE_WALLET.value, ) # Verify ToastManager call @@ -262,7 +262,7 @@ def test_on_error_common_exception_not_initialized(ln_endpoint_vm, mocker): # Assert ln_endpoint_vm.stop_loading_message.emit.assert_called_once_with(False) ln_endpoint_vm._page_navigation.set_wallet_password_page.assert_called_once_with( - WalletType.CONNECT_TYPE_WALLET.value, + WalletType.REMOTE_TYPE_WALLET.value, ) mock_toast_manager.assert_called_once_with(description=error_msg) mock_logger.assert_called_once_with( diff --git a/unit_tests/tests/viewmodel_tests/splash_view_model_test.py b/unit_tests/tests/viewmodel_tests/splash_view_model_test.py index 3958607..dc43f99 100644 --- a/unit_tests/tests/viewmodel_tests/splash_view_model_test.py +++ b/unit_tests/tests/viewmodel_tests/splash_view_model_test.py @@ -300,7 +300,7 @@ def test_handle_application_open_keyring_enabled(mock_qapp, mock_toast_manager, # Arrange page_navigation = Mock() view_model = SplashViewModel(page_navigation) - mock_setting_repo.get_wallet_type.return_value = WalletType.CONNECT_TYPE_WALLET + mock_setting_repo.get_wallet_type.return_value = WalletType.REMOTE_TYPE_WALLET mock_setting_repo.get_keyring_status.return_value = True # Act @@ -324,7 +324,7 @@ def test_handle_application_open_keyring_disabled(mock_common_repo, mock_bitcoin view_model = SplashViewModel(page_navigation) view_model.splash_screen_message = Mock() view_model.sync_chain_info_label = Mock() - mock_setting_repo.get_wallet_type.return_value = WalletType.CONNECT_TYPE_WALLET + mock_setting_repo.get_wallet_type.return_value = WalletType.REMOTE_TYPE_WALLET mock_setting_repo.get_keyring_status.return_value = False mock_wallet_password = 'test_password' mock_get_value.return_value = mock_wallet_password