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

Send transaction GUI #9499

Merged
merged 1 commit into from
Nov 27, 2019
Merged

Send transaction GUI #9499

merged 1 commit into from
Nov 27, 2019

Conversation

flexsurfer
Copy link
Member

@flexsurfer flexsurfer commented Nov 20, 2019

DEMO: https://www.youtube.com/watch?v=7nyXYO18JNg

also
fixes #9381
fixes #9210

FOR QA: sending tx from the chat is not in the scope of this PR, please text only sending from the wallet

@flexsurfer flexsurfer requested a review from yenda November 20, 2019 10:13
@flexsurfer flexsurfer requested a review from a team as a code owner November 20, 2019 10:13
@flexsurfer flexsurfer self-assigned this Nov 20, 2019
@ghost
Copy link

ghost commented Nov 20, 2019

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

@flexsurfer flexsurfer removed the request for review from a team November 20, 2019 10:16
@status-im-auto
Copy link
Member

status-im-auto commented Nov 20, 2019

Jenkins Builds

Click to see older builds (39)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 1edbe69 #1 2019-11-20 10:23:12 ~9 min ios 📦ipa 📲
✔️ 1edbe69 #1 2019-11-20 10:25:59 ~12 min android 📦apk 📲
✔️ 1edbe69 #1 2019-11-20 10:26:02 ~12 min android-e2e 📦apk 📲
✔️ 36ec0bd #2 2019-11-20 10:34:24 ~8 min ios 📦ipa 📲
✔️ 36ec0bd #2 2019-11-20 10:37:05 ~11 min android-e2e 📦apk 📲
✔️ 36ec0bd #2 2019-11-20 10:38:49 ~12 min macos 📦dmg
✔️ 36ec0bd #2 2019-11-20 10:39:39 ~13 min windows 📦exe
✔️ 36ec0bd #2 2019-11-20 10:39:47 ~13 min android 📦apk 📲
✔️ 36ec0bd #2 2019-11-20 10:39:57 ~13 min linux 📦App
✔️ 1f1ceda #3 2019-11-21 15:46:01 ~9 min ios 📦ipa 📲
✔️ 1f1ceda #3 2019-11-21 15:49:14 ~12 min windows 📦exe
✔️ 1f1ceda #3 2019-11-21 15:50:17 ~13 min android-e2e 📦apk 📲
✔️ 1f1ceda #3 2019-11-21 15:50:19 ~13 min android 📦apk 📲
✔️ 1f1ceda #3 2019-11-21 15:50:27 ~13 min macos 📦dmg
✔️ 1f1ceda #3 2019-11-21 15:51:18 ~14 min linux 📦App
✔️ 35521c8 #4 2019-11-22 11:24:24 ~9 min ios 📦ipa 📲
✔️ 35521c8 #4 2019-11-22 11:28:58 ~14 min android-e2e 📦apk 📲
✔️ 35521c8 #4 2019-11-22 11:28:59 ~14 min android 📦apk 📲
✔️ 35521c8 #4 2019-11-22 11:29:00 ~13 min macos 📦dmg
✔️ 35521c8 #4 2019-11-22 11:29:10 ~14 min linux 📦App
✔️ 35521c8 #4 2019-11-22 11:29:43 ~14 min windows 📦exe
✔️ 3e5ce83 #5 2019-11-22 14:46:40 ~9 min ios 📦ipa 📲
✔️ 3e5ce83 #5 2019-11-22 14:50:06 ~12 min linux 📦App
✔️ 3e5ce83 #5 2019-11-22 14:51:06 ~13 min android-e2e 📦apk 📲
✔️ 3e5ce83 #5 2019-11-22 14:51:06 ~13 min android 📦apk 📲
✔️ 3e5ce83 #5 2019-11-22 14:51:35 ~14 min macos 📦dmg
✔️ 3e5ce83 #5 2019-11-22 14:55:49 ~18 min windows 📦exe
✔️ 27e4dac #6 2019-11-22 18:07:22 ~11 min ios 📦ipa 📲
✔️ 27e4dac #6 2019-11-22 18:08:55 ~12 min linux 📦App
✔️ 27e4dac #6 2019-11-22 18:09:30 ~13 min android-e2e 📦apk 📲
✔️ 27e4dac #6 2019-11-22 18:09:34 ~13 min android 📦apk 📲
✔️ 27e4dac #6 2019-11-22 18:10:24 ~14 min macos 📦dmg
✔️ 27e4dac #6 2019-11-22 18:13:28 ~17 min windows 📦exe
✔️ 56f1992 #7 2019-11-25 15:36:43 ~9 min ios 📦ipa 📲
✔️ 56f1992 #7 2019-11-25 15:41:07 ~13 min android 📦apk 📲
✔️ 56f1992 #7 2019-11-25 15:41:13 ~13 min android-e2e 📦apk 📲
✔️ 56f1992 #7 2019-11-25 15:41:53 ~14 min macos 📦dmg
✔️ 56f1992 #7 2019-11-25 15:49:44 ~22 min linux 📦App
✔️ 56f1992 #7 2019-11-25 15:49:56 ~22 min windows 📦exe
Commit #️⃣ Finished (UTC) Duration Platform Result
9ab9842 #8 2019-11-26 10:48:24 ~4 min ios 📄log
✔️ 9ab9842 #8 2019-11-26 11:00:32 ~16 min android-e2e 📦apk 📲
✔️ 9ab9842 #8 2019-11-26 11:05:53 ~21 min android 📦apk 📲
9ab9842 #9 2019-11-26 11:16:28 ~3 min ios 📄log
ecb0f32 #10 2019-11-26 14:30:28 ~4 min ios 📄log
✔️ ecb0f32 #9 2019-11-26 14:39:23 ~13 min android-e2e 📦apk 📲
✔️ ecb0f32 #9 2019-11-26 14:47:39 ~21 min android 📦apk 📲
✔️ ecb0f32 #11 2019-11-27 11:12:32 ~8 min ios 📦ipa 📲

