diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 295a25b87cc3..46123714bddf 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -1,8 +1,8 @@ --- -name: Bug Report -about: Bug Report +name: MVPBug Report +about: MVPBug Report title: '' -labels: bug +labels: E:MobileBugfixesMVP assignees: '' --- @@ -22,8 +22,7 @@ assignees: '' ### Reproduction -1) Open Status -2) +1. ### Additional Information diff --git a/.github/ISSUE_TEMPLATE/wont-fix-bug.md b/.github/ISSUE_TEMPLATE/wont-fix-bug.md new file mode 100644 index 000000000000..d42b0b959dca --- /dev/null +++ b/.github/ISSUE_TEMPLATE/wont-fix-bug.md @@ -0,0 +1,30 @@ +--- +name: Wont fix Report +about: to facilitate future handling, identify and address non-urgent issues that won't be prioritized in the near future +title: '' +labels: likely_wont_fix +assignees: '' + +--- + +## Problem + + +#### Expected behavior + + +#### Actual behavior + + +### Reproduction + +1. + +### Additional Information + +- Status version: release +- Operating System: Android, iOS + + +[comment]: # (Please, add logs/notes if necessary) + diff --git a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java index 9a2f02305f4b..95b48481bcd3 100644 --- a/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java +++ b/modules/react-native-status/android/src/main/java/im/status/ethereum/module/StatusModule.java @@ -626,10 +626,10 @@ public void migrateKeyStoreDir(final String accountData, final String password) } @ReactMethod - public void loginWithKeycard(final String accountData, final String password, final String chatKey) { + public void loginWithKeycard(final String accountData, final String password, final String chatKey, final String nodeConfigJSON) { Log.d(TAG, "loginWithKeycard"); this.migrateKeyStoreDir(accountData, password); - String result = Statusgo.loginWithKeycard(accountData, password, chatKey); + String result = Statusgo.loginWithKeycard(accountData, password, chatKey, nodeConfigJSON); if (result.startsWith("{\"error\":\"\"")) { Log.d(TAG, "LoginWithKeycard result: " + result); } else { diff --git a/modules/react-native-status/ios/RCTStatus/RCTStatus.m b/modules/react-native-status/ios/RCTStatus/RCTStatus.m index 803c20afc5c0..4e1279ffba69 100644 --- a/modules/react-native-status/ios/RCTStatus/RCTStatus.m +++ b/modules/react-native-status/ios/RCTStatus/RCTStatus.m @@ -633,14 +633,15 @@ - (void) migrateKeystore:(NSString *)accountData RCT_EXPORT_METHOD(loginWithKeycard:(NSString *)accountData password:(NSString *)password - chatKey:(NSString *)chatKey) { + chatKey:(NSString *)chatKey + nodeConfigJSON:(NSString *)nodeConfigJSON) { #if DEBUG NSLog(@"LoginWithKeycard() method called"); #endif [self getExportDbFilePath]; [self migrateKeystore:accountData password:password]; - NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey); + NSString *result = StatusgoLoginWithKeycard(accountData, password, chatKey, nodeConfigJSON); NSLog(@"%@", result); } diff --git a/modules/react-native-status/nodejs/status.cpp b/modules/react-native-status/nodejs/status.cpp index 335921a1d242..2db082a3d008 100644 --- a/modules/react-native-status/nodejs/status.cpp +++ b/modules/react-native-status/nodejs/status.cpp @@ -1041,7 +1041,7 @@ void _LoginWithKeycard(const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); Local context = isolate->GetCurrentContext(); - if (args.Length() != 3) { + if (args.Length() != 4) { // Throw an Error that is passed back to JavaScript isolate->ThrowException(Exception::TypeError( String::NewFromUtf8Literal(isolate, "Wrong number of arguments for LoginWithKeycard"))); @@ -1065,6 +1065,11 @@ void _LoginWithKeycard(const FunctionCallbackInfo& args) { String::NewFromUtf8Literal(isolate, "Wrong argument type for 'keyHex'"))); return; } + if (!args[3]->IsString()) { + isolate->ThrowException(Exception::TypeError( + String::NewFromUtf8Literal(isolate, "Wrong argument type for 'nodeConfigJSON'"))); + return; + } String::Utf8Value arg0Obj(isolate, args[0]->ToString(context).ToLocalChecked()); @@ -1073,9 +1078,11 @@ void _LoginWithKeycard(const FunctionCallbackInfo& args) { char *arg1 = *arg1Obj; String::Utf8Value arg2Obj(isolate, args[2]->ToString(context).ToLocalChecked()); char *arg2 = *arg2Obj; + String::Utf8Value arg3Obj(isolate, args[3]->ToString(context).ToLocalChecked()); + char *arg3 = *arg3Obj; // Call exported Go function, which returns a C string - char *c = LoginWithKeycard(arg0, arg1, arg2); + char *c = LoginWithKeycard(arg0, arg1, arg2, arg3); Local ret = String::NewFromUtf8(isolate, c).ToLocalChecked(); args.GetReturnValue().Set(ret); diff --git a/src/native_module/core.cljs b/src/native_module/core.cljs index 17b66f0b5c05..bc7ee9a8c28f 100644 --- a/src/native_module/core.cljs +++ b/src/native_module/core.cljs @@ -225,12 +225,12 @@ (.verifyDatabasePassword ^js (status) key-uid hashed-password callback)) (defn login-with-keycard - [{:keys [key-uid multiaccount-data password chat-key]}] + [{:keys [key-uid multiaccount-data password chat-key node-config]}] (log/debug "[native-module] login-with-keycard") (clear-web-data) (init-keystore key-uid - #(.loginWithKeycard ^js (status) multiaccount-data password chat-key))) + #(.loginWithKeycard ^js (status) multiaccount-data password chat-key (types/clj->json node-config)))) (defn set-soft-input-mode [mode] diff --git a/src/status_im/keycard/real_keycard.cljs b/src/status_im/keycard/real_keycard.cljs index 372e7c0a3469..1ab65938c460 100644 --- a/src/status_im/keycard/real_keycard.cljs +++ b/src/status_im/keycard/real_keycard.cljs @@ -307,7 +307,7 @@ (defn login [args] - (native-module/login-with-keycard args)) + (native-module/login-with-keycard (assoc args :node-config {:ProcessBackedupMessages false}))) (defn send-transaction-with-signature [{:keys [transaction signature on-completed]}] diff --git a/src/status_im/keycard/recovery.cljs b/src/status_im/keycard/recovery.cljs index cb43107e3e8f..0447e1d3a566 100644 --- a/src/status_im/keycard/recovery.cljs +++ b/src/status_im/keycard/recovery.cljs @@ -253,7 +253,8 @@ encryption-pass #(let [{:keys [error]} (types/json->clj %)] (if (string/blank? error) - (native-module/login-with-keycard login-params) + (native-module/login-with-keycard + (assoc login-params :node-config {:ProcessBackedupMessages true})) (throw (js/Error. "Please shake the phone to report this error and restart the app. Migration failed unexpectedly."))))))) diff --git a/status-go-version.json b/status-go-version.json index bcbee8c00ba1..1013ac1233be 100644 --- a/status-go-version.json +++ b/status-go-version.json @@ -3,7 +3,7 @@ "_comment": "Instead use: scripts/update-status-go.sh ", "owner": "status-im", "repo": "status-go", - "version": "v0.162.5", - "commit-sha1": "cf2d72bfa83f094719a93b7b7fd5a68e3a68ab47", - "src-sha256": "0x79nm1n6gbgz2lzsky29laap7m0r0hggrb2fsn07bf0xw0364qn" + "version": "v0.162.9", + "commit-sha1": "6085a05f77354a26d879f476e67aa85cac1e1414", + "src-sha256": "0lb87lnfi49fk7ijppppr79rzkg8xzpwb3xxxmmq6wca2nb1pqp5" } diff --git a/test/appium/tests/critical/test_public_chat_browsing.py b/test/appium/tests/critical/test_public_chat_browsing.py index 4fe6f947f1b6..a93b0a7c2b58 100644 --- a/test/appium/tests/critical/test_public_chat_browsing.py +++ b/test/appium/tests/critical/test_public_chat_browsing.py @@ -937,8 +937,7 @@ def test_community_contact_block_unblock_offline(self): @marks.testrail_id(703086) def test_community_mark_all_messages_as_read(self): - self.channel_1.click_system_back_button_until_element_is_shown() - self.home_1.communities_tab.click() + self.home_1.jump_to_communities_home() self.channel_2.click_system_back_button_until_element_is_shown() self.home_2.communities_tab.click() self.home_2.get_chat(self.community_name, community=True).click() diff --git a/test/appium/tests/medium/test_activity_center.py b/test/appium/tests/medium/test_activity_center.py index c02cc91e1799..caadd9d38518 100644 --- a/test/appium/tests/medium/test_activity_center.py +++ b/test/appium/tests/medium/test_activity_center.py @@ -68,7 +68,8 @@ def test_activity_center_contact_request_decline(self): self.home_2.jump_to_messages_home() self.home_2.open_activity_center_button.click() self.home_2.activity_unread_filter_button.click() - if not self.home_2.element_by_text_part(self.home_2.get_translation_by_key("add-me-to-your-contacts")).is_element_displayed(30): + if not self.home_2.element_by_text_part( + self.home_2.get_translation_by_key("add-me-to-your-contacts")).is_element_displayed(30): self.errors.append( "Pending contact request is not shown on unread notification element on Activity center!") self.home_2.close_activity_centre.click() @@ -96,7 +97,7 @@ def test_activity_center_contact_request_accept_swipe_mark_all_as_read(self): self.home_1.just_fyi("Check that can accept contact request from read notifications") self.home_1.activity_unread_filter_button.click() cr_element.swipe_right_on_element() - self.home_1.activity_notification_swipe_button.click() + self.home_1.activity_notification_swipe_button.click_inside_element_by_coordinate(rel_x=0.5, rel_y=0.5) self.home_1.close_activity_centre.click() self.home_1.contacts_tab.click() if not self.home_1.contact_details_row(username=self.username_2).is_element_displayed(20): diff --git a/test/appium/views/sign_in_view.py b/test/appium/views/sign_in_view.py index ceba66e2d0fa..02d94bde4915 100644 --- a/test/appium/views/sign_in_view.py +++ b/test/appium/views/sign_in_view.py @@ -1,10 +1,13 @@ -from selenium.common.exceptions import NoSuchElementException +import base64 import os + +from selenium.common.exceptions import NoSuchElementException + from tests import common_password, appium_root_project_path +from tests.base_test_case import AbstractTestCase from views.base_element import Button, EditBox, Text from views.base_view import BaseView -import base64 -from tests.base_test_case import AbstractTestCase + class MultiAccountButton(Button): class Username(Text): @@ -122,7 +125,8 @@ def navigate(self): class UserProfileElement(Button): def __init__(self, driver, username): self.username = username - super().__init__(driver, xpath="//*[@text='%s']//ancestor::android.view.ViewGroup[@content-desc='profile-card']" % username) + super().__init__(driver, + xpath="//*[@text='%s']//ancestor::android.view.ViewGroup[@content-desc='profile-card']" % username) def open_user_options(self): Button(self.driver, xpath='%s//*[@content-desc="profile-card-options"]' % self.locator).click() @@ -197,9 +201,9 @@ def __init__(self, driver): self.start_button = Button(self.driver, accessibility_id="welcome-button") self.use_recovery_phrase_button = Button(self.driver, translation_id="use-recovery-phrase") self.passphrase_edit_box = EditBox(self.driver, accessibility_id="passphrase-input") - self.show_profiles_button = Button(self.driver, accessibility_id="show-profiles") - self.plus_profiles_button = Button(self.driver, accessibility_id="show-new-account-options") - self.create_new_profile_button = Button(self.driver, accessibility_id="create-new-profile") + self.show_profiles_button = Button(self.driver, accessibility_id="show-profiles") + self.plus_profiles_button = Button(self.driver, accessibility_id="show-new-account-options") + self.create_new_profile_button = Button(self.driver, accessibility_id="create-new-profile") self.remove_profile_button = Button(self.driver, accessibility_id="remove-profile") def set_password(self, password: str): @@ -225,7 +229,7 @@ def create_user(self, password=common_password, keycard=False, enable_notificati self.generate_keys_button.click_until_presence_of_element(self.profile_your_name_edit_box) self.set_profile(username) self.set_password(password) - if self.enable_biometric_maybe_later_button.is_element_displayed(30): + if self.enable_biometric_maybe_later_button.is_element_displayed(10): self.enable_biometric_maybe_later_button.click() # self.next_button.click_until_absense_of_element(self.element_by_translation_id("intro-wizard-title2")) # if keycard: @@ -262,7 +266,8 @@ def recover_access(self, passphrase: str, password: str = common_password, keyca self.continue_button.click_until_presence_of_element(self.profile_your_name_edit_box) self.set_profile(username, set_image) self.set_password(password) - self.enable_biometric_maybe_later_button.wait_and_click(30) + if self.enable_biometric_maybe_later_button.is_element_displayed(10): + self.enable_biometric_maybe_later_button.click() self.identifiers_button.wait_and_click(30) if enable_notifications: self.enable_notifications_button.click_until_presence_of_element(self.start_button) @@ -347,5 +352,3 @@ def get_user(self, username): self.driver.info("Getting username card by '%s'" % username) expected_element = UserProfileElement(self.driver, username) return expected_element if expected_element.is_element_displayed(10) else self.driver.fail("User is not found!") - -