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

qr testing mode, fixed qr pure address and EIP681 issues #10280

Merged
merged 1 commit into from
Apr 14, 2020

Conversation

flexsurfer
Copy link
Member

@flexsurfer flexsurfer commented Apr 6, 2020

fixes #10107
fixes #10093
fixes #9183
fixes #8150
fixes #9580
fixes #9872

removed chain usage for tokens

For local and e2e builds, qr scan testing mode implemented, so now we can add e2e for qr codes

Tested with this generator https://brunobar79.github.io/eip681-link-generator/#

FOR QA: all tokens related functionality should be tested, also QR codes , especially value

@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-github-bot status-github-bot bot added this to REVIEW in Pipeline for QA Apr 6, 2020
(js/parseInt chain-id)
(ethereum/chain-keyword->chain-id :mainnet))}
arguments)))))))))))
(if (ethereum/address? s)
Copy link
Member Author

Choose a reason for hiding this comment

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

only this one small change in this function, added address condition for pure addreses

@status-im-auto
Copy link
Member

status-im-auto commented Apr 6, 2020

Jenkins Builds

Click to see older builds (10)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 95b779a #1 2020-04-06 13:08:05 ~9 min ios 📦ipa 📲
✔️ 95b779a #1 2020-04-06 13:15:51 ~17 min android-e2e 📦apk 📲
✔️ 95b779a #1 2020-04-06 13:16:00 ~17 min android 📦apk 📲
✔️ 95b779a #2 2020-04-10 11:00:10 ~8 min ios 📦ipa 📲
f69b54c #3 2020-04-13 14:51:22 ~8 min ios 📄log
f69b54c #2 2020-04-13 14:54:29 ~11 min android-e2e 📄log
f69b54c #2 2020-04-13 14:55:02 ~12 min android 📄log
✔️ 882ddac #4 2020-04-13 15:18:04 ~9 min ios 📦ipa 📲
✔️ 882ddac #3 2020-04-13 15:20:00 ~11 min android-e2e 📦apk 📲
✔️ 882ddac #3 2020-04-13 15:21:21 ~12 min android 📦apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f2b6ee3 #5 2020-04-14 09:50:38 ~8 min ios 📦ipa 📲
✔️ f2b6ee3 #4 2020-04-14 09:52:54 ~11 min android-e2e 📦apk 📲
✔️ f2b6ee3 #4 2020-04-14 09:54:30 ~12 min android 📦apk 📲
✔️ 45dae49 #5 2020-04-14 10:04:31 ~11 min android-e2e 📦apk 📲

@flexsurfer flexsurfer moved this from REVIEW to E2E Tests in Pipeline for QA Apr 7, 2020
@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 97
Failed tests: 1
Passed tests: 96

Failed tests (1)

Click to expand
1. test_request_and_receive_stt_in_1_1_chat_offline

Device 2: Tap on HomeButton
Device 2: Wait for PlusButton

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

Device sessions

Passed tests (96)

Click to expand
1. test_request_public_key_status_test_daap
Device sessions

2. test_open_public_chat_using_deep_link
Device sessions

3. test_decline_invitation_to_group_chat
Device sessions

4. test_ens_username_recipient
Device sessions

5. test_offline_status
Device sessions

6. test_open_transaction_on_etherscan
Device sessions

7. test_open_chat_by_pasting_public_key
Device sessions

8. test_back_forward_buttons_browsing_website
Device sessions

9. test_password_in_logcat_creating_account
Device sessions

10. test_can_use_purchased_stickers_on_recovered_account
Device sessions

11. test_modify_transaction_fee_values
Device sessions

12. test_insufficient_funds_wallet_positive_balance
Device sessions

13. test_mobile_data_usage_settings
Device sessions

14. test_delete_group_chat_via_delete_button
Device sessions

15. test_open_google_com_via_open_dapp
Device sessions

16. test_logcat_backup_recovery_phrase
Device sessions

17. test_unread_messages_counter_public_chat
Device sessions

18. test_send_two_transactions_one_after_another_in_dapp
Device sessions

19. test_message_marked_as_sent_in_1_1_chat
Device sessions

20. test_user_can_switch_network
Device sessions

21. test_public_chat_clear_history (TestRail link is not found)
Device sessions

22. test_wallet_set_up
Device sessions

23. test_timestamp_in_chats
Device sessions

24. test_delete_chats_via_delete_button
Device sessions

25. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

26. test_group_chat_system_messages
Device sessions

27. test_fetch_more_history_in_empty_chat
Device sessions

28. test_mobile_data_usage_popup_continue_syncing
Device sessions

29. test_add_to_contacts
Device sessions

30. test_dapps_permissions
Device sessions

31. test_long_press_delete_clear_all_dapps
Device sessions

32. test_need_help_section
Device sessions

33. test_transaction_wrong_password_wallet
Device sessions

34. test_offline_messaging_1_1_chat
Device sessions

35. test_token_with_more_than_allowed_decimals
Device sessions

36. test_add_account_to_multiaccount_instance_private_key
Device sessions

37. test_text_message_1_1_chat
Device sessions

38. test_install_pack_and_send_sticker
Device sessions

39. test_send_eth_in_1_1_chat
Device sessions

40. test_make_admin_member_of_group_chat
Device sessions

41. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

42. test_send_emoji
Device sessions

43. test_copy_and_paste_messages
Device sessions

44. test_clear_history_of_group_chat_via_group_view
Device sessions

45. test_add_account_to_multiaccount_instance_generate_new
Device sessions

46. test_send_eth_from_wallet_to_address
Device sessions

47. test_messaging_in_different_networks
Device sessions

48. test_start_chat_with_ens
Device sessions

49. test_logcat_recovering_account
Device sessions

50. test_connection_is_secure
Device sessions

51. test_send_eth_to_ens
Device sessions

52. test_user_can_see_all_own_assets_after_account_recovering
Device sessions

53. test_add_new_group_chat_member
Device sessions

54. test_long_press_to_delete_chat
Device sessions

55. test_add_and_remove_contact_from_public_chat
Device sessions

56. test_send_transaction_from_daap
Device sessions

57. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

58. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

59. test_open_blocked_site
Device sessions

60. test_refresh_button_browsing_app_webview
Device sessions

61. test_pass_phrase_validation
Device sessions

62. test_send_token_with_7_decimals
Device sessions

63. test_sign_message_from_daap
Device sessions

64. test_send_message_in_group_chat
Device sessions

65. test_deploy_contract_from_daap
Device sessions

66. test_recover_account_from_new_user_seedphrase (TestRail link is not found)
Device sessions

67. test_add_new_keycard_account
Device sessions

68. test_add_custom_token
Device sessions

69. test_decline_transactions_in_1_1_chat
Device sessions

70. test_send_and_open_links
Device sessions

71. test_manage_assets
Device sessions

72. test_share_contact_code_and_wallet_address
Device sessions

73. test_redirect_to_public_chat_tapping_tag_message
Device sessions

74. test_block_user_from_public_chat
Device sessions

75. test_ens_in_public_and_1_1_chats
Device sessions

76. test_sign_typed_message
Device sessions

77. test_create_new_group_chat
Device sessions

78. test_password_in_logcat_sign_in
Device sessions

79. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

80. test_send_message_to_newly_added_contact
Device sessions

81. test_logcat_sign_message_from_daap
Device sessions

82. test_mobile_data_usage_popup_stop_syncing
Device sessions

83. test_collectible_from_wallet_opens_in_browser_view
Device sessions

84. test_logcat_send_transaction_from_daap
Device sessions

85. test_contact_profile_view
Device sessions

86. test_switch_users_and_add_new_account
Device sessions

87. test_logcat_send_transaction_from_wallet
Device sessions

88. test_filters_from_daap
Device sessions

89. test_send_stt_from_wallet
Device sessions

90. test_login_with_new_account
Device sessions

91. test_home_view
Device sessions

92. test_log_level_and_fleet
Device sessions

93. test_can_add_existing_ens
Device sessions

94. test_copy_contact_code_and_wallet_address
Device sessions

95. test_fetching_balance_after_offline
Device sessions

96. test_can_see_all_transactions_in_history
Device sessions

@jakubgs
Copy link
Member

jakubgs commented Apr 8, 2020

I just tested the QR code and it's using just the chat key, not the full URL including join.status.im.

Are we sure we want to do it that way? With that the QR code is useless for anyone that doesn't have Status installed, and if it was a full URL it would be usable for anyone.

@jakubgs
Copy link
Member

jakubgs commented Apr 8, 2020

Could you also take a look at #10306 as part of this? Might affect address scanner.

@flexsurfer
Copy link
Member Author

this PR is only for status wallet qr scanner. Chat scanner and mailserver scanner are separate so should be done in separate PRs

@jakubgs
Copy link
Member

jakubgs commented Apr 9, 2020

That makes sense, but does the wallet scanner handle whitespace/newlines fine?

@flexsurfer
Copy link
Member Author

Good question :) i need to take a look