@flexsurfer flexsurfer force-pushed the feature/send-transaction branch from 36ec0bd to 1f1ceda Compare November 21, 2019 15:36
@flexsurfer flexsurfer requested review from a team and removed request for yenda and a team November 21, 2019 15:36
@@ -81,6 +81,7 @@
(navigation/navigate-to-cofx (assoc-in cofx [:db :contacts/identity] public-key) :profile nil))))

(fx/defn handle-eip681 [cofx url]
;;TODO !!!!!!!!
Copy link
Contributor

Choose a reason for hiding this comment

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

what needs to be done?

Copy link
Member Author

Choose a reason for hiding this comment

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

not ready for review

{:permissions [:camera]
:on-allowed
#(do
(re-frame/dispatch [:bottom-sheet/hide-sheet])
Copy link
Contributor

Choose a reason for hiding this comment

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

is code that got moved? could you create an event to avoid the triple dispatch?

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix to one event

(for [item [{:title (i18n/label :t/accounts)
:icon :main-icons/profile
:theme :action
:on-press #(do
Copy link
Contributor

Choose a reason for hiding this comment

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

is code that got moved? could you create an event to avoid the triple dispatch?

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix to one event

:icon :main-icons/address
:theme :action
:on-press #(do
(re-frame/dispatch [:bottom-sheet/hide-sheet])
Copy link
Contributor

Choose a reason for hiding this comment

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

is code that got moved? could you create an event to avoid the triple dispatch?

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix to one event

[list-item/list-item
{:icon [chat-icon/custom-icon-view-list (:name account) (:color account)]
:title (:name account)
:on-press #(do
Copy link
Contributor

Choose a reason for hiding this comment

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

is code that got moved? could you create an event to avoid the double dispatch?

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix to one event

:key-fn (comp str :symbol)
:render-fn (wallet.accounts/render-asset
(:code currency)
#(do
Copy link
Contributor

Choose a reason for hiding this comment

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

is code that got moved? could you create an event to avoid the double dispatch?

Copy link
Member Author

Choose a reason for hiding this comment

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

will fix to one event

["re-frame: overwriting"
"Warning: componentWillMount is deprecated and will be removed in the next major version. Use componentDidMount instead. As a temporary workaround, you can rename to UNSAFE_componentWillMount."
"Warning: componentWillUpdate is deprecated and will be removed in the next major version. Use componentDidUpdate instead. As a temporary workaround, you can rename to UNSAFE_componentWillUpdate."])
#js ["re-frame: overwriting"
Copy link
Contributor

Choose a reason for hiding this comment

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

what changed?

Copy link
Member Author

Choose a reason for hiding this comment

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

nothing, just fixed formatting

@@ -0,0 +1,44 @@
(ns status-im.ui.screens.chat.extensions.views
Copy link
Contributor

Choose a reason for hiding this comment

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

is it the gui commands selection panel?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

(re-frame/dispatch [:qr-scanner.callback/scan-qr-code-cancel identifier])
(re-frame/dispatch [:navigate-back])))]
[toolbar/content-title title]]])
(defn- viewfinder [size]
Copy link
Contributor

Choose a reason for hiding this comment

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

what is this component doing?

@flexsurfer
Copy link
Member Author

@yenda PR isn't ready for review yet

@flexsurfer flexsurfer force-pushed the feature/send-transaction branch from 1f1ceda to 35521c8 Compare November 22, 2019 11:14
@flexsurfer flexsurfer changed the title [WIP] send transaction GUI Send transaction GUI Nov 25, 2019
@flexsurfer
Copy link
Member Author

@yenda ready for review

@statustestbot
Copy link

84% of end-end tests have passed

Total executed tests: 93
Failed tests: 15
Passed tests: 78

Failed tests (15)

Click to expand
1. test_clear_history_of_group_chat_via_group_view

Device 1: Scrolling down to UsernameCheckbox
Device 1: Scrolling down to UsernameCheckbox

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

Device sessions

2. test_add_to_contacts

Device 2: Tap on NextButton
Device 2: Wait for LetsGoButton

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

Device sessions

3. test_home_view

Device 1: Looking for an element by text: 'Chat and transact privately with your friends.'
Device 1: Looking for an element by text: 'Your chats will appear here. To start new chats press the ⊕ button'

'Follow your interests in one of the many Public Chats.' text is not shown

Device sessions

4. test_can_use_purchased_stickers_on_recovered_account

Device 1: Tap on ShowStickersButton
Device 1: Tap on GetStickers

Device 1: 'BaseButton' is still visible on the screen after 10 seconds

Device sessions

5. test_logcat_send_transaction_from_wallet

Device 1: Type '0.002516612' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

6. test_send_token_with_7_decimals

Device 1: Type '0.0817081' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

7. test_modify_transaction_fee_values

Device 1: Type '0.0025161238' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

8. test_token_with_more_than_allowed_decimals

Device 1: Tap on BackButton
Device 1: Tap on ReceiveTransactionButton

Warning about too precise amount is not shown when sending a transaction

Device sessions

9. test_send_eth_from_wallet_to_address

Device 1: Type '0.002516526' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

10. test_send_funds_between_accounts_in_multiaccount_instance

Device 1: Type '0.002516828' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

11. test_transaction_wrong_password_wallet

Device 1: Type '0.0025161257' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

12. test_switch_users_and_add_new_account

Device 1: Wait for ContinueButton
Device 1: Wait for OkButton

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

Device sessions

13. test_send_stt_from_wallet

Device 1: Type '0.0025161327' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

14. test_insufficient_funds_wallet_positive_balance

Device 1: Tap on STTAssetButton
Device 1: Type '1976' to AmountEditBox

'Insufficient funds' error is now shown when sending 5 ETH from wallet with balance 3.9264139776144 'Insufficient funds' error is now shown when sending 1976 STT from wallet with balance 1974.8625645755

Device sessions

15. test_fetching_balance_after_offline

Device 1: Type '0.0025161331' to AmountEditBox
Device 1: Tap 'Confirm' on native keyboard

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

Device sessions

Passed tests (78)

Click to expand
1. test_user_can_switch_network
Device sessions

2. test_block_user_from_public_chat
Device sessions

3. test_filters_from_daap
Device sessions

4. test_copy_and_paste_messages
Device sessions

5. test_send_transaction_from_daap
Device sessions

6. test_onboarding_screen_when_requesting_tokens_for_recovered_account
Device sessions

7. test_connection_is_secure
Device sessions

8. test_deploy_contract_from_daap
Device sessions

9. test_redirect_to_public_chat_tapping_tag_message
Device sessions

10. test_remove_member_from_group_chat
Device sessions

11. test_delete_one_to_one_chat_via_delete_button
Device sessions

12. test_mobile_data_usage_popup_continue_syncing
Device sessions

13. test_decline_invitation_to_group_chat
Device sessions

14. test_pass_phrase_validation
Device sessions

15. test_open_blocked_site
Device sessions

16. test_public_chat_messaging
Device sessions

17. test_open_chat_by_pasting_public_key
Device sessions

18. test_long_press_to_delete_1_1_chat
Device sessions

19. test_password_in_logcat_sign_in
Device sessions

20. test_set_profile_picture
Device sessions

21. test_text_message_1_1_chat
Device sessions

22. test_sign_typed_message
Device sessions

23. test_send_and_open_links
Device sessions

24. test_unread_messages_counter_1_1_chat
Device sessions

25. test_logcat_send_transaction_from_daap
Device sessions

26. test_copy_contact_code_and_wallet_address
Device sessions

27. test_send_message_in_group_chat
Device sessions

28. test_always_allow_web3_permissions
Device sessions

29. test_can_open_dapp_from_dapp_store
Device sessions

30. test_recover_account_from_new_user_seedphrase
Device sessions

31. test_account_recovery_with_uppercase_recovery_phrase
Device sessions

32. test_offline_messaging_1_1_chat
Device sessions

33. test_fetch_more_history_in_empty_chat
Device sessions

34. test_delete_group_chat_via_delete_button
Device sessions

35. test_contact_profile_view
Device sessions

36. test_create_new_group_chat
Device sessions

37. test_long_press_to_delete_public_chat
Device sessions

38. test_send_emoji
Device sessions

39. test_search_chat_on_home
Device sessions

40. test_logcat_recovering_account
Device sessions

41. test_mobile_data_usage_popup_stop_syncing
Device sessions

42. test_can_add_existing_ens
Device sessions

43. test_pair_devices_sync_name_photo_public_group_chats
Device sessions

44. test_install_pack_and_send_sticker
Device sessions

45. test_pair_devices_sync_one_to_one_contacts
Device sessions

46. test_delete_public_chat_via_delete_button
Device sessions

47. test_messaging_in_different_networks
Device sessions

48. test_logcat_backup_recovery_phrase
Device sessions

49. test_add_new_group_chat_member
Device sessions

50. test_logcat_sign_message_from_daap
Device sessions

51. test_mobile_data_usage_settings
Device sessions

52. test_make_admin_member_of_group_chat
Device sessions

53. test_long_press_delete_clear_all_dapps
Device sessions

54. test_login_with_new_account
Device sessions

55. test_request_public_key_status_test_daap
Device sessions

56. test_start_chat_with_ens
Device sessions

57. test_add_contact_from_public_chat
Device sessions

58. test_send_two_transactions_one_after_another_in_dapp
Device sessions

59. test_send_message_to_newly_added_contact
Device sessions

60. test_password_in_logcat_creating_account
Device sessions

61. test_dapps_permissions
Device sessions

62. test_user_can_complete_tx_to_dapp_when_onboarding_via_dapp_completed
Device sessions

63. test_ens_in_public_and_1_1_chats
Device sessions

64. test_public_chat_clear_history
Device sessions

65. test_offline_status
Device sessions

66. test_open_google_com_via_open_dapp
Device sessions

67. test_unread_messages_counter_public_chat
Device sessions

68. test_sign_message_from_daap
Device sessions

69. test_user_can_remove_profile_picture
Device sessions

70. test_send_two_transactions_in_batch_in_dapp
Device sessions

71. test_share_contact_code_and_wallet_address
Device sessions

72. test_message_marked_as_sent_in_1_1_chat
Device sessions

73. test_need_help_section
Device sessions

74. test_refresh_button_browsing_app_webview
Device sessions

75. test_log_level_and_fleet
Device sessions

76. test_group_chat_system_messages
Device sessions

77. test_can_see_all_transactions_in_history
Device sessions

78. test_open_public_chat_using_deep_link
Device sessions

@flexsurfer flexsurfer force-pushed the feature/send-transaction branch from 56f1992 to 9ab9842 Compare November 26, 2019 10:43
@Serhy Serhy self-assigned this Nov 26, 2019
@Serhy
Copy link
Contributor

Serhy commented Nov 26, 2019

@flexsurfer, I can't send transaction from any network besides Mainnet.
Tested with POA mainnet network and Ropsten, - app crashes whenever I tap Send button with valid data in inputs
(It's Ok with custom token from Mainnet)

  1. Open Status and recover account with assets in any network but Mainnet (e.g. Ropsten)
  2. Switch account network to Ropsten network
  3. Navigate to Wallet -> Status account -> Send
  4. Select Asset with > 0 amount and specify amount. `
  5. Chose recipient -> Accounts -> Status account`
  6. Tap Send button
    Expected result: Sending... bottom sheet opens
    Actual result:

Screenshot 2019-11-26 at 15 19 02

@flexsurfer flexsurfer force-pushed the feature/send-transaction branch from 9ab9842 to ecb0f32 Compare November 26, 2019 14:26
@flexsurfer
Copy link
Member Author

thanks @Serhy , fixed ,also added network name

@churik
Copy link
Member

churik commented Nov 27, 2019

Tested on Xiaomi Mi Note 9 Pro:

  • sending transaction to different senders in tokens and ETH
  • choose recipient options
  • scanning QR with EIP681 URIs
  • general nivigation, canceling

Looks good to me.

Copy link
Contributor

@yenda yenda left a comment

Choose a reason for hiding this comment

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

Good for me too thanks Andrey! I think it is better to merge now if it works, I will have to do some changes anyway for the full integration of the send/receive commands

Signed-off-by: Andrey Shovkoplyas <[email protected]>
@flexsurfer flexsurfer force-pushed the feature/send-transaction branch from ecb0f32 to 507cc5c Compare November 27, 2019 13:32
@flexsurfer flexsurfer merged commit 507cc5c into develop Nov 27, 2019
@delete-merged-branch delete-merged-branch bot deleted the feature/send-transaction branch November 27, 2019 13:32
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
7 participants