There was an error while loading. Please reload this page.
1 parent 315623a commit b438509Copy full SHA for b438509
1 file changed
packages/neuron-wallet/src/services/wallets.ts
@@ -245,6 +245,8 @@ export default class WalletService {
245
if (currentID === id) {
246
if (newWallets.length > 0) {
247
this.setCurrent(newWallets[0].id)
248
+ } else {
249
+ this.setCurrent('')
250
}
251
252
@@ -258,9 +260,11 @@ export default class WalletService {
258
260
throw new IsRequired('ID')
259
261
262
- const wallet = this.get(id)
- if (!wallet) {
263
- throw new WalletNotFound(id)
+ if (id !== '') {
264
+ const wallet = this.get(id)
265
+ if (!wallet) {
266
+ throw new WalletNotFound(id)
267
+ }
268
269
270
this.listStore.writeSync(this.currentWalletKey, id)
0 commit comments