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

[#10105] Add set max to Send transaction #10877

Merged
merged 1 commit into from
Jul 2, 2020
Merged

Conversation

flexsurfer
Copy link
Member

fixes #10105

Also added fiat value

@flexsurfer flexsurfer requested a review from a team as a code owner June 25, 2020 13:20
@flexsurfer flexsurfer self-assigned this Jun 25, 2020
@status-im-auto
Copy link
Member

status-im-auto commented Jun 25, 2020

Jenkins Builds

Click to see older builds (12)
Commit #️⃣ Finished (UTC) Duration Platform Result
ade084e #1 2020-06-25 13:36:00 ~15 min ios 📄log
ade084e #1 2020-06-25 13:36:20 ~15 min android-e2e 📄log
ade084e #1 2020-06-25 13:36:41 ~15 min android 📄log
✔️ cceddbb #2 2020-06-25 14:37:53 ~10 min android 📦apk 📲
✔️ cceddbb #2 2020-06-25 14:41:14 ~14 min ios 📦ipa 📲
✔️ cceddbb #2 2020-06-25 14:45:12 ~18 min android-e2e 📦apk 📲
✔️ 62871f0 #3 2020-06-26 10:20:43 ~13 min ios 📦ipa 📲
✔️ 62871f0 #3 2020-06-26 10:21:07 ~14 min android 📦apk 📲
✔️ 62871f0 #3 2020-06-26 10:21:11 ~14 min android-e2e 📦apk 📲
✔️ 4b40b4c #4 2020-06-29 09:15:12 ~13 min ios 📦ipa 📲
✔️ 4b40b4c #4 2020-06-29 09:16:29 ~14 min android 📦apk 📲
✔️ 4b40b4c #4 2020-06-29 09:16:42 ~15 min android-e2e 📦apk 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 8be3c75 #5 2020-07-01 10:29:16 ~12 min android-e2e 📦apk 📲
8be3c75 #5 2020-07-02 04:08:42 ~17 sec android 📄log
8be3c75 #5 2020-07-02 04:32:42 ~16 sec ios 📄log
✔️ c7712eb #6 2020-07-02 09:38:58 ~15 min android-e2e 📦apk 📲
✔️ c7712eb #6 2020-07-02 09:39:23 ~16 min android 📦apk 📲
✔️ c7712eb #6 2020-07-02 09:43:31 ~20 min ios 📦ipa 📲

@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 94
Failed tests: 1
Passed tests: 93

Failed tests (1)

Click to expand
1. test_keycard_send_transaction_from_daap

Device 1: AssetText is 3287000
Device 1: Waiting 300 seconds for STT to update

Device 1: Balance is not changed during 300 seconds!

Device sessions

Passed tests (93)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_can_see_all_transactions_in_history
Device sessions

4. test_install_pack_and_send_sticker
Device sessions

5. test_login_with_new_account
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_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 (TestRail link is not found)
Device sessions

16. test_user_can_switch_network
Device sessions

17. test_mobile_data_usage_popup_continue_syncing
Device sessions

18. test_home_view
Device sessions

19. test_open_google_com_via_open_dapp
Device sessions

20. test_share_contact_code_and_wallet_address
Device sessions

21. test_connection_is_secure
Device sessions

22. test_add_to_contacts
Device sessions

23. test_add_account_to_multiaccount_instance_private_key
Device sessions

24. test_refresh_button_browsing_app_webview
Device sessions

25. test_keycard_send_two_transactions_one_after_another_in_dapp
Device sessions

26. test_can_add_existing_ens
Device sessions

27. test_transaction_wrong_password_wallet
Device sessions

28. test_public_chat_messaging
Device sessions

29. test_unread_messages_counter_public_chat
Device sessions

30. test_keycard_send_eth_from_wallet_to_address
Device sessions

31. test_keycard_fetching_balance_after_offline
Device sessions

32. test_text_message_1_1_chat
Device sessions

33. test_can_use_purchased_stickers_on_recovered_account
Device sessions

34. test_open_transaction_on_etherscan
Device sessions

35. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

36. test_contact_profile_view
Device sessions

37. test_offline_add_new_group_chat_member
Device sessions

38. test_logcat_backup_recovery_phrase
Device sessions

39. test_start_chat_with_ens
Device sessions

40. test_add_and_remove_contact_from_public_chat
Device sessions

41. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

42. test_open_blocked_site
Device sessions

43. test_open_chat_by_pasting_public_key
Device sessions

44. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

45. test_keycard_sign_message_from_daap
Device sessions

46. test_send_non_english_message_to_newly_added_contact
Device sessions

47. test_ens_username_recipient
Device sessions

48. test_fetch_more_history_in_empty_chat
Device sessions

49. test_open_public_chat_using_deep_link
Device sessions

50. test_switch_users_and_add_new_account
Device sessions

51. test_add_account_to_multiaccount_instance_generate_new
Device sessions

52. test_copy_contact_code_and_wallet_address
Device sessions

53. test_send_transaction_from_daap
Device sessions

54. test_send_two_transactions_one_after_another_in_dapp
Device sessions

55. test_image_in_one_to_one_send_save_reply
Device sessions

56. test_add_new_keycard_account_and_login
Device sessions

57. test_long_press_delete_clear_all_dapps
Device sessions

58. test_copy_and_paste_messages
Device sessions

59. test_back_forward_buttons_browsing_website
Device sessions

60. test_password_in_logcat_creating_account
Device sessions

61. test_sign_message_from_daap
Device sessions

62. test_dapps_permissions
Device sessions

63. test_request_public_key_status_test_daap
Device sessions

64. test_long_press_to_delete_chat
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_send_transaction_with_custom_token
Device sessions

69. test_send_eth_in_1_1_chat
Device sessions

70. test_send_two_transactions_in_batch_in_dapp
Device sessions

71. test_ens_in_public_and_1_1_chats
Device sessions

72. test_block_user_from_public_chat
Device sessions

73. test_fetching_balance_after_offline
Device sessions

74. test_offline_status
Device sessions

75. test_wallet_set_up
Device sessions

76. test_manage_assets
Device sessions

77. test_offline_messaging_1_1_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_keycard_can_see_all_transactions_in_history
Device sessions

83. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

84. test_send_emoji
Device sessions

85. test_filters_from_daap
Device sessions

86. test_redirect_to_public_chat_tapping_tag_message
Device sessions

87. test_restore_account_from_mnemonic_to_keycard
Device sessions

88. test_send_eth_to_ens_in_chat
Device sessions

89. test_send_eth_from_wallet_to_address
Device sessions

90. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

91. test_messaging_in_different_networks
Device sessions

92. test_collectible_from_wallet_opens_in_browser_view
Device sessions

93. test_insufficient_funds_wallet_positive_balance
Device sessions

{:on-press
#(when token
(re-frame/dispatch [:wallet.send/set-max-amount token]))}
[react/view {:height 35 :border-radius 40 :background-color colors/blue-light
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks unreadable to me, do you mind to add comas here or keep one pair per line?

Copy link
Member Author

Choose a reason for hiding this comment

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

done

@Serhy
Copy link
Contributor

Serhy commented Jun 26, 2020

Tested with iOS13, Android8, Android 9 3rd build (62871f0)

  1. On iOS there is a comma decimal separator. When asset is not integer, - fiat value is NaN. It's NaN also when amount is invalid input (like 1.234.56). Not sure what is better to display as fiat value when invalid input entered. @errorists?
  2. In the 1-1 chat -> Send TX there is no Set max option (but fiat value is present ok)
    For above two screenshot:

Screenshot 2020-06-26 at 14 37 53

  1. I guess we may add fiat value in Request TX option in 1-1 chat too. No fiat value at the moment there.

@flexsurfer
Copy link
Member Author

thanks @Serhy
2. it's intentional because when we set max we decrease on fee, so it doesn't make sense if you send in chat because you need to request address, and later fee will be different
3. yes we can

@flexsurfer
Copy link
Member Author

actually this set max is tricky for eth, if you set max and then change fee, it won't be max anymore

@errorists
Copy link
Contributor

How do I get the NaN again? I couldn't seem to replicate it, anyway that shouldn't be displayed under any circumstances, should be a 0.0
wrt to max and network fees, imo it's okay, it's just if after the change in fee, the total value is greater than available amount we need to crap out with an error and disable proceeding to next step.

@Serhy
Copy link
Contributor

Serhy commented Jun 26, 2020

actually this set max is tricky for eth, if you set max and then change fee, it won't be max anymore

The way Trust Wallet works is: Set Max = sets all available ETH -> Next -> and on the next screen it becomes (Max - Fee). Further changes of fee deducts/increases this Max value thus making an ability to send everything.

If I'm correct we have a fixate ETH amount on the Sending... ...... ETH screen after specifying Asset-From-To on previous screen.

@flexsurfer
Copy link
Member Author

thanks @Serhy 2 and 3 fixed

@oskarth
Copy link
Contributor

oskarth commented Jul 1, 2020

Small request - could you please rebase to latest master so this commit b5fda12 gets included? This means we aren't running E2E tests on eth.prod cluster anymore, and since this happens on every push, the impact is quite big. This ensures we have more accurate metrics going forward from Jul 1 onward, which would be awesome. See https://discuss.status.im/t/user-growth-and-retention/1782 for more

@Serhy
Copy link
Contributor

Serhy commented Jul 1, 2020

Tested on iOS13, Android8.1, Android 9 - all above issues fixed, can set max value for ETH/token.

@flexsurfer I just noticed the currency in newly introduced fiat value always set to $ disregard the fiat currency what is set when sending transaction.
Screenshot 2020-07-01 at 17 41 42

@flexsurfer
Copy link
Member Author

@Serhy fixed, hided it for all cases

@status-im-auto
Copy link
Member

99% of end-end tests have passed

Total executed tests: 94
Failed tests: 1
Passed tests: 93

Failed tests (1)

Click to expand
1. test_send_eth_in_1_1_chat

Device 1: TimeStampText is 10:23 AM
Device 2: Wait for ChatElementByText

'TestCommandsMultipleDevices' object has no attribute 'driver'

Device sessions

Passed tests (93)

Click to expand
1. test_decline_transactions_in_1_1_chat
Device sessions

2. test_delete_chats_via_delete_button
Device sessions

3. test_can_see_all_transactions_in_history
Device sessions

4. test_install_pack_and_send_sticker
Device sessions

5. test_login_with_new_account
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_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 (TestRail link is not found)
Device sessions

16. test_user_can_switch_network
Device sessions

17. test_mobile_data_usage_popup_continue_syncing
Device sessions

18. test_home_view
Device sessions

19. test_open_google_com_via_open_dapp
Device sessions

20. test_share_contact_code_and_wallet_address
Device sessions

21. test_connection_is_secure
Device sessions

22. test_add_to_contacts
Device sessions

23. test_add_account_to_multiaccount_instance_private_key
Device sessions

24. test_refresh_button_browsing_app_webview
Device sessions

25. test_keycard_send_two_transactions_one_after_another_in_dapp
Device sessions

26. test_can_add_existing_ens
Device sessions

27. test_transaction_wrong_password_wallet
Device sessions

28. test_public_chat_messaging
Device sessions

29. test_unread_messages_counter_public_chat
Device sessions

30. test_keycard_send_eth_from_wallet_to_address
Device sessions

31. test_keycard_fetching_balance_after_offline
Device sessions

32. test_keycard_send_transaction_from_daap
Device sessions

33. test_text_message_1_1_chat
Device sessions

34. test_can_use_purchased_stickers_on_recovered_account
Device sessions

35. test_open_transaction_on_etherscan
Device sessions

36. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

37. test_contact_profile_view
Device sessions

38. test_offline_add_new_group_chat_member
Device sessions

39. test_logcat_backup_recovery_phrase
Device sessions

40. test_start_chat_with_ens
Device sessions

41. test_add_and_remove_contact_from_public_chat
Device sessions

42. test_add_account_to_multiaccount_instance_seed_phrase
Device sessions

43. test_open_blocked_site
Device sessions

44. test_open_chat_by_pasting_public_key
Device sessions

45. test_pair_devices_sync_one_to_one_contacts_public_chat
Device sessions

46. test_keycard_sign_message_from_daap
Device sessions

47. test_send_non_english_message_to_newly_added_contact
Device sessions

48. test_ens_username_recipient
Device sessions

49. test_fetch_more_history_in_empty_chat
Device sessions

50. test_open_public_chat_using_deep_link
Device sessions

51. test_switch_users_and_add_new_account
Device sessions

52. test_add_account_to_multiaccount_instance_generate_new
Device sessions

53. test_copy_contact_code_and_wallet_address
Device sessions

54. test_send_transaction_from_daap
Device sessions

55. test_send_two_transactions_one_after_another_in_dapp
Device sessions

56. test_image_in_one_to_one_send_save_reply
Device sessions

57. test_add_new_keycard_account_and_login
Device sessions

58. test_long_press_delete_clear_all_dapps
Device sessions

59. test_copy_and_paste_messages
Device sessions

60. test_back_forward_buttons_browsing_website
Device sessions

61. test_password_in_logcat_creating_account
Device sessions

62. test_sign_message_from_daap
Device sessions

63. test_dapps_permissions
Device sessions

64. test_request_public_key_status_test_daap
Device sessions

65. test_long_press_to_delete_chat
Device sessions

66. test_log_level_and_fleet
Device sessions

67. test_add_and_delete_watch_only_account_to_multiaccount_instance
Device sessions

68. test_recover_account_from_new_user_seedphrase
Device sessions

69. test_send_transaction_with_custom_token
Device sessions

70. test_send_two_transactions_in_batch_in_dapp
Device sessions

71. test_ens_in_public_and_1_1_chats
Device sessions

72. test_block_user_from_public_chat
Device sessions

73. test_fetching_balance_after_offline
Device sessions

74. test_offline_status
Device sessions

75. test_wallet_set_up
Device sessions

76. test_manage_assets
Device sessions

77. test_offline_messaging_1_1_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_keycard_can_see_all_transactions_in_history
Device sessions

83. test_keycard_send_two_transactions_in_batch_in_dapp
Device sessions

84. test_send_emoji
Device sessions

85. test_filters_from_daap
Device sessions

86. test_redirect_to_public_chat_tapping_tag_message
Device sessions

87. test_restore_account_from_mnemonic_to_keycard
Device sessions

88. test_send_eth_to_ens_in_chat
Device sessions

89. test_send_eth_from_wallet_to_address
Device sessions

90. test_request_and_receive_stt_in_1_1_chat_offline
Device sessions

91. test_messaging_in_different_networks
Device sessions

92. test_collectible_from_wallet_opens_in_browser_view
Device sessions

93. test_insufficient_funds_wallet_positive_balance
Device sessions

@Serhy
Copy link
Contributor

Serhy commented Jul 2, 2020

Looks good now! Meaningful currency code everywhere.
E2e test will be fixed separately (not this PR issue)

Signed-off-by: andrey <motor4ik@gmail.com>
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.

Add set max to Send transaction
6 participants