@flexsurfer
Copy link
Member Author

@Serhy @churik any chance ? :)

@churik churik moved this from E2E Tests to TO TEST in Pipeline for QA Apr 10, 2020
@churik churik moved this from TO TEST to IN TESTING in Pipeline for QA Apr 10, 2020
@churik churik self-assigned this Apr 10, 2020
@churik
Copy link
Member

churik commented Apr 10, 2020

@flexsurfer

ISSUE 1: In case of error (i.e. wrong network id in the link) empty bottom sheet is opened

Link: ethereum:0x4470BB87d77b963A013DB939BE332f927f2b992e@5/transfer?address=0xd21DB0e43048AcB94f428eD61dC244c82f1ff2a8&uint256=1e-5

photo_2020-04-10 15 02 02
photo_2020-04-10 15 02 00
Tested on Android.

ISSUE 2: Sometimes after scanning QR-codes from Recipient -> Scan QR app is freezing with opened bottom sheet

Link: ethereum:0x4470BB87d77b963A013DB939BE332f927f2b992e@5/transfer?address=0xd21DB0e43048AcB94f428eD61dC244c82f1ff2a8&uint256=1e-5

Steps to reproduce are scan link from Wallet -> QR code and then from Wallet -> Send Transaction -> Choose recipient -> Scan QR code and repeat until get unresponsive app (in my case 3-4 times)
At ~10 attempts got 2 freezing.

