Concordium / concordium-reference-wallet-ios

Reference wallet for the Concordium blockchain
Apache License 2.0
11 stars 10 forks source link

Incomplete initial account remains in account list after import of new wallet file. #5

Closed concordium-cl closed 3 years ago

concordium-cl commented 3 years ago

Bug Description When initial account creation is initiated but then interrupted during the process to import an account file, the initial account appears in account list as pending. Clicking on it will give an error message. It cannot be deleted manually.

First when another initial account is created, the broken initial account vanishes from account list.

[Reported originally in bug sheet as priority 2.]

Steps to Reproduce

Expected Result Incomplete initial account should not be stored and shown in account list.

Actual Result The initial account appears in account list as pending.

Versions

Bargsteen commented 3 years ago

I am experiencing something similar but without the import.

Steps:

  1. Initiate initial account creation
  2. Before selecting an identity provider, press X to cancel the creation

Expected: No new accounts shown

Actual: A pending account with the name entered in step 1 is listed.

Note: If I repeat the steps, the new initial account will supplant the previous one. So it seems like I can only ever have one of these pending accounts.

jens-concordium commented 3 years ago

I just tested this on the 1.0.5 StagingNet build, and it seems to still be a problem in two slightly different scenarios.

This was done on an iPhone XS with iOS 14.5.

What I did:

Pre-requisites: Install the app, create a bunch of accounts and ID's, and then export them to use for testing.

Scenario 1

  1. Reinstall the app.
  2. Start making a new initial account and a new ID via the intro flow. Chose the Concordium ID provider, but minimize the app at the "external" flow.
  3. Browse to the file exported before, and open it with the StagingNet app. Nothing happens.
  4. Close the "external" Concordium ID provider window with the x in the upper right corner.
  5. Import again. This time it succeeds with the import, but it will say that the initial account creation failed. 6.1 If Cancel is pressed on the toast, the initial account will stay there. If the "pending" initial account is pressed, the app will crash. Upon reopening the app, it will be gone. 6.2 If "Try again" is pressed on the toast, the flow to make a new one will be started. It can either be finished or cancelled, and the "pending" initial account will be gone.

Scenario 2

  1. Reinstall the app.
  2. Start making a new initial account and a new ID via the intro flow. Minimize the app at the identity provider selection screen.
  3. Browse to the file exported before, and import it into the app. Import will succeed.
  4. The "pending" initial account from the intro flow will still be there, and no error toast is shown.
  5. Pressing the "pending" initial account will give an error message, saying that the app cannot connect to server.
  6. The initial account will stay there untill a new initial account is created.