|
1 | 1 | @page "/wallet/seedbackup" |
2 | 2 |
|
3 | 3 | <div class="seedbackup-main"> |
4 | | - @switch (Step) |
| 4 | + @if (SeedWords.Count == 0) |
5 | 5 | { |
6 | | - case 0: |
7 | | - <p>Please write down your recovery phrase.</p> |
8 | | - <br/> |
| 6 | + <p>Fetching seed words...</p> |
| 7 | + } |
| 8 | + else |
| 9 | + { |
| 10 | + @switch (Step) |
| 11 | + { |
| 12 | + case 0: |
| 13 | + <p>Please write down your recovery phrase.</p> |
| 14 | + <br /> |
9 | 15 |
|
10 | | - for (int i = 0; i < SeedWords.Count; i++) |
11 | | - { |
12 | | - <div class="seed-word"> |
13 | | - <p>@(i+1)</p> |
14 | | - <input value="@SeedWords[i]" disabled="@true"/> |
15 | | - </div> |
16 | | - } |
| 16 | + for (int i = 0; i < SeedWords.Count; i++) |
| 17 | + { |
| 18 | + <div class="seed-word"> |
| 19 | + <p>@(i + 1)</p> |
| 20 | + <input value="@SeedWords[i]" disabled="@true" /> |
| 21 | + </div> |
| 22 | + } |
17 | 23 |
|
18 | | - <button class="button-green" @onclick="() => Step = 1">Next</button> |
19 | | - break; |
20 | | - case 1: |
21 | | - <p>Please confirm that you have written down your recovery phrase by filling in the five blank fields.</p> |
22 | | - <br/> |
| 24 | + <button class="button-green" @onclick="() => Step = 1">Next</button> |
| 25 | + break; |
| 26 | + case 1: |
| 27 | + <p>Please confirm that you have written down your recovery phrase by filling in the five blank fields.</p> |
| 28 | + <br /> |
23 | 29 |
|
24 | | - for (int i = 0; i < RemovedSeedWords.Count; i++) |
25 | | - { |
26 | | - int iCopy = i; |
27 | | - <div class=@($"seed-word")> |
28 | | - <p>@(i+1)</p> |
29 | | - <input value="@RemovedSeedWords[iCopy].Word" @oninput="(e) => HandleOnInput(e.Value.ToString(), iCopy)" disabled="@(!RemovedIndices.Contains(iCopy))" class=@(RemovedIndices.Contains(iCopy) ? (RemovedSeedWords[iCopy].IsCorrect ? "word-valid" : "word-invalid") : "")/> |
30 | | - </div> |
31 | | - } |
| 30 | + for (int i = 0; i < RemovedSeedWords.Count; i++) |
| 31 | + { |
| 32 | + int iCopy = i; |
| 33 | + <div class=@($"seed-word")> |
| 34 | + <p>@(i + 1)</p> |
| 35 | + <input value="@RemovedSeedWords[iCopy].Word" @oninput="(e) => HandleOnInput(e.Value.ToString(), iCopy)" disabled="@(!RemovedIndices.Contains(iCopy))" class=@(RemovedIndices.Contains(iCopy) ? (RemovedSeedWords[iCopy].IsCorrect ? "word-valid" : "word-invalid") : "") /> |
| 36 | + </div> |
| 37 | + } |
32 | 38 |
|
33 | | - <button disabled="@(!IsValid)" class="button-green" @onclick="Submit">Submit</button> |
34 | | - <button class="button-grey" @onclick="GoBack">Go back</button> |
35 | | - break; |
36 | | - default: break; |
| 39 | + <button disabled="@(!IsValid)" class="button-green" @onclick="Submit">Submit</button> |
| 40 | + <button class="button-grey" @onclick="GoBack">Go back</button> |
| 41 | + break; |
| 42 | + default: break; |
| 43 | + } |
37 | 44 | } |
38 | 45 | </div> |
0 commit comments