File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ void main() {
156156 };
157157 var boltString = await unixCient.simpleCall ("invoice" , params: params);
158158 try {
159- var response = await client.call <PayProxy , PayResponse >(
159+ var _ = await client.call <PayProxy , PayResponse >(
160160 method: "pay" ,
161161 params: PayProxy .build (invoice: boltString["bolt11" ]));
162162 await client.close ();
Original file line number Diff line number Diff line change 11import 'dart:io' ;
22
3+ import 'package:cln_common/cln_common.dart' ;
34import 'package:cln_grpc/cln_grpc.dart' ;
45import 'package:test/test.dart' ;
56
7+ import 'model/model.dart' ;
8+
69void main () {
710 var env = Platform .environment;
811 var tlsPath = env['TLS_PATH' ]! ;
@@ -14,5 +17,19 @@ void main() {
1417 expect (response.alias, "clighting4j-node" );
1518 await client.close ();
1619 });
20+
21+ test ('API List Funds with decode function' , () async {
22+ var client = GRPCClient (rootPath: tlsPath);
23+ var response =
24+ await client.call <CLNListFundsRequest , Map <String , dynamic >>(
25+ method: "listfunds" ,
26+ params: CLNListFundsRequest .build (),
27+ onDecode: (jsonResponse) {
28+ LogManager .getInstance
29+ .debug ("Grpc list funds call returns: $jsonResponse " );
30+ return jsonResponse as Map <String , dynamic >;
31+ });
32+ expect (response.isNotEmpty, isTrue);
33+ });
1734 });
1835}
Original file line number Diff line number Diff line change 1+ import 'package:cln_common/cln_common.dart' ;
2+ import 'package:cln_grpc/cln_grpc.dart' ;
3+
4+ class CLNListFundsRequest extends Serializable {
5+ ListfundsRequest proxy;
6+
7+ CLNListFundsRequest (this .proxy);
8+
9+ factory CLNListFundsRequest .build () =>
10+ CLNListFundsRequest (ListfundsRequest ());
11+
12+ @override
13+ Map <String , dynamic > toJSON () => proxy.toProto3Json () as Map <String , dynamic >;
14+
15+ @override
16+ T as < T > () => proxy as T ;
17+ }
You can’t perform that action at this time.
0 commit comments