Full logcat with 2 freezing:
logcat.log
Reproducible on IOS and Android

UPD: it does not depend on the place of scanning (Wallet -> QR or Send Transaction -> Recipient -> Scan QR) or link itself - can be reproduced with any link when scanning QR several times. Sometimes it is reproducible from the 1 time.

Testing is in progress.

@churik
Copy link
Member

churik commented Apr 10, 2020

ISSUE 3: gasPrice and gasLimit are still not supported

Link:
ethereum:0xcf2272205cc0cf96Cfbb9Dd740BD681D1E86901E?value=1e17&gasPrice=1000000000&gasLimit=100000

At attempt to scan it and navigate to "Next" custom gas price / gas limit values are set.

ISSUE 4: Links with Ethereum Foundation address are not scannable

Link (from official https://github.com/ethereum/EIPs/blob/master/EIPS/eip-681.md):
ethereum:0xfb6916095ca1df60bb79Ce92ce3ea74c37c5d359?value=2.014e18
Invalid address error at attempt to scan.

ISSUE 5: When scanning QR code with ENS name all parameters except address are ignored

Link (20 SNT to ENS):
ethereum:0x744d70fdbe2ba4cf95131626614a1763df805b9e/transfer?address=tanyatest1.eth&uint256=2e1
On scanning:
photo_2020-04-10 17 38 51

ISSUE 5: ENS name for tokens is not resolved

At attempt to scan link
ethereum:snt.thetoken.eth/transfer?address=0xcf2272205cc0cf96Cfbb9Dd740BD681D1E86901E&uint256=2e1 with ENS name for tokens got Invalid address error

@churik
Copy link
Member

churik commented Apr 13, 2020

Thank you for making possibility for e2e to scan QR!
Works awesome 👍

@flexsurfer
Copy link
Member Author

flexsurfer commented Apr 13, 2020

  • ISSUE 1: In case of error (i.e. wrong network id in the link) empty bottom sheet is opened
  • ISSUE 2: Sometimes after scanning QR-codes from Recipient -> Scan QR app is freezing with opened bottom sheet (isn't reproducible, probably not related to this PR, could be done in separate issue)
  • ISSUE 3: gasPrice and gasLimit are still not supported
  • ISSUE 4: Links with Ethereum Foundation address are not scannable (address isn't valid in the example)
  • ISSUE 5: When scanning QR code with ENS name all parameters except address are ignored (isn't reproducible)
  • ISSUE 5: ENS name for tokens is not resolved (not in the scope of this PR, in separate issue please)

@churik
Copy link
Member

churik commented Apr 14, 2020

also fixes #9872

@churik
Copy link
Member

churik commented Apr 14, 2020

Tested on IOS13 and Android 10:

  • payment URLs
  • URLs with differents amount of tokens and ETH
  • URLs with custom gas settings
  • URLs with ENS for receiver
  • URLs with chain_id
  • error handling of the wrong chain_id, wrong URL, wrong ENS, too precise amount, too big amount, too big gas
  • scanning EIP681 URLs with camera and opening in Status when app is on background and app is closed
  • scanning valid and invalid QR in + > Start new chat
  • scanning QR from To > Enter recipient address - only address is resolved, as expected.

All mentioned issues are resolved, only ENS name for tokens is not resolved (will be added separately).

AWESOME 👍

@churik churik moved this from IN TESTING to MERGE in Pipeline for QA Apr 14, 2020
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
5 participants