Commit 472d7d5
Lw 9170 multi wallet integration (#892)
* fix(ui): use correct derivation path for displaying accounts
* feat(ui): disable account delete btn for active or the only account
* feat(ui): add onActivateClick handler for profile dropdown
* fix(ui): do not fire onClick in profile dropdown when clicking on arrow
* fix(core): start from account #0 in select account step
* fix(extension): clear background page once finished with create wallet flow
if create wallet flow finishes without explicitly calling setBackgroundPage()
then it would break the routing, as background page would be defined forever
* feat(extension): wire up multi-account components
temporarily use native prompt dialog for password input;
does not have a prompt to connect hardware wallet, or any
error handling when deriving xpub
* feat(extension): wire up add wallet components
* fix(extension): connect to hw device asap when adding account
If it takes more than some time (probably 50ms), Chrome will
reject hardware device connection with an error that says
WebHID connections must be initiated from user gesture.
Apparently, fetching wallets from repository can sometimes
take longer. This fix updates useWalletManager addAccount
method to take in the entire AnyBip32Wallet object instead
of just walletId, so that it doesn't have to fetch the
wallet object from indexeddb in service worker.
Consequently, some validations from addAccount can be removed,
because it's signature no longer accepts walletId of a script
wallet. Also it has to trust that wallet actually exists,
otherwise it will reject with an error that comes from the
WalletRepository (it is no longer a responsibility of this
method to check the existence of the wallet).
* feat(extension): do not copy address when clicking on active wallet
clicking on a wallet in dropdown menu activates it
removing copy feature makes the behavior more predictable
* feat(ui): add colorScheme option to ExtraSmall
also decouple button color scheme from size scheme
and set minWidth for ExtraSmall button, which is
currently only used for profile dropdown account item
* feat: replace edit/delete buttons with a single Disable button
temporary design until we apply a larger re-design
* fix: remove all relative imports from cardano-sdk
* fix(extension): connect trezor device before exporting xpub
onboarding, adding wallet, adding accounts and dapp transacations are now working
* chore: bump sdk packages
required for correctly bundling trezor
* chore: build service worker script in development mode
after removing imports from dist/cjs, service worker no longer loads
this is a temporary solution
* test(extension): mock initializeTrezorTransport method
---------
Co-authored-by: Piotr Czeglik <piotr.czeglik@iohk.io>1 parent d1fda44 commit 472d7d5
File tree
53 files changed
+1202
-544
lines changed- apps/browser-extension-wallet
- src
- components
- DropdownMenu
- MainMenu/DropdownMenuOverlay
- components
- hooks
- __tests__
- lib
- scripts/background
- translations
- routes
- stores
- slices
- types
- utils
- __tests__
- mocks
- views/browser-view
- features
- multi-wallet
- create-wallet
- steps
- hardware-wallet/steps
- restore-wallet
- steps
- settings/components
- staking
- wallet-setup
- components
- routes
- packages
- cardano
- src/wallet
- lib
- __tests__
- test/mocks
- core/src/ui/components/WalletSetup
- staking
- ui/src/design-system
- control-buttons
- profile-dropdown
- accounts
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
53 files changed
+1202
-544
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
48 | 48 | | |
49 | | - | |
50 | | - | |
| 49 | + | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
Lines changed: 17 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
25 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
| |||
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
35 | | - | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
39 | 44 | | |
40 | 45 | | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
46 | 53 | | |
| 54 | + | |
47 | 55 | | |
48 | 56 | | |
49 | 57 | | |
50 | 58 | | |
51 | 59 | | |
52 | | - | |
53 | | - | |
| 60 | + | |
| 61 | + | |
54 | 62 | | |
55 | 63 | | |
56 | 64 | | |
57 | | - | |
| 65 | + | |
58 | 66 | | |
59 | 67 | | |
60 | 68 | | |
61 | 69 | | |
62 | | - | |
| 70 | + | |
63 | 71 | | |
64 | 72 | | |
65 | 73 | | |
| |||
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | | - | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
| |||
Lines changed: 15 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| 77 | + | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
| 81 | + | |
79 | 82 | | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
83 | 87 | | |
84 | 88 | | |
85 | 89 | | |
86 | 90 | | |
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
90 | | - | |
| 94 | + | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | | - | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
99 | | - | |
| 103 | + | |
100 | 104 | | |
101 | 105 | | |
102 | 106 | | |
103 | | - | |
| 107 | + | |
104 | 108 | | |
105 | 109 | | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| 114 | + | |
110 | 115 | | |
111 | 116 | | |
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| 121 | + | |
116 | 122 | | |
117 | 123 | | |
118 | 124 | | |
| |||
141 | 147 | | |
142 | 148 | | |
143 | 149 | | |
| 150 | + | |
144 | 151 | | |
145 | 152 | | |
146 | 153 | | |
147 | 154 | | |
148 | 155 | | |
149 | 156 | | |
| 157 | + | |
150 | 158 | | |
151 | 159 | | |
152 | 160 | | |
| |||
156 | 164 | | |
157 | 165 | | |
158 | 166 | | |
| 167 | + | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| |||
178 | 187 | | |
179 | 188 | | |
180 | 189 | | |
181 | | - | |
| 190 | + | |
| 191 | + | |
182 | 192 | | |
183 | 193 | | |
184 | 194 | | |
| |||
Lines changed: 5 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
22 | 24 | | |
23 | 25 | | |
24 | 26 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
39 | 41 | | |
40 | | - | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
0 commit comments