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

Resolve username to ENS after 1-1 chat opened by ENS search #12100

Merged
merged 1 commit into from
May 19, 2021

Conversation

briansztamfater
Copy link
Member

@briansztamfater briansztamfater commented May 7, 2021

fixes #12027

Summary

We need to resolve username to ENS after 1-1 chat opened by ENS search. This PR approach is to get the ens name from contacts/new-identity db key if exists, and include it in contacts/contact-two-names-by-identity returning contact. Also include ens-name as default nickname if adding to contacts from the chat.

Platforms

  • Android
  • iOS

Areas that maybe impacted

Functional
  • 1-1 chats

Steps to test

  • Open Status
  • Tap on +
  • Start new chat
  • Search user by ENS
  • Start chat with ENS user

status: ready

@status-im-auto
Copy link
Member

status-im-auto commented May 7, 2021

Jenkins Builds

Click to see older builds (28)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ ecdf4ba #1 2021-05-07 19:56:19 ~11 min android-e2e 📦apk 📲
✔️ ecdf4ba #1 2021-05-07 19:56:32 ~12 min android 📦apk 📲
✔️ ecdf4ba #1 2021-05-07 20:01:43 ~17 min ios 📦ipa 📲
✔️ ecdf4ba #2 2021-05-11 13:23:43 ~14 min ios 📦ipa 📲
✖️ acf441b #2 2021-05-12 18:51:17 ~11 min android-e2e 📦apk 📲
✖️ acf441b #2 2021-05-12 18:51:17 ~11 min android 📦apk 📲
✖️ acf441b #3 2021-05-12 18:53:11 ~13 min ios 📦ipa 📲
✔️ 0031d55 #3 2021-05-12 19:39:42 ~11 min android-e2e 📦apk 📲
✔️ 0031d55 #3 2021-05-12 19:39:45 ~11 min android 📦apk 📲
✔️ 0031d55 #4 2021-05-12 19:41:46 ~13 min ios 📦ipa 📲
✖️ edf1694 #4 2021-05-13 17:47:00 ~11 min android-e2e 📦apk 📲
✖️ edf1694 #4 2021-05-13 17:47:10 ~11 min android 📦apk 📲
✖️ edf1694 #5 2021-05-13 17:49:44 ~14 min ios 📦ipa 📲
✔️ 60c8d7e #5 2021-05-13 18:07:46 ~12 min android 📦apk 📲
✔️ 60c8d7e #5 2021-05-13 18:07:51 ~12 min android-e2e 📦apk 📲
✔️ 60c8d7e #6 2021-05-13 18:11:13 ~16 min ios 📦ipa 📲
✔️ e16b436 #6 2021-05-13 20:12:45 ~11 min android-e2e 📦apk 📲
✔️ e16b436 #6 2021-05-13 20:12:46 ~11 min android 📦apk 📲
✔️ e16b436 #7 2021-05-13 20:15:03 ~13 min ios 📦ipa 📲
✔️ 88cb7cb #7 2021-05-15 04:38:38 ~11 min android-e2e 📦apk 📲
✔️ 88cb7cb #7 2021-05-15 04:38:38 ~11 min android 📦apk 📲
✔️ 88cb7cb #8 2021-05-15 04:42:11 ~15 min ios 📦ipa 📲
✔️ 843fc75 #8 2021-05-17 15:13:24 ~12 min android 📦apk 📲
✔️ 843fc75 #8 2021-05-17 15:13:37 ~12 min android-e2e 📦apk 📲
✔️ 843fc75 #9 2021-05-17 15:16:39 ~15 min ios 📦ipa 📲
✖️ 9e8f0f6 #9 2021-05-18 15:17:07 ~11 min android-e2e 📦apk 📲
✖️ 9e8f0f6 #9 2021-05-18 15:17:10 ~11 min android 📦apk 📲
✖️ 9e8f0f6 #10 2021-05-18 15:22:10 ~16 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c702b56 #10 2021-05-18 15:20:04 ~12 min android 📦apk 📲
✔️ c702b56 #10 2021-05-18 15:20:04 ~12 min android-e2e 📦apk 📲
✔️ c702b56 #11 2021-05-18 15:22:33 ~14 min ios 📦ipa 📲
✔️ 250d68f #11 2021-05-19 15:13:17 ~13 min android 📦apk 📲

