Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 5b04c6e

Browse files
committed
Revert "Cleanup wallet action"
This reverts commit 9ba05bd.
1 parent 228ad56 commit 5b04c6e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/action/wallet.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* call the corresponding GRPC apis for updating wallet balances.
44
*/
55

6-
import { observe } from 'mobx';
6+
import { observe, when } from 'mobx';
77
import { toBuffer, parseSat, checkHttpStatus, nap, poll } from '../helper';
88
import { MIN_PASSWORD_LENGTH, NOTIFICATION_DELAY, RATE_DELAY } from '../config';
99
import * as log from './log';
@@ -277,7 +277,10 @@ class WalletAction {
277277
this._nav.goNewAddress();
278278
} else {
279279
this._nav.goWait();
280-
observe(this._store, 'walletAddress', () => this._nav.goNewAddress());
280+
when(
281+
() => typeof this._store.walletAddress === 'string',
282+
() => this._nav.goNewAddress()
283+
);
281284
}
282285
}
283286

0 commit comments

Comments
 (0)