This repository was archived by the owner on Feb 23, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -144,7 +144,11 @@ class WalletAction {
144144 * @return {Promise<undefined> }
145145 */
146146 async update ( ) {
147- await Promise . all ( [ this . getBalance ( ) , this . getChannelBalance ( ) ] ) ;
147+ await Promise . all ( [
148+ this . getBalance ( ) ,
149+ this . getChannelBalance ( ) ,
150+ this . getNewAddress ( ) ,
151+ ] ) ;
148152 }
149153
150154 /**
@@ -472,12 +476,9 @@ class WalletAction {
472476 * @return {Promise<undefined> }
473477 */
474478 async getNewAddress ( ) {
475- // - `p2wkh`: Pay to witness key hash (`WITNESS_PUBKEY_HASH` = 0)
476- // - `np2wkh`: Pay to nested witness key hash (`NESTED_PUBKEY_HASH` = 1)
477- // - `p2pkh`: Pay to public key hash (`PUBKEY_HASH` = 2)
478479 try {
479480 const { address } = await this . _grpc . sendCommand ( 'NewAddress' , {
480- type : 1 ,
481+ type : 3 , // UNUSED_NESTED_PUBKEY_HASH = 3
481482 } ) ;
482483 this . _store . walletAddress = address ;
483484 } catch ( err ) {
Original file line number Diff line number Diff line change @@ -138,7 +138,7 @@ describe('Action Wallet Unit Tests', () => {
138138 it ( 'should refresh wallet balances' , async ( ) => {
139139 sandbox . stub ( wallet , 'pollExchangeRate' ) ;
140140 await wallet . update ( ) ;
141- expect ( grpc . sendCommand , 'was called twice ' ) ;
141+ expect ( grpc . sendCommand , 'was called thrice ' ) ;
142142 expect ( wallet . pollExchangeRate , 'was not called' ) ;
143143 } ) ;
144144 } ) ;
You can’t perform that action at this time.
0 commit comments