@shivekkhurana shivekkhurana moved this from REVIEW to E2E Tests in Pipeline for QA May 11, 2021
@status-im-auto
Copy link
Member

96% of end-end tests have passed

Total executed tests: 80
Failed tests: 3
Passed tests: 77
IDs of failed tests: 5403,6279,6237 

Failed tests (3)

Click to expand
  • Rerun tests

  • 1. test_start_chat_with_ens_mention_in_one_to_one, id: 5403

    Device 1: Wait for EditBox
    Device 1: **1-1 chat is created successfully!**

    Device 1: Wrong user is resolved from username when starting 1-1 chat.

    Device sessions

    2. test_send_eth_to_ens_in_chat, id: 6279

    Expected amount of confirmations is 15, in fact 17
    Device 1: *Wait for text element TransactionStatus to be equal to Confirmed*

    Device 1: 'Pending' is not equal to expected 'Confirmed' in 30 sec

    Device sessions

    3. test_fetching_balance_after_offline, id: 6237

    Transaction #5, amount is 0.000483831
    {'blockNumber': '10213477', 'timeStamp': '1620728656', 'hash': '0x2de8709e3cca9022e7df522a183d735c0763f44c98e0b192fe895358282736bc', 'nonce': '1125', 'blockHash': '0xf3747d83544f46c7e2b661d804a2028da4026372c80f51a9a9083c0a4a785577', 'from': '0x0f3eff5cacee63045be97281316457fb78dd659e', 'contractAddress': '0x101848d5c5bbca18e6b4431eedf6b95e9adf82fa', 'to': '0xf184747445c3b85ceb147dfb136067cb93d95f1d', 'value': '483831000000000', 'tokenName': 'Weenus 💪', 'tokenSymbol': 'WEENUS', 'tokenDecimal': '18', 'transactionIndex': '2', 'gas': '41362', 'gasPrice': '31000000000', 'gasUsed': '34469', 'cumulativeGasUsed': '156820', 'input': 'deprecated', 'confirmations': '248'}

    Transaction with amount 0.001111953 is not found in list of token transactions, address is f184747445c3B85CEb147DfB136067CB93d95F1D during 600s

    Device sessions

    Passed tests (77)

    Click to expand

    1. test_image_in_one_to_one_send_save_reply_timeline, id: 6305
    Device sessions

    2. test_add_account_to_multiaccount_instance_generate_new, id: 6224
    Device sessions

    3. test_send_eth_from_wallet_to_address, id: 5308
    Device sessions

    4. test_onboarding_screen_when_requesting_tokens_for_recovered_account, id: 5677
    Device sessions

    5. test_keycard_can_see_all_transactions_in_history, id: 6291
    Device sessions

    6. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
    Device sessions

    7. test_open_blocked_secure_not_secure_inlalid_offline_urls, id: 6210
    Device sessions

    8. test_open_public_chat_using_deep_link, id: 5396
    Device sessions

    9. test_offline_add_new_group_chat_member, id: 3998
    Device sessions

    10. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    11. test_can_see_balance_and_all_transactions_history_on_cellular, id: 5314
    Device sessions

    12. test_keycard_create_login_resotore_unlock_same_seed, id: 5689
    Device sessions

    13. test_insufficient_funds_wallet_positive_balance, id: 5412
    Device sessions

    14. test_delete_close_all_tabs, id: 5390
    Device sessions

    15. test_send_token_with_7_decimals, id: 5350
    Device sessions

    16. test_delete_chats_via_delete_button_rejoin, id: 5387
    Device sessions

    17. test_send_transaction_set_recipient_options, id: 6328
    Device sessions

    18. test_recover_account_from_new_user_seedphrase, id: 6296
    Device sessions

    19. test_keycard_can_recover_keycard_account_card_pairing, id: 5758
    Device sessions

    20. test_block_user_from_public_chat, id: 5786
    Device sessions

    21. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    22. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    23. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    24. test_keycard_send_eth_from_wallet_to_address, id: 6289
    Device sessions

    25. test_request_public_key_status_test_daap, id: 5397
    Device sessions

    26. test_sign_message_from_daap, id: 5342
    Device sessions

    27. test_add_account_to_wallet_private_key_and_seed_phrase, id: 6272
    Device sessions

    28. test_back_forward_refresh_navigation_history_kept_after_relogin (TestRail link is not found)
    Device sessions

    29. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310
    Device sessions

    30. test_redirect_to_public_chat_tapping_tag_message, id: 5675
    Device sessions

    31. test_keycard_send_two_transactions_one_after_another_in_dapp, id: 6288
    Device sessions

    32. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    33. test_long_press_to_delete_chat, id: 5319
    Device sessions

    34. test_copy_and_paste_messages, id: 5317
    Device sessions

    35. test_open_transaction_on_etherscan_copy_tx_hash, id: 5384
    Device sessions

    36. test_unread_messages_counter_public_chat, id: 5360
    Device sessions

    37. test_user_can_see_all_own_assets_after_account_recovering, id: 5381
    Device sessions

    38. test_transaction_wrong_password_wallet, id: 5408
    Device sessions

    39. test_mobile_data_usage_complex_settings, id: 6228
    Device sessions

    40. test_send_two_transactions_one_after_another_in_dapp, id: 5744
    Device sessions

    41. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    42. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    43. test_fetch_more_history_in_empty_chat, id: 6205
    Device sessions

    44. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    45. test_keycard_send_two_transactions_in_batch_in_dapp, id: 6287
    Device sessions

    46. test_switch_users_special_char_password_and_add_new_account_logcat, id: 5356
    Device sessions

    47. test_keycard_sign_message_from_daap, id: 6251
    Device sessions

    48. test_manage_assets, id: 5341
    Device sessions

    49. test_send_two_transactions_in_batch_in_dapp, id: 5743
    Device sessions

    50. test_browser_managing_bookmarks, id: 6633
    Device sessions

    51. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    52. test_request_stt_from_daap, id: 5309
    Device sessions

    53. test_send_emoji, id: 5328
    Device sessions

    54. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    55. test_dapps_permissions, id: 5738
    Device sessions

    56. test_account_recovery_with_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 5394
    Device sessions

    57. test_create_new_group_chat_messaging_pn_delived, id: 3994
    Device sessions

    58. test_share_copy_contact_code_and_wallet_address, id: 5323
    Device sessions

    59. test_wallet_set_up, id: 5335
    Device sessions

    60. test_send_transaction_with_custom_token, id: 6208
    Device sessions

    61. test_home_view, id: 5379
    Device sessions

    62. test_can_add_existing_ens, id: 5502
    Device sessions

    63. test_logcat_backup_recovery_phrase, id: 5419
    Device sessions

    64. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    65. test_set_profile_picture, id: 6646
    Device sessions

    66. test_collectible_from_wallet, id: 5346
    Device sessions

    67. test_public_chat_messaging, id: 5313
    Device sessions

    68. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    69. test_keycard_request_stt_from_daap, id: 6249
    Device sessions

    70. test_restore_account_from_mnemonic_to_keycard, id: 6240
    Device sessions

    71. test_pass_phrase_validation, id: 5363
    Device sessions

    72. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    73. test_send_and_open_links_with_previews, id: 5373
    Device sessions

    74. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    75. test_filters_from_daap, id: 5353
    Device sessions

    76. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    77. test_keycard_fetching_balance_after_offline, id: 6290
    Device sessions

    @qoqobolo qoqobolo moved this from E2E Tests to IN TESTING in Pipeline for QA May 11, 2021
    @qoqobolo
    Copy link
    Contributor

    @briansztamfater

    ISSUE 1: ENS name changes to a 3-random name in the chat list when focusing on the search field, if 1-1 chat with this user was started using +> Start new chat

    Also, ENS name changes to 3-random in the chat list when pressing on Start new chat (video 2).

    IMG_0626.mp4
    IMG_0627.mp4

    Steps:

    Case 1:

    • Open Status
    • Tap + button on the Home screen > Start new chat
    • Enter ENS
    • Open 1-1 chat
    • Open the Home screen
    • Set focus to search field

    Case 2:

    • Open Status
    • Tap + button on the Home screen > Start new chat
    • Enter ENS
    • Open 1-1 chat
    • Open the Home screen
    • Tap + button on the Home screen > tap Start new chat and pay attention to ENS in the chat list

    Operating System: Android, iOS

    @briansztamfater
    Copy link
    Member Author

    Good catch @qoqobolo, I will work on both issues and let you know.

    @briansztamfater
    Copy link
    Member Author

    @qoqobolo Fixes are pushed. Let me know if other issue arises!

    @qoqobolo
    Copy link
    Contributor

    @briansztamfater thanks for fix!
    Yeah, it would be nice to have this case fixed as well, if it's not much trouble for you, because it is quite visible to users.

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented May 13, 2021

    @briansztamfater

    ISSUE 2: ENS is displayed as a nickname in user's profile if User1 adds to contacts User2 via + Add to contacts in the 1-1 chat view;

    After removing ENS from the nickname field 3-random name is displayed in user's profile until he is re-added to contacts.

    ISSUE 3: ENS changes to 3-random and back in user's profile view depending on adding to contacts and adding nickname

    Steps (for both issues):

    • + button > Start new chat > Start 1-1 chat with ENS-user (e.g. ditest)
    • Tap ... at the top right > View profile to check how the username is displayed (currently it's 3-random name)
    • Return to the chat view and tap + Add to contacts at the top of the chat view
    • Tap ... at the top right > View profile to check how the username is displayed (ENS)
    • Clear nickname field > Tap Done (name turns to 3-random again)
    IMG_0648.mp4

    @briansztamfater
    Copy link
    Member Author

    @qoqobolo Fixed both and should be also fixed the issue when closing / reopening the app

    @qoqobolo
    Copy link
    Contributor

    qoqobolo commented May 14, 2021

    @briansztamfater thank you! All three issues have been fixed, great!
    But a few more problems were found :(
    Please let me know if any of them are not PR-related and should be logged and fixed separately. Thank you for your patience.

    ISSUE 4: ENS names aren't resolved in the mention list if chat with ENS user was started by Start new chat button

    Steps:

    • + button > Start new chat > Start 1-1 chat with ENS-user (e.g. ditest)
    • Type @

    Screenshot 2021-05-14 at 09 29 35

    ISSUE 5: ENS names are displayed in different ways on different screens of the app

    ENS is displayed with the .stateofus.eth domain in the chat view and user's profile and with @ (without domain) in contacts and on the Start new chat screen if a user was added to contacts.

    IMG_0650.mp4

    ISSUE 6: Can't use the search field on the Home screen to search for a chat with an ENS user if this chat was started using the Start new chat button

    For chats that were started in other ways (from contacts or public chat, for instance) the search works fine.

    IMG_0652.mp4

    ISSUE 7: ENS isn't shown in Group info if 1-1 chat with this ENS user was started by Start new chat button and then he was added to contacts and to group chat

    Steps:

    • Start new chat with ENS user using Start new chat button
    • Tap + Add to contacts on the top of the chat view
    • Navigate to profile > Contacts > Add to contacts another ENS user
    • Open Home screen > Create a group chat with both contacts
    • Open group info

    ISSUE 8: ENS isn't shown in Contacts if the user was added to contacts from the chat view, which was started using the "Start new chat" button

    Steps:

    • Start new chat with ENS user using Start new chat button
    • Tap + Add to contacts on the top of the chat view
    • Navigate to Profile > Contacts
    IMG_0654.mp4

    ISSUE 9: Can send ETH directly to ENS name in 1-1 chat if 1-1 chat with this ENS user was started by Start new chat button

    Commands in 1-1 chat work fine if chat was started in a different way.

    Steps:

    • Start new chat with ENS user using Start new chat button
    • Open transaction dialog in 1-1 chat (+ button at the bottom left)
    • Tap Send transaction, enter valid amount of ETH
    • Tap Next
      Expected behavior: "Sign with password/Keycard" bottom sheet is opened, no address request is sent
      Actual behavior: "Address requested" message is sent

    Screenshot 2021-05-14 at 10 39 35

    @status-im-auto
    Copy link
    Member

    99% of end-end tests have passed

    Total executed tests: 80
    Failed tests: 1
    Passed tests: 79
    
    IDs of failed tests: 5403 
    

    Failed tests (1)

    Click to expand
  • Rerun tests

  • 1. test_start_chat_with_ens_mention_in_one_to_one, id: 5403

    Device 1: Wait for EditBox
    Device 1: **1-1 chat is created successfully!**

    Device 1: Wrong user is resolved from username when starting 1-1 chat.

    Device sessions

    Passed tests (79)

    Click to expand

    1. test_send_token_with_7_decimals, id: 5350
    Device sessions

    2. test_keycard_send_eth_from_wallet_to_address, id: 6289
    Device sessions

    3. test_request_public_key_status_test_daap, id: 5397
    Device sessions

    4. test_keycard_fetching_balance_after_offline, id: 6290
    Device sessions

    5. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    6. test_send_audio_message_with_push_notification_check, id: 6316
    Device sessions

    7. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    8. test_long_press_to_delete_chat, id: 5319
    Device sessions

    9. test_restore_account_migrate_multiaccount_to_keycard, id: 6645
    Device sessions

    10. test_add_account_to_wallet_private_key_and_seed_phrase, id: 6272
    Device sessions

    11. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    12. test_sign_message_from_daap, id: 5342
    Device sessions

    13. test_send_and_open_links_with_previews, id: 5373
    Device sessions

    14. test_keycard_create_login_resotore_unlock_same_seed, id: 5689
    Device sessions

    15. test_manage_assets, id: 5341
    Device sessions

    16. test_open_public_chat_using_deep_link, id: 5396
    Device sessions

    17. test_keycard_sign_message_from_daap, id: 6251
    Device sessions

    18. test_send_transaction_set_recipient_options, id: 6328
    Device sessions

    19. test_unread_messages_counter_public_chat, id: 5360
    Device sessions

    20. test_logcat_backup_recovery_phrase, id: 5419
    Device sessions

    21. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    22. test_filters_from_daap, id: 5353
    Device sessions

    23. test_keycard_request_stt_from_daap, id: 6249
    Device sessions

    24. test_fetch_more_history_in_empty_chat, id: 6205
    Device sessions

    25. test_browser_managing_bookmarks, id: 6633
    Device sessions

    26. test_mobile_data_usage_complex_settings, id: 6228
    Device sessions

    27. test_open_blocked_secure_not_secure_inlalid_offline_urls, id: 6210
    Device sessions

    28. test_send_two_transactions_in_batch_in_dapp, id: 5743
    Device sessions

    29. test_send_two_transactions_one_after_another_in_dapp, id: 5744
    Device sessions

    30. test_add_account_to_multiaccount_instance_generate_new, id: 6224
    Device sessions

    31. test_send_eth_to_ens_in_chat, id: 6279
    Device sessions

    32. test_create_new_group_chat_messaging_pn_delived, id: 3994
    Device sessions

    33. test_ens_mentions_pn_and_nickname_in_public_and_1_1_chats, id: 6226
    Device sessions

    34. test_onboarding_screen_when_requesting_tokens_for_recovered_account, id: 5677
    Device sessions

    35. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    36. test_dapps_permissions, id: 5738
    Device sessions

    37. test_send_eth_from_wallet_to_address, id: 5308
    Device sessions

    38. test_redirect_to_public_chat_tapping_tag_message, id: 5675
    Device sessions

    39. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    40. test_keycard_can_see_all_transactions_in_history, id: 6291
    Device sessions

    41. test_request_stt_from_daap, id: 5309
    Device sessions

    42. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    43. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310
    Device sessions

    44. test_delete_close_all_tabs, id: 5390
    Device sessions

    45. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    46. test_block_user_from_public_chat, id: 5786
    Device sessions

    47. test_can_see_balance_and_all_transactions_history_on_cellular, id: 5314
    Device sessions

    48. test_public_chat_messaging, id: 5313
    Device sessions

    49. test_image_in_one_to_one_send_save_reply_timeline, id: 6305
    Device sessions

    50. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    51. test_back_forward_refresh_navigation_history_kept_after_relogin (TestRail link is not found)
    Device sessions

    52. test_home_view, id: 5379
    Device sessions

    53. test_transaction_wrong_password_wallet, id: 5408
    Device sessions

    54. test_keycard_send_two_transactions_in_batch_in_dapp, id: 6287
    Device sessions

    55. test_keycard_send_two_transactions_one_after_another_in_dapp, id: 6288
    Device sessions

    56. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    57. test_set_profile_picture, id: 6646
    Device sessions

    58. test_restore_account_from_mnemonic_to_keycard, id: 6240
    Device sessions

    59. test_share_copy_contact_code_and_wallet_address, id: 5323
    Device sessions

    60. test_delete_chats_via_delete_button_rejoin, id: 5387
    Device sessions

    61. test_can_add_existing_ens, id: 5502
    Device sessions

    62. test_send_transaction_with_custom_token, id: 6208
    Device sessions

    63. test_fetching_balance_after_offline, id: 6237
    Device sessions

    64. test_offline_add_new_group_chat_member, id: 3998
    Device sessions

    65. test_copy_and_paste_messages, id: 5317
    Device sessions

    66. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
    Device sessions

    67. test_account_recovery_with_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 5394
    Device sessions

    68. test_pass_phrase_validation, id: 5363
    Device sessions

    69. test_insufficient_funds_wallet_positive_balance, id: 5412
    Device sessions

    70. test_open_transaction_on_etherscan_copy_tx_hash, id: 5384
    Device sessions

    71. test_wallet_set_up, id: 5335
    Device sessions

    72. test_keycard_can_recover_keycard_account_card_pairing, id: 5758
    Device sessions

    73. test_switch_users_special_char_password_and_add_new_account_logcat, id: 5356
    Device sessions

    74. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    75. test_collectible_from_wallet, id: 5346
    Device sessions

    76. test_send_emoji, id: 5328
    Device sessions

    77. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    78. test_recover_account_from_new_user_seedphrase, id: 6296
    Device sessions

    79. test_user_can_see_all_own_assets_after_account_recovering, id: 5381
    Device sessions

    @briansztamfater
    Copy link
    Member Author

    @qoqobolo Hey! No problem, PR is getting bigger than expected but I will check one by one if they are related to these changes.

    @briansztamfater
    Copy link
    Member Author

    @qoqobolo New issues should be fixed now. Let me know how it goes :)

    :valid)
    :error error
    :ens-name (resolver/ens-name-parse new-ens-name)})}
    (merge {:db (as-> db $
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    could you please elaborate on using as->. here ? thanks

    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Was to add an if statement inside the macro, but I'm pretty sure there are better ways to do it

    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    cond-> ?

    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    That looks way cleaner :)

    :chats/loading? false)
    :dispatch-n [[:chat/start-timeline-chat]
    [:start-profile-chat (get-in db [:multiaccount :public-key])]]}
    (doseq [chat chats-v]
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    this is somehting really wrong, i don't understand this

    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    we cant fx/merge doseq

    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    why do we want to doseq all chats? i believe we need to verify only one entered name ?

    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    When closing / opening the app the ens-names on chats are lost so the main idea was to check ens-names and verify them again for each chat that was started through ENS search. I'm open to other approaches as this is not one I'm proud of.

    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    When closing / opening the app the ens-names on chats are lost

    hm why are they lost ?

    Copy link
    Member Author

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    If user is not saved to contacts after initializing a chat, ens name is lost. I'm trying to figure out why that's happening, but maybe we could investigate that in another issue and simplify this PR, because that is happening right now also when starting a chat with an ENS user from the search bar.

    @@ -116,6 +116,10 @@
    ([db public-key]
    (active? (get-in db [:contacts/contacts public-key]))))

    (defn add-ens-name
    [contact ens-name]
    (if ens-name (assoc-in contact [:name] ens-name) contact))
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    why assoc-in ?

    (assoc contacts chat-id (get contacts chat-id (-> chat-id
    contact.db/public-key->new-contact
    contact.db/enrich-contact)))
    contact.db/enrich-contact
    (contact.db/add-ens-name ens-name?))))
    Copy link
    Member

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    you can just use (get ens-names chat-id) directly here

    @briansztamfater
    Copy link
    Member Author

    briansztamfater commented May 18, 2021

    @qoqobolo @flexsurfer Hey so I just simplified this PR as I think I over engineered at first. There's one issue that I detected but maybe would be a good idea to cover it in another issue, and it is when you don't add ENS user to contacts, the ENS name is lost after closing / opening the app. But that's already happenning when starting a chat with an ENS user from the search bar, so I would file a new issue and investigate there. Let me know what do you think.

    @qoqobolo
    Copy link
    Contributor

    @briansztamfater okay, I'll log a new issue with that case.

    As for the previous problems - they are all fixed. Thanks for your great work!
    PR is ready to be merged.

    @qoqobolo qoqobolo moved this from IN TESTING to MERGE in Pipeline for QA May 18, 2021
    …arch from 'Start new chat' by ENS
    
    Signed-off-by: Brian Sztamfater <brian@status.im>
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Archived in project
    Development

    Successfully merging this pull request may close these issues.

    Username not resolved to ENS right after 1-1 chat opened after username search from 'Start new chat' by ENS
    5 participants