@@ -15,6 +15,7 @@ import { IWallet, Wallet } from './model/wallet';
15
15
import { Storage } from './storage' ;
16
16
17
17
const $ = require ( 'preconditions' ) . singleton ( ) ;
18
+ var deprecatedServerMessage = require ( '../deprecated-serverMessages' ) ;
18
19
var serverMessages = require ( '../serverMessages' ) ;
19
20
var BCHAddressTranslator = require ( './bchaddresstranslator' ) ;
20
21
@@ -215,7 +216,7 @@ export class WalletService {
215
216
}
216
217
217
218
static handleIncomingNotifications ( notification , cb ) {
218
- cb = cb || function ( ) { } ;
219
+ cb = cb || function ( ) { } ;
219
220
220
221
// do nothing here....
221
222
// bc height cache is cleared on bcmonitor
@@ -695,6 +696,8 @@ export class WalletService {
695
696
}
696
697
status . wallet = wallet ;
697
698
699
+ status . serverMessage = deprecatedServerMessage ( wallet , self . appName , self . appVersion ) ;
700
+
698
701
status . serverMessage = serverMessages (
699
702
wallet ,
700
703
self . appName ,
@@ -798,7 +801,7 @@ export class WalletService {
798
801
799
802
// self.logi('Notification', type);
800
803
801
- cb = cb || function ( ) { } ;
804
+ cb = cb || function ( ) { } ;
802
805
803
806
var walletId = self . walletId || data . walletId ;
804
807
var copayerId = self . copayerId || data . copayerId ;
@@ -1791,7 +1794,7 @@ export class WalletService {
1791
1794
return cb (
1792
1795
new ClientError (
1793
1796
'Invalid fee level. Valid values are ' +
1794
- _ . map ( feeLevels , 'name' ) . join ( ', ' )
1797
+ _ . map ( feeLevels , 'name' ) . join ( ', ' )
1795
1798
)
1796
1799
) ;
1797
1800
}
@@ -1915,10 +1918,10 @@ export class WalletService {
1915
1918
var logger = network == 'livenet' ? self . logw : self . logi ;
1916
1919
logger (
1917
1920
'Could not compute fee estimation in ' +
1918
- network +
1919
- ': ' +
1920
- failed . join ( ', ' ) +
1921
- ' blocks.'
1921
+ network +
1922
+ ': ' +
1923
+ failed . join ( ', ' ) +
1924
+ ' blocks.'
1922
1925
) ;
1923
1926
}
1924
1927
@@ -2142,20 +2145,20 @@ export class WalletService {
2142
2145
if ( totalValueInUtxos < txpAmount ) {
2143
2146
self . logi (
2144
2147
'Total value in all utxos (' +
2145
- Utils . formatAmountInBtc ( totalValueInUtxos ) +
2146
- ') is insufficient to cover for txp amount (' +
2147
- Utils . formatAmountInBtc ( txpAmount ) +
2148
- ')'
2148
+ Utils . formatAmountInBtc ( totalValueInUtxos ) +
2149
+ ') is insufficient to cover for txp amount (' +
2150
+ Utils . formatAmountInBtc ( txpAmount ) +
2151
+ ')'
2149
2152
) ;
2150
2153
return cb ( Errors . INSUFFICIENT_FUNDS ) ;
2151
2154
}
2152
2155
if ( netValueInUtxos < txpAmount ) {
2153
2156
self . logi (
2154
2157
'Value after fees in all utxos (' +
2155
- Utils . formatAmountInBtc ( netValueInUtxos ) +
2156
- ') is insufficient to cover for txp amount (' +
2157
- Utils . formatAmountInBtc ( txpAmount ) +
2158
- ')'
2158
+ Utils . formatAmountInBtc ( netValueInUtxos ) +
2159
+ ') is insufficient to cover for txp amount (' +
2160
+ Utils . formatAmountInBtc ( txpAmount ) +
2161
+ ')'
2159
2162
) ;
2160
2163
return cb ( Errors . INSUFFICIENT_FUNDS_FOR_FEE ) ;
2161
2164
}
@@ -2373,9 +2376,9 @@ export class WalletService {
2373
2376
txp . fee ;
2374
2377
self . logi (
2375
2378
'Successfully built transaction. Total fees: ' +
2376
- Utils . formatAmountInBtc ( txp . fee ) +
2377
- ', total change: ' +
2378
- Utils . formatAmountInBtc ( change )
2379
+ Utils . formatAmountInBtc ( txp . fee ) +
2380
+ ', total change: ' +
2381
+ Utils . formatAmountInBtc ( change )
2379
2382
) ;
2380
2383
} else {
2381
2384
self . logw ( 'Error building transaction' , err ) ;
@@ -2514,7 +2517,7 @@ export class WalletService {
2514
2517
return next (
2515
2518
new ClientError (
2516
2519
'Invalid fee level. Valid values are ' +
2517
- _ . map ( feeLevels , 'name' ) . join ( ', ' )
2520
+ _ . map ( feeLevels , 'name' ) . join ( ', ' )
2518
2521
)
2519
2522
) ;
2520
2523
}
0 commit comments