Skip to content

allow migration to Keycard keeping the db#12306

Merged
bitgamma merged 1 commit intodevelopfrom
feature/11777
Jul 20, 2021
Merged

allow migration to Keycard keeping the db#12306
bitgamma merged 1 commit intodevelopfrom
feature/11777

Conversation

@bitgamma
Copy link
Member

@bitgamma bitgamma commented Jul 13, 2021

Fixes #11777.
Fixes #11659.

  • Convert the account from regular to Keycard
  • Login automatically immediately after conversion
  • Implement password prompt/verification
  • Add migration success message after the (automatic) login
  • Add error handling
  • Create status-go release (to do right before merging)

@status-im-auto
Copy link
Member

status-im-auto commented Jul 13, 2021

Jenkins Builds

Click to see older builds (25)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ 8b8d81d #1 2021-07-13 14:00:33 ~14 min android 📦apk 📲
✔️ 8b8d81d #1 2021-07-13 14:08:55 ~22 min ios 📦ipa 📲
✔️ 8b8d81d #1 2021-07-13 14:13:43 ~27 min android-e2e 📦apk 📲
✔️ dcbd303 #2 2021-07-14 10:14:26 ~15 min android 📦apk 📲
✔️ dcbd303 #2 2021-07-14 10:16:20 ~17 min android-e2e 📦apk 📲
✔️ dcbd303 #2 2021-07-14 10:22:20 ~23 min ios 📦ipa 📲
✖️ e691d83 #3 2021-07-15 09:20:09 ~11 min android-e2e 📦apk 📲
✖️ e691d83 #3 2021-07-15 09:25:36 ~17 min android 📦apk 📲
✖️ e691d83 #3 2021-07-15 09:29:13 ~20 min ios 📦ipa 📲
✖️ e018321 #4 2021-07-15 12:15:00 ~16 min android-e2e 📦apk 📲
✖️ e018321 #4 2021-07-15 12:16:01 ~17 min android 📦apk 📲
✖️ e018321 #4 2021-07-15 12:20:39 ~22 min ios 📦ipa 📲
✖️ 7439242 #5 2021-07-15 13:34:30 ~13 min android-e2e 📦apk 📲
✖️ 7439242 #5 2021-07-15 13:40:25 ~19 min ios 📦ipa 📲
✖️ 7439242 #5 2021-07-15 13:43:06 ~21 min android 📦apk 📲
✔️ e446abe #6 2021-07-15 13:35:22 ~10 min android-e2e 📦apk 📲
✔️ e446abe #6 2021-07-15 13:40:50 ~16 min android 📦apk 📲
✔️ e446abe #6 2021-07-15 13:43:26 ~18 min ios 📦ipa 📲
✔️ d282913 #7 2021-07-16 08:30:29 ~11 min android-e2e 📦apk 📲
✔️ d282913 #7 2021-07-16 08:32:25 ~13 min android 📦apk 📲
✔️ d282913 #7 2021-07-16 08:36:26 ~17 min ios 📦ipa 📲
✔️ d282913 #8 2021-07-19 12:28:13 ~18 min ios 📦ipa 📲
✔️ e0bd982 #8 2021-07-19 15:27:32 ~18 min android-e2e 📦apk 📲
✔️ e0bd982 #8 2021-07-19 15:27:38 ~18 min android 📦apk 📲
✔️ e0bd982 #9 2021-07-19 15:33:55 ~24 min ios 📦ipa 📲
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ f43b665 #9 2021-07-20 09:31:56 ~14 min android 📦apk 📲
✔️ f43b665 #9 2021-07-20 09:35:20 ~18 min android-e2e 📦apk 📲
✔️ f43b665 #10 2021-07-20 09:39:43 ~22 min ios 📦ipa 📲
✔️ e535c66 #10 2021-07-20 12:21:31 ~15 min android 📦apk 📲
✔️ e535c66 #10 2021-07-20 12:25:29 ~19 min android-e2e 📦apk 📲
✔️ e535c66 #11 2021-07-20 12:26:20 ~20 min ios 📦ipa 📲

@bitgamma bitgamma changed the title [wip] allow migration to Keycard keeping the db allow migration to Keycard keeping the db Jul 15, 2021
[quo/button {:type :secondary
:on-press #(re-frame/dispatch [::multiaccounts.key-storage/skip-password-pressed])}
(i18n/label :t/skip)]]]
[react/view {:height 1 :background-color colors/gray-lighter}]
Copy link
Contributor

Choose a reason for hiding this comment

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

is this quo/separator ?

Copy link
Member Author

Choose a reason for hiding this comment

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

indeed. Fixed, thanks!

@status-im-auto
Copy link
Member

87% of end-end tests have passed

Total executed tests: 71
Failed tests: 9
Passed tests: 62
IDs of failed tests: 5412,5350,6645,5360,6253,5379,6293,6237,6290 

Failed tests (9)

Click to expand
  • Rerun tests

  • 1. test_insufficient_funds_wallet_positive_balance, id: 5412

    Device 1: *Getting STT amount*
    Device 1: *Scrolling down to SilentButton*

    Device 1: SilentButton by xpath:* `//android.view.ViewGroup[@content-desc=':STT-asset-value']//android.widget.TextView[1]` is not found on the screen

    Device sessions

    2. test_send_token_with_7_decimals, id: 5350

    Device 1: *Click until Button by accessibility id:*`:ETH-asset-value` *will be presented*
    Device 1: Button element not found

    Device 1: ADIAssetButton by xpath: `(//*[@content-desc=':ADI-asset-value'])[1]` is not found on the screen

    Device sessions

    3. test_restore_account_migrate_multiaccount_to_keycard, id: 6645

    Device 1: *Tap on found Button*
    Device 1: *Find MoveAndResetButton by accessibility id:* `move-and-reset-button`

    Device 1: MoveAndResetButton by accessibility id: `move-and-reset-button` is not found on the screen

    Device sessions

    4. test_unread_messages_counter_public_chat, id: 5360

    Device 2: **Signed in successfully!**
    Device 2: **Looking for chat '#fucsnqa'**

    Counter is not shown for mention in public chat

    Device sessions

    5. test_send_eth_in_1_1_chat_transaction_push, id: 6253

    Transaction #5, amount is 0.001581556
    {'blockNumber': '10640465', 'timeStamp': '1626337061', 'hash': '0x61f57b7f8d3eea3702fd055f97781e823249ae2be296dbf061225c24cab76f85', 'nonce': '1823', 'blockHash': '0x5e66f997ca9e5c4d1ca1b97da96113cc58339672d41a2e6253dbc0f79ff279aa', 'transactionIndex': '2', 'from': '0xf184747445c3b85ceb147dfb136067cb93d95f1d', 'to': '0xefca4fd47b98b9f01c4eef4827e576a01459728a', 'value': '1581556000000000', 'gas': '21000', 'gasPrice': '32000000000', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '99591', 'gasUsed': '21000', 'confirmations': '6774'}

    Transaction with amount 0.001684832 is not found in list of ETH transactions, address is efca4fd47b98b9f01c4eef4827e576a01459728a during 300s

    Device sessions

    6. test_home_view, id: 5379

    Device 1: *Find Button by xpath:* `//*[@text="Get started"]`
    Device 1: *Tap on found Button*

    Device 1: Unable to find multiaccount by position 1

    Device sessions

    7. test_keycard_send_eth_in_1_1_chat, id: 6293

    Transaction #5, amount is 0.001594915
    {'blockNumber': '10640886', 'timeStamp': '1626342767', 'hash': '0x2567ff931b7f2ad3878a2268b32709881f1ca9df7d8210877057575d5ac917bf', 'nonce': '5862', 'blockHash': '0x82176f636c76485d5bf1d8ac363441621f631c08b3780e927e9381a9a16277ee', 'transactionIndex': '6', 'from': '0xf7cb60839c0de25e37be0391c33bb34a8f0f8414', 'to': '0x4e029cbb225dcab76080f475c35740dbec28475b', 'value': '1594915000000000', 'gas': '21000', 'gasPrice': '31000000000', 'isError': '0', 'txreceipt_status': '1', 'input': '0x', 'contractAddress': '', 'cumulativeGasUsed': '328440', 'gasUsed': '21000', 'confirmations': '6353'}

    Transaction with amount 0.001684342 is not found in list of ETH transactions, address is f7cb60839c0de25e37be0391c33bb34a8f0f8414 during 300s

    Device sessions

    8. test_fetching_balance_after_offline, id: 6237

    Transaction #5, amount is 9.371e-15
    {'blockNumber': '10641008', 'timeStamp': '1626344211', 'hash': '0x91c7af306452f49bfa75f900feff4b39d702f93980f6447f6d4bf5eaeb004181', 'nonce': '4124', 'blockHash': '0x5b2fdfe42fbd4e8e7c67578b6e181c6fcf373da1a5def261594b552137851485', 'from': '0x061fae3dd75beab5855f584837ca0c0a8e84f5c1', 'contractAddress': '0xe639e24346d646e927f323558e6e0031bfc93581', 'to': '0xf184747445c3b85ceb147dfb136067cb93d95f1d', 'value': '9371', 'tokenName': 'Adi Test Token', 'tokenSymbol': 'ADI', 'tokenDecimal': '7', 'transactionIndex': '0', 'gas': '41235', 'gasPrice': '32000000000', 'gasUsed': '34363', 'cumulativeGasUsed': '34363', 'input': 'deprecated', 'confirmations': '6301'}

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

    Device sessions

    9. test_keycard_fetching_balance_after_offline, id: 6290

    Transaction #5, amount is 9.371e-15
    {'blockNumber': '10641008', 'timeStamp': '1626344211', 'hash': '0x91c7af306452f49bfa75f900feff4b39d702f93980f6447f6d4bf5eaeb004181', 'nonce': '4124', 'blockHash': '0x5b2fdfe42fbd4e8e7c67578b6e181c6fcf373da1a5def261594b552137851485', 'from': '0x061fae3dd75beab5855f584837ca0c0a8e84f5c1', 'contractAddress': '0xe639e24346d646e927f323558e6e0031bfc93581', 'to': '0xf184747445c3b85ceb147dfb136067cb93d95f1d', 'value': '9371', 'tokenName': 'Adi Test Token', 'tokenSymbol': 'ADI', 'tokenDecimal': '7', 'transactionIndex': '0', 'gas': '41235', 'gasPrice': '32000000000', 'gasUsed': '34363', 'cumulativeGasUsed': '34363', 'input': 'deprecated', 'confirmations': '6301'}

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

    Device sessions

    Passed tests (62)

    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_keycard_can_see_all_transactions_in_history, id: 6291
    Device sessions

    4. test_sign_message_and_2tx_in_batch_and_transactions_filters_from_daap, id: 5342
    Device sessions

    5. test_add_and_delete_watch_only_account_to_multiaccount_instance, id: 6244
    Device sessions

    6. test_open_blocked_secure_not_secure_inlalid_offline_urls, id: 6210
    Device sessions

    7. test_open_public_chat_using_deep_link, id: 5396
    Device sessions

    8. test_offline_add_new_group_chat_member, id: 3998
    Device sessions

    9. test_send_non_english_message_to_newly_added_contact_on_different_networks, id: 5315
    Device sessions

    10. test_can_see_balance_and_all_transactions_history_on_cellular, id: 5314
    Device sessions

    11. test_keycard_create_login_resotore_unlock_same_seed, id: 5689
    Device sessions

    12. test_delete_close_all_tabs, id: 5390
    Device sessions

    13. test_create_new_group_chat_messaging_pn_delivered, id: 3994
    Device sessions

    14. test_edit_message_in_one_to_one_and_public_chats, id: 695843
    Device sessions

    15. test_delete_chats_via_delete_button_rejoin, id: 5387
    Device sessions

    16. test_send_transaction_set_recipient_options, id: 6328
    Device sessions

    17. test_keycard_sign_message_and_transactions_from_daap, id: 6251
    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_redirect_to_public_chat_tapping_tag_message_fetch_more_history, id: 5675
    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_add_account_to_wallet_private_key_and_seed_phrase, id: 6272
    Device sessions

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

    27. test_offline_is_shown_messaging_1_1_chat_sent_delivered, id: 5310
    Device sessions

    28. test_pair_devices_sync_one_to_one_contacts_nicknames_public_chat, id: 5762
    Device sessions

    29. test_long_press_to_delete_chat, id: 5319
    Device sessions

    30. test_copy_and_paste_messages, id: 5317
    Device sessions

    31. test_open_transaction_on_etherscan_copy_tx_hash, id: 5384
    Device sessions

    32. test_user_can_see_all_own_assets_after_account_recovering, id: 5381
    Device sessions

    33. test_send_eth_from_wallet_to_address_incorrect_password, id: 5308
    Device sessions

    34. test_mobile_data_usage_complex_settings, id: 6228
    Device sessions

    35. test_start_chat_with_ens_mention_in_one_to_one, id: 5403
    Device sessions

    36. test_decline_transactions_in_1_1_chat_push_notification_changing_state, id: 6265
    Device sessions

    37. test_install_pack_and_send_sticker, id: 5782
    Device sessions

    38. test_switch_users_special_char_password_and_add_new_account_logcat, id: 5356
    Device sessions

    39. test_manage_assets, id: 5341
    Device sessions

    40. test_browser_managing_bookmarks, id: 6633
    Device sessions

    41. test_open_chat_by_pasting_chat_key_check_invalid_chat_key_cases, id: 5304
    Device sessions

    42. test_request_stt_from_daap, id: 5309
    Device sessions

    43. test_can_use_purchased_stickers_on_recovered_account, id: 5783
    Device sessions

    44. test_dapps_permissions, id: 5738
    Device sessions

    45. test_account_recovery_with_uppercase_whitespaces_seed_phrase_special_char_passw_logcat, id: 5394
    Device sessions

    46. test_send_eth_to_ens_in_chat, id: 6279
    Device sessions

    47. test_share_copy_contact_code_and_wallet_address, id: 5323
    Device sessions

    48. test_wallet_set_up, id: 5335
    Device sessions

    49. test_send_transaction_with_custom_token, id: 6208
    Device sessions

    50. test_can_add_existing_ens, id: 5502
    Device sessions

    51. test_logcat_backup_recovery_phrase, id: 5419
    Device sessions

    52. test_request_and_receive_stt_in_1_1_chat_offline, id: 6263
    Device sessions

    53. test_set_profile_picture, id: 6646
    Device sessions

    54. test_collectible_from_wallet, id: 5346
    Device sessions

    55. test_add_and_remove_mention_contact_with_nickname_from_public_chat, id: 5332
    Device sessions

    56. test_keycard_request_stt_from_daap, id: 6249
    Device sessions

    57. test_restore_account_from_mnemonic_to_keycard, id: 6240
    Device sessions

    58. test_pass_phrase_validation, id: 5363
    Device sessions

    59. test_send_and_open_links_with_previews, id: 5373
    Device sessions

    60. test_reactions_to_message_in_chats, id: 6315
    Device sessions

    61. test_push_notification_1_1_chat_no_pn_activity_center, id: 6283
    Device sessions

    62. test_public_chat_messaging_emojis_timestamps, id: 5313
    Device sessions

    @status-im-auto
    Copy link
    Member

    89% of end-end tests have passed

    Total executed tests: 9
    Failed tests: 1
    Passed tests: 8
    
    IDs of failed tests: 6645 
    

    Failed tests (1)

    Click to expand
  • Rerun tests

  • 1. test_restore_account_migrate_multiaccount_to_keycard, id: 6645

    Device 1: *Tap on found Button*
    Device 1: *Find MoveAndResetButton by accessibility id:* `move-and-reset-button`

    Device 1: MoveAndResetButton by accessibility id: `move-and-reset-button` is not found on the screen

    Device sessions

    Passed tests (8)

    Click to expand

    1. test_send_token_with_7_decimals, id: 5350
    Device sessions

    2. test_keycard_fetching_balance_after_offline, id: 6290
    Device sessions

    3. test_unread_messages_counter_public_chat, id: 5360
    Device sessions

    4. test_keycard_send_eth_in_1_1_chat, id: 6293
    Device sessions

    5. test_send_eth_in_1_1_chat_transaction_push, id: 6253
    Device sessions

    6. test_home_view, id: 5379
    Device sessions

    7. test_fetching_balance_after_offline, id: 6237
    Device sessions

    8. test_insufficient_funds_wallet_positive_balance, id: 5412
    Device sessions

    @bitgamma
    Copy link
    Member Author

    failed test is because the reset database checkbox is not checked anymore automatically when migrating (by default, we want to keep the db).

    @churik
    Copy link
    Contributor

    churik commented Jul 19, 2021

    @bitgamma thank you! Works great.
    I'll rework e2e.
    Several issues:

    ISSUE 1: account restored from seed phrase (or private key) remains after moving to keycard storage

    Currently, if you create multiaccount with keycard, there is no option to add account in wallet using seed phrase or private key.
    But if it was added before migration it is preserved and basically, it is not working (i.e. can't sign transactions)
    Steps:

    1. restore multiaccount from seed phrase
    2. add another account in wallet, i.e. 'Added'(using seed phrase or private key)
    3. log out and migrate multiaccount to keycard storage, keeping database
    4. try to sign transaction from 'Added'

    Expected result:
    can't see 'Added' in accounts list (and will be aware of it during reset)
    Actual result:
    at attempt to sign transaction
    IMAGE 2021-07-19 15:35:37

    OS: IOS, Android

    ISSUE 2: 'Lock app with fingerprint (Face ID)' remains enabled after moving to keycard storage

    IMO better to reset it and ask user to enable it again, as currently it crashes app on IOS and not working until app reopening (religion) on Android

    Steps:

    1. restore multiaccount from seed phrase
    2. go to Profile > Privacy and Security > Lock app with fingerprint > enable it
    3. migrate multiaccount to keycard storage (with enabled "Save password" on login screen) , keeping database

    Expected result:
    Will be turned off after login
    Actual result:

    • IOS: crash after migrating; app is working after relogin
    • Android: Lock app with fingerprint (Face ID)' enabled, but it doesn't work until relogin to app

    @bitgamma
    Copy link
    Member Author

    @churik thanks for catching this! should be fixed now. Seed and private keys subaccounts are removed, while watch and derived paths are kept.

    @churik
    Copy link
    Contributor

    churik commented Jul 20, 2021

    @bitgamma previous issues are fixed, thank you!
    Found another one, that may be missed yesterday.

    ISSUE 3: "back up seed phrase" is shown if migrate restored multiaccount to keycard

    Steps:

    1. restore multiaccount from seed phrase
    2. migrate multiaccount to keycard storage

    Expected result:
    no "back up seed phrase" is shown

    Actual result:
    "back up seed phrase" is shown, and error appears if you start process
    IMAGE 2021-07-20 11:02:53

    OS: IOS, Android
    Status-debug-logs.zip

    @bitgamma
    Copy link
    Member Author

    @churik fixed now, thanks!

    @churik
    Copy link
    Contributor

    churik commented Jul 20, 2021

    All fixed.
    Checked that migrated:

    • all types of chats
    • browser bookmarks
    • different account in wallet
    • settings in Profile
    • status

    Signed-off-by: Michele Balistreri <michele@bitgamma.com>
    @bitgamma bitgamma merged commit e8f7ae8 into develop Jul 20, 2021
    @bitgamma bitgamma deleted the feature/11777 branch July 20, 2021 12:28
    bitgamma added a commit that referenced this pull request Jul 21, 2021
    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.

    Enable keeping database when migrating account to keycard Keycard migration flow is missing the popup that informs user about migration success

    4 participants