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

add watch only address using qrcode #9898

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

tbenr
Copy link
Contributor

@tbenr tbenr commented Jan 23, 2020

when adding a watch-only address I added:

  • ability to add via QR code scan
    avoid adding if address has been already added
    i18n on some hardcoded strings (fixed by latest pr)

status: ready

image

@tbenr tbenr requested a review from a team as a code owner January 23, 2020 16:52
@auto-assign auto-assign bot removed the request for review from a team January 23, 2020 16:52
@status-github-bot
Copy link

Pull Request Checklist

  • Docs: Updated the documentation, if affected
  • Docs: Added or updated inline comments explaining intention of the code
  • Tests: Ensured that all new UI elements have been assigned accessibility IDs
  • Tests: Signaled need for E2E tests with label, if applicable
  • Tests: Briefly described what was tested and what platforms were used
  • UI: In case of UI changes, ensured that UI matches Figma
  • UI: In case of UI changes, requested review from a Core UI designer
  • UI: In case of UI changes, included screenshots of implementation

@status-im-auto
Copy link
Member

status-im-auto commented Jan 23, 2020

Jenkins Builds

Click to see older builds (7)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 082e97c #1 2020-01-23 17:01:17 ~8 min ios 📦ipa 📲
✔️ 082e97c #1 2020-01-23 17:07:52 ~15 min android-e2e 📦apk 📲
✔️ 082e97c #1 2020-01-23 17:08:01 ~15 min android 📦apk 📲
✔️ 136c0c1 #2 2020-01-27 12:07:12 ~9 min ios 📦ipa 📲
✔️ 6237b60 #3 2020-01-27 12:20:21 ~10 min ios 📦ipa 📲
✔️ 6237b60 #3 2020-01-27 12:24:09 ~14 min android 📦apk 📲
✔️ 6237b60 #3 2020-01-27 12:24:09 ~14 min android-e2e 📦apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 290d144 #4 2020-02-05 21:06:29 ~11 min ios 📦ipa 📲
✔️ 290d144 #4 2020-02-05 21:11:20 ~16 min android-e2e 📦apk 📲
✔️ 290d144 #4 2020-02-05 21:11:20 ~16 min android 📦apk 📲
✔️ 290d144 #5 2020-02-13 12:51:38 ~11 min ios 📦ipa 📲
✔️ bbb5497 #6 2020-02-14 07:49:45 ~10 min ios 📦ipa 📲
✔️ bbb5497 #5 2020-02-14 07:53:22 ~14 min android-e2e 📦apk 📲
✔️ bbb5497 #5 2020-02-14 07:53:23 ~14 min android 📦apk 📲
✔️ bbb5497 #6 2020-02-17 14:07:16 ~13 min android 📦apk 📲
✔️ bbb5497 #7 2020-02-17 14:11:43 ~10 min ios 📦ipa 📲

@statustestbot
Copy link

97% of end-end tests have passed

Total executed tests: 101
Failed tests: 3
Passed tests: 98

Failed tests (3)

Click to expand
1. test_timestamp_in_chats
Connection was closed cleanly.

2. test_ens_in_public_and_1_1_chats

Device 1: Wait for LetsGoButton
Device 1: Tap on LetsGoButton

Device 2: 'GetStartedButton' is not found on the screen

Device sessions

3. test_fetching_balance_after_offline

Device 1: Wait for AssetTextElement
Device 1: Waiting 300 seconds for STT to display asset

Device 1: Balance is not changed during 300 seconds!

Device sessions

Passed tests (98)

Click to expand
1. test_can_see_all_transactions_in_history
Device sessions

2. test_install_pack_and_send_sticker
Device sessions

3. test_send_message_in_group_chat
Device sessions

4. test_login_with_new_account
Device sessions

5. test_clear_history_of_group_chat_via_group_view
Device sessions

6. test_password_in_logcat_sign_in
Device sessions

7. test_logcat_recovering_account
Device sessions

8. test_modify_transaction_fee_values
Device sessions

9. test_public_chat_clear_history
Device sessions

10. test_need_help_section
Device sessions

11. test_send_and_open_links
Device sessions

12. test_mobile_data_usage_popup_stop_syncing
Device sessions

13. test_mobile_data_usage_settings
Device sessions

14. test_create_new_group_chat
Device sessions

15. test_sign_typed_message
Device sessions

16. test_user_can_switch_network
Device sessions

17. test_mobile_data_usage_popup_continue_syncing
Device sessions

18. test_set_profile_picture
Device sessions

19. test_home_view
Device sessions

20. test_open_google_com_via_open_dapp
Device sessions

21. test_send_message_to_newly_added_contact
Device sessions

22. test_share_contact_code_and_wallet_address
Device sessions

23. test_make_admin_member_of_group_chat
Device sessions

24. test_connection_is_secure
Device sessions

25. test_add_to_contacts
Device sessions

26. test_add_account_to_multiaccount_instance
Device sessions

27. test_can_open_dapp_from_dapp_store
Device sessions

28. test_user_can_remove_profile_picture
Device sessions

29. test_refresh_button_browsing_app_webview
Device sessions

30. test_long_press_to_delete_1_1_chat
Device sessions

31. test_can_add_existing_ens
Device sessions

32. test_transaction_wrong_password_wallet
Device sessions

33. test_public_chat_messaging
Device sessions

34. test_unread_messages_counter_public_chat
Device sessions

35. test_delete_one_to_one_chat_via_delete_button
Device sessions

36. test_long_press_to_delete_public_chat
Device sessions

37. test_text_message_1_1_chat
Device sessions

38. test_delete_public_chat_via_delete_button
Device sessions

39. test_can_use_purchased_stickers_on_recovered_account
Device sessions

40. test_open_transaction_on_etherscan
Device sessions

41. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

42. test_unread_messages_counter_1_1_chat
Device sessions

43. test_contact_profile_view
Device sessions

44. test_logcat_backup_recovery_phrase
Device sessions

45. test_delete_group_chat_via_delete_button
Device sessions

46. test_start_chat_with_ens
Device sessions

47. test_add_and_remove_contact_from_public_chat
Device sessions

48. test_open_blocked_site
Device sessions

49. test_open_chat_by_pasting_public_key
Device sessions

50. test_ens_username_recipient
Device sessions

51. test_token_with_more_than_allowed_decimals
Device sessions

52. test_fetch_more_history_in_empty_chat
Device sessions

53. test_open_public_chat_using_deep_link
Device sessions

54. test_switch_users_and_add_new_account
Device sessions

55. test_copy_contact_code_and_wallet_address
Device sessions

56. test_send_transaction_from_daap
Device sessions

57. test_send_two_transactions_one_after_another_in_dapp
Device sessions

58. test_message_marked_as_sent_in_1_1_chat
Device sessions

59. test_long_press_delete_clear_all_dapps
Device sessions

60. test_copy_and_paste_messages
Device sessions

61. test_deploy_contract_from_daap
Device sessions

62. test_back_forward_buttons_browsing_website
Device sessions

63. test_password_in_logcat_creating_account
Device sessions

64. test_add_custom_token
Device sessions

65. test_sign_message_from_daap
Device sessions

66. test_group_chat_system_messages
Device sessions

67. test_dapps_permissions
Device sessions

68. test_request_public_key_status_test_daap
Device sessions

69. test_logcat_send_transaction_from_wallet
Device sessions

70. test_pair_devices_sync_name_photo_public_group_chats
Device sessions

71. test_log_level_and_fleet
Device sessions

72. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

73. test_recover_account_from_new_user_seedphrase
Device sessions

74. test_user_can_complete_tx_to_dapp_when_onboarding_via_dapp_completed
Device sessions

75. test_send_two_transactions_in_batch_in_dapp
Device sessions

76. test_block_user_from_public_chat
Device sessions

77. test_logcat_sign_message_from_daap
Device sessions

78. test_offline_status
Device sessions

79. test_wallet_set_up
Device sessions

80. test_manage_assets
Device sessions

81. test_add_new_group_chat_member
Device sessions

82. test_offline_messaging_1_1_chat
Device sessions

83. test_decline_invitation_to_group_chat
Device sessions

84. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

85. test_send_token_with_7_decimals
Device sessions

86. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

87. test_pass_phrase_validation
Device sessions

88. test_send_emoji
Device sessions

89. test_filters_from_daap
Device sessions

90. test_redirect_to_public_chat_tapping_tag_message
Device sessions

91. test_pair_devices_sync_one_to_one_contacts
Device sessions

92. test_logcat_send_transaction_from_daap
Device sessions

93. test_remove_member_from_group_chat
Device sessions

94. test_send_eth_from_wallet_to_address
Device sessions

95. test_send_stt_from_wallet
Device sessions

96. test_messaging_in_different_networks
Device sessions

97. test_collectible_from_wallet_opens_in_browser_view
Device sessions

98. test_insufficient_funds_wallet_positive_balance
Device sessions

@flexsurfer
Copy link
Member

flexsurfer commented Jan 24, 2020

avoid adding if address has been already added

i believe we have this already, next button is disabled if address has been already added

@tbenr
Copy link
Contributor Author

tbenr commented Jan 24, 2020

@flexsurfer oh right it's in the :add-account-disabled? sub.
my qr implementation bypass that so i implemented it also in the fx running after

@tbenr tbenr changed the title watch only qrcode and already exists check add watch only address using qrcode Jan 27, 2020
@flexsurfer flexsurfer requested a review from yenda January 27, 2020 12:08
@tbenr tbenr requested a review from andmironov January 27, 2020 12:10
@tbenr
Copy link
Contributor Author

tbenr commented Jan 27, 2020

@andmironov i changed a bit the message and how it is displayed

@statustestbot
Copy link

90% of end-end tests have passed

Total executed tests: 101
Failed tests: 10
Passed tests: 91

Failed tests (10)

Click to expand
1. test_set_profile_picture

Device 1: Wait for DefaultUserNameText
Device 1: Tap on ProfilePictureElement

Device 1: 'SelectFromGalleryButton' is not found on the screen

Device sessions

2. test_send_message_to_newly_added_contact

Device 1: Wait for DefaultUserNameText
Device 1: Tap on ProfilePictureElement

Device 1: 'SelectFromGalleryButton' is not found on the screen

Device sessions

3. test_make_admin_member_of_group_chat

Device 2: Wait for DefaultUserNameText
Device 2: Tap on ShareMyProfileButton

Device 2: 'PublicKeyText' is not found on the screen

Device sessions

4. test_add_to_contacts

Device 2: PublicKeyText is 0x049257a72c307de9d8398b81703fa80f48d83f35190963027993fb10f76d8822ab7e426b0171383644f42d1c5f9a61933b93836903e84bd7e06d756a49d6eb97bf
Device 2: Tap on ProfilePictureElement

Device 2: 'SelectFromGalleryButton' is not found on the screen

Device sessions

5. test_user_can_remove_profile_picture

Device 1: Wait for DefaultUserNameText
Device 1: Tap on ProfilePictureElement

Device 1: 'SelectFromGalleryButton' is not found on the screen

Device sessions

6. test_add_and_remove_contact_from_public_chat

Device 1: Wait for RemoveFromContactsButton
Device 1: Wait for DefaultUserNameText

Device 1: 'ContactsButton' is not found on the screen

Device sessions

7. test_pair_devices_sync_name_photo_public_group_chats

Device 1: Wait for DefaultUserNameText
Device 1: Tap on ProfilePictureElement

Device 1: 'SelectFromGalleryButton' is not found on the screen

Device sessions

8. test_ens_in_public_and_1_1_chats

Device 2: Tap on ProfileAddToContactsButton
Device 2: Wait for DefaultUserNameText

Device 2: 'ContactsButton' is not found on the screen

Device sessions

9. test_fetching_balance_after_offline

Device 1: Wait for AssetTextElement
Device 1: Waiting 300 seconds for STT to display asset

Device 1: Balance is not changed during 300 seconds!

Device sessions

10. test_pair_devices_sync_one_to_one_contacts

Device 2: Tap on AdvertiseDeviceButton
Device 1: Wait for DefaultUserNameText

Device 1: 'SyncSettingsButton' is not found on the screen

Device sessions

Passed tests (91)

Click to expand
1. test_can_see_all_transactions_in_history
Device sessions

2. test_install_pack_and_send_sticker
Device sessions

3. test_send_message_in_group_chat
Device sessions

4. test_login_with_new_account
Device sessions

5. test_clear_history_of_group_chat_via_group_view
Device sessions

6. test_timestamp_in_chats
Device sessions

7. test_password_in_logcat_sign_in
Device sessions

8. test_logcat_recovering_account
Device sessions

9. test_modify_transaction_fee_values
Device sessions

10. test_public_chat_clear_history
Device sessions

11. test_need_help_section
Device sessions

12. test_send_and_open_links
Device sessions

13. test_mobile_data_usage_popup_stop_syncing
Device sessions

14. test_mobile_data_usage_settings
Device sessions

15. test_create_new_group_chat
Device sessions

16. test_sign_typed_message
Device sessions

17. test_user_can_switch_network
Device sessions

18. test_mobile_data_usage_popup_continue_syncing
Device sessions

19. test_home_view
Device sessions

20. test_open_google_com_via_open_dapp
Device sessions

21. test_share_contact_code_and_wallet_address
Device sessions

22. test_connection_is_secure
Device sessions

23. test_add_account_to_multiaccount_instance
Device sessions

24. test_can_open_dapp_from_dapp_store
Device sessions

25. test_refresh_button_browsing_app_webview
Device sessions

26. test_long_press_to_delete_1_1_chat
Device sessions

27. test_can_add_existing_ens
Device sessions

28. test_transaction_wrong_password_wallet
Device sessions

29. test_public_chat_messaging
Device sessions

30. test_unread_messages_counter_public_chat
Device sessions

31. test_delete_one_to_one_chat_via_delete_button
Device sessions

32. test_long_press_to_delete_public_chat
Device sessions

33. test_text_message_1_1_chat
Device sessions

34. test_delete_public_chat_via_delete_button
Device sessions

35. test_can_use_purchased_stickers_on_recovered_account
Device sessions

36. test_open_transaction_on_etherscan
Device sessions

37. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

38. test_unread_messages_counter_1_1_chat
Device sessions

39. test_contact_profile_view
Device sessions

40. test_logcat_backup_recovery_phrase
Device sessions

41. test_delete_group_chat_via_delete_button
Device sessions

42. test_start_chat_with_ens
Device sessions

43. test_open_blocked_site
Device sessions

44. test_open_chat_by_pasting_public_key
Device sessions

45. test_ens_username_recipient
Device sessions

46. test_token_with_more_than_allowed_decimals
Device sessions

47. test_fetch_more_history_in_empty_chat
Device sessions

48. test_open_public_chat_using_deep_link
Device sessions

49. test_switch_users_and_add_new_account
Device sessions

50. test_copy_contact_code_and_wallet_address
Device sessions

51. test_send_transaction_from_daap
Device sessions

52. test_send_two_transactions_one_after_another_in_dapp
Device sessions

53. test_message_marked_as_sent_in_1_1_chat
Device sessions

54. test_long_press_delete_clear_all_dapps
Device sessions

55. test_copy_and_paste_messages
Device sessions

56. test_deploy_contract_from_daap
Device sessions

57. test_back_forward_buttons_browsing_website
Device sessions

58. test_password_in_logcat_creating_account
Device sessions

59. test_add_custom_token
Device sessions

60. test_sign_message_from_daap
Device sessions

61. test_group_chat_system_messages
Device sessions

62. test_dapps_permissions
Device sessions

63. test_request_public_key_status_test_daap
Device sessions

64. test_logcat_send_transaction_from_wallet
Device sessions

65. test_log_level_and_fleet
Device sessions

66. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

67. test_recover_account_from_new_user_seedphrase
Device sessions

68. test_user_can_complete_tx_to_dapp_when_onboarding_via_dapp_completed
Device sessions

69. test_send_two_transactions_in_batch_in_dapp
Device sessions

70. test_block_user_from_public_chat
Device sessions

71. test_logcat_sign_message_from_daap
Device sessions

72. test_offline_status
Device sessions

73. test_wallet_set_up
Device sessions

74. test_manage_assets
Device sessions

75. test_add_new_group_chat_member
Device sessions

76. test_offline_messaging_1_1_chat
Device sessions

77. test_decline_invitation_to_group_chat
Device sessions

78. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

79. test_send_token_with_7_decimals
Device sessions

80. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

81. test_pass_phrase_validation
Device sessions

82. test_send_emoji
Device sessions

83. test_filters_from_daap
Device sessions

84. test_redirect_to_public_chat_tapping_tag_message
Device sessions

85. test_logcat_send_transaction_from_daap
Device sessions

86. test_remove_member_from_group_chat
Device sessions

87. test_send_eth_from_wallet_to_address
Device sessions

88. test_send_stt_from_wallet
Device sessions

89. test_messaging_in_different_networks
Device sessions

90. test_collectible_from_wallet_opens_in_browser_view
Device sessions

91. test_insufficient_funds_wallet_positive_balance
Device sessions

@flexsurfer
Copy link
Member

@tbenr could we just insert scanned address into input field? in that case we don't need to duplicate logic and validations

@tbenr
Copy link
Contributor Author

tbenr commented Feb 5, 2020

@flexsurfer it was one option but then, as a user, I thought it was better to go straight to next screen. But I can change it, no prob (I should have time this evening).

@flexsurfer
Copy link
Member

flexsurfer commented Feb 5, 2020

@tbenr yeah i think better to change that, because it would be great if you can review scanned address before adding it, and code will be simpler, thanks!

@Serhy
Copy link
Contributor

Serhy commented Feb 13, 2020

Looks great to me on iOS and Android when adding QR code from Status.
However, I guess at the moment it's not often case when user will need to scan QR codes from Status app account addresses.

Mostly it will be pure address var encoded in QR code (while in Status app has encoded in ethereum:0x.........@XX format (where XX is network id). And in that case it fails to add address saying 'Scanned QR code doesn't contain a valid address'

So when scanning QR code (value ethereum:0xDdc867bAB69c9488E65f610E071752f621C7F504)
Screenshot 2020-02-13 at 16 02 16
OR
with the content value (ethereum:0xDdc867bAB69c9488E65f610E071752f621C7F504@3)
Screenshot 2020-02-13 at 16 02 32
then it's parses and inserted fine

But when scanning address (normalised one, - value is 0xDdc867bAB69c9488E65f610E071752f621C7F504)
Screenshot 2020-02-13 at 15 52 03
or same but non-normalised
Screenshot 2020-02-13 at 15 52 36
then 'Scanned QR code doesn't contain a valid address' :(

@tbenr, could you update it please so it could eat pure ETH address as well?

@tbenr
Copy link
Contributor Author

tbenr commented Feb 14, 2020

@Serhy done!

@churik
Copy link
Member

churik commented Feb 17, 2020

Retested with QRs from the description, with QR ethereum:0x.........@XX format on IOS and Android.
Also checked error handling when scanning invalid QR.
Thank you @tbenr !
Looks good from my side.
It contains also design-review label.
@errorists would you mind to take a look?

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
@churik churik merged commit eb1cc65 into status-im:develop Feb 24, 2020
@hesterbruikman
Copy link
Contributor

Not sure if the issue @Serhy raised was resolved in the PR build I just tried. For a 'pure' ETH address without Ethereum: prefix I get the error "Scanned QR code doesn't contain valid address"

@churik
Copy link
Member

churik commented Feb 24, 2020

@hesterbruikman what build and platform you tried?

@hesterbruikman
Copy link
Contributor

Platform: Android
App version: 0.14.0 (20200205205612)
File: StatusIM-200205-205455-290d14-pr-universal.apk

@churik
Copy link
Member

churik commented Feb 24, 2020

@hesterbruikman try https://status-im-prs.ams3.digitaloceanspaces.com/StatusIm-200214-073916-bbb549-pr-universal.apk - this is last one which I tested

@hesterbruikman
Copy link
Contributor

Works! Thanks for checking. Sorry I must have scrolled to the wrong date build on mobile 😬

@tbenr tbenr deleted the read-only-address-QR-code branch February 24, 2020 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants