This repository was archived by the owner on Oct 24, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @synonymdev/react-native-lightning" ,
3
3
"title" : " React Native Lightning" ,
4
- "version" : " 0.0.30 " ,
4
+ "version" : " 0.0.33 " ,
5
5
"description" : " React Native wrapper for Lndmobile" ,
6
6
"main" : " ./dist/index.js" ,
7
7
"types" : " ./dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -29,14 +29,10 @@ class GrpcAction {
29
29
* @returns {Promise<void> }
30
30
*/
31
31
async checkGrpcReady ( ) : Promise < void > {
32
- try {
33
- const state = await this . getStateCommand ( ) ;
32
+ const state = await this . getStateCommand ( ) ;
34
33
35
- if ( state === ss_lnrpc . WalletState . WAITING_TO_START ) {
36
- throw new Error ( 'LND not started' ) ;
37
- }
38
- } catch ( e ) {
39
- throw new Error ( 'Unable to determine LND state' ) ;
34
+ if ( state === ss_lnrpc . WalletState . WAITING_TO_START ) {
35
+ throw new Error ( 'LND not started' ) ;
40
36
}
41
37
}
42
38
@@ -53,7 +49,7 @@ class GrpcAction {
53
49
serialisedReq
54
50
) ;
55
51
if ( serializedResponse === undefined ) {
56
- throw new Error ( 'Missing response' ) ;
52
+ throw new Error ( 'Unable to determine LND state. Missing response. ' ) ;
57
53
}
58
54
59
55
return ss_lnrpc . GetStateResponse . decode ( base64 . toByteArray ( serializedResponse ) ) . state ;
You can’t perform that action at this time.
0 commit comments