@@ -8,7 +8,7 @@ public class MoneroLwsServiceIntegrationTest
88 private static readonly string Address = TestUtils . Address ;
99 private static readonly string ViewKey = TestUtils . PrivateViewKey ;
1010 private static readonly MoneroLwsService Lws = TestUtils . GetLwsService ( ) ;
11-
11+
1212 [ Fact ]
1313 public async Task TestGetVersion ( )
1414 {
@@ -37,7 +37,7 @@ public async Task GetDaemonStatus()
3737 Assert . False ( string . IsNullOrEmpty ( response . Network ) ) ;
3838 Assert . False ( string . IsNullOrEmpty ( response . State ) ) ;
3939 }
40-
40+
4141 [ Fact ]
4242 public async Task TestLogin ( )
4343 {
@@ -61,28 +61,28 @@ public async Task TestAcceptRequests()
6161 {
6262 var requests = await Lws . ListRequests ( ) ;
6363 List < string > addressesToCreate = [ ] ;
64-
64+
6565 foreach ( var createRequest in requests . Create )
6666 {
6767 addressesToCreate . Add ( createRequest . Address ) ;
6868 }
6969
7070 var created = await Lws . AcceptRequests ( "create" , addressesToCreate ) ;
71-
71+
7272 Assert . Equal ( addressesToCreate . Count , created . UpdatedAddresses . Count ) ;
73-
73+
7474 List < string > addressesToImport = [ ] ;
75-
75+
7676 foreach ( var importRequest in requests . Import )
7777 {
7878 addressesToImport . Add ( importRequest . Address ) ;
7979 }
8080
8181 var imported = await Lws . AcceptRequests ( "import" , addressesToImport ) ;
82-
82+
8383 Assert . Equal ( addressesToImport . Count , imported . UpdatedAddresses . Count ) ;
8484 }
85-
85+
8686 [ Fact ]
8787 public async Task TestGetAddressInfo ( )
8888 {
@@ -95,14 +95,14 @@ public async Task TestGetAddressInfo()
9595 Assert . False ( string . IsNullOrEmpty ( response . LockedFunds ) ) ;
9696 Assert . False ( string . IsNullOrEmpty ( response . TotalReceived ) ) ;
9797 Assert . False ( string . IsNullOrEmpty ( response . TotalSent ) ) ;
98-
98+
9999 if ( response . TotalSent != "0" )
100100 {
101101 Assert . NotNull ( response . SpentOutputs ) ;
102102 Assert . NotEmpty ( response . SpentOutputs ) ;
103103 TestSpends ( response . SpentOutputs ) ;
104104 }
105-
105+
106106 Assert . Null ( response . Rates ) ;
107107 }
108108
@@ -123,7 +123,7 @@ public async Task TestGetAddressTxs()
123123 foreach ( var tx in response . Transactions )
124124 {
125125 TestTransaction ( tx ) ;
126- }
126+ }
127127 }
128128 }
129129
@@ -148,7 +148,7 @@ public async Task TestGetUnspentOuts()
148148 Assert . True ( fee > lastFee ) ;
149149 lastFee = fee ;
150150 }
151-
151+
152152 TestOutputs ( response . Outputs ) ;
153153 }
154154
@@ -166,7 +166,7 @@ public async Task TestImportWallet()
166166 Assert . False ( string . IsNullOrEmpty ( response . PaymentAddress ) ) ;
167167 Assert . False ( string . IsNullOrEmpty ( response . PaymentId ) ) ;
168168 }
169-
169+
170170 Assert . NotNull ( response . Status ) ;
171171
172172 if ( response . NewRequest )
@@ -205,7 +205,7 @@ public async Task TestProvisionSubaddrs()
205205 var response = await Lws . ProvisionSubaddrs ( Address , ViewKey , 0 , 20 , 1 , 1 , true ) ;
206206 TestSubaddrs ( response , true , true ) ;
207207 }
208-
208+
209209 [ Fact ]
210210 public async Task TestGetSubaddrs ( )
211211 {
@@ -237,7 +237,7 @@ public async Task TestValidate()
237237 {
238238 Assert . Fail ( $ "{ response . Error . Field } : { response . Error . Details } ") ;
239239 }
240-
240+
241241 Assert . False ( string . IsNullOrEmpty ( response . Address ) ) ;
242242 Assert . Equal ( TestUtils . Address , response . Address ) ;
243243 }
@@ -258,21 +258,21 @@ public async Task TestListRequests()
258258 TestAccounts ( response . Create , true ) ;
259259 TestAccounts ( response . Import , true ) ;
260260 }
261-
261+
262262 [ Fact ]
263263 public async Task TestAddAccount ( )
264264 {
265265 var address = "43a1cERdj8rT1513tmMUY5MBcWbt1hgSo2fgLhoRrkYTPXejjRjU9y2WCjYfdZMLfZ6LKVc7YRGJMdtxD3x9Dtjc6fFjH9q" ;
266266 var viewKey = "4f8d491198f5219b80a03ae2be337b37ace5a4626c67e80a68beb7d0e3eaaa08" ;
267-
267+
268268 var accounts = await Lws . ListAccounts ( ) ;
269269 var found = accounts . Active . Find ( x => x . Address . Equals ( address ) ) ;
270270 if ( found != null )
271271 {
272272 // account already added
273273 return ;
274274 }
275-
275+
276276 var response = await Lws . AddAccount ( address , viewKey ) ;
277277 Assert . NotEmpty ( response . UpdatedAddresses ) ;
278278 Assert . Single ( response . UpdatedAddresses ) ;
@@ -295,7 +295,7 @@ public async Task TestModifyAccountStatus()
295295 Assert . Single ( response . UpdatedAddresses ) ;
296296 Assert . Equal ( TestUtils . Address , response . UpdatedAddresses . First ( ) ) ;
297297 }
298-
298+
299299 private static void TestTransaction ( MoneroLwsTransaction ? tx )
300300 {
301301 Assert . NotNull ( tx ) ;
@@ -336,7 +336,7 @@ private static void TestOutputs(List<MoneroLwsRandomOutput>? outputs)
336336 TestOutput ( output ) ;
337337 }
338338 }
339-
339+
340340 private static void TestOutput ( MoneroLwsRandomOutput ? output )
341341 {
342342 Assert . NotNull ( output ) ;
@@ -353,7 +353,7 @@ private static void TestOutputs(List<MoneroLwsOutput>? outputs)
353353 TestOutput ( output ) ;
354354 }
355355 }
356-
356+
357357 private static void TestOutput ( MoneroLwsOutput ? output )
358358 {
359359 Assert . NotNull ( output ) ;
@@ -368,15 +368,15 @@ private static void TestOutput(MoneroLwsOutput? output)
368368 Assert . False ( string . IsNullOrEmpty ( output . TxPrefixHash ) ) ;
369369 Assert . False ( string . IsNullOrEmpty ( output . TxPubKey ) ) ;
370370 Assert . False ( string . IsNullOrEmpty ( output . Timestamp ) ) ;
371-
371+
372372 if ( output . SpendKeyImages . Count > 0 )
373373 {
374374 foreach ( var keyImage in output . SpendKeyImages )
375375 {
376376 Assert . NotEmpty ( keyImage ) ;
377377 }
378378 }
379-
379+
380380 TestAddressMeta ( output . Recipient ) ;
381381 }
382382
@@ -388,7 +388,7 @@ private static void TestSpends(List<MoneroLwsSpend>? spends)
388388 TestSpend ( spend ) ;
389389 }
390390 }
391-
391+
392392 private static void TestSpend ( MoneroLwsSpend ? spend )
393393 {
394394 Assert . NotNull ( spend ) ;
@@ -399,7 +399,7 @@ private static void TestSpend(MoneroLwsSpend? spend)
399399 Assert . True ( spend . Mixin >= 0 ) ;
400400 TestAddressMeta ( spend . Sender ) ;
401401 }
402-
402+
403403 private static void TestSubaddrs ( MoneroLwsSubaddrs ? subaddrs , bool expectNew , bool expectAll )
404404 {
405405 if ( subaddrs == null )
@@ -418,7 +418,7 @@ private static void TestSubaddrs(MoneroLwsSubaddrs? subaddrs, bool expectNew, bo
418418 {
419419 Assert . NotNull ( subaddrs . AllSubaddrs ) ;
420420 Assert . NotEmpty ( subaddrs . AllSubaddrs ) ;
421- TestSubaddrsEntries ( subaddrs . AllSubaddrs ) ;
421+ TestSubaddrsEntries ( subaddrs . AllSubaddrs ) ;
422422 }
423423 }
424424
@@ -434,7 +434,7 @@ private static void TestSubaddrsEntries(List<MoneroLwsSubaddrsEntry>? entries)
434434 TestSubaddrsEntry ( entry ) ;
435435 }
436436 }
437-
437+
438438 private static void TestSubaddrsEntry ( MoneroLwsSubaddrsEntry ? entry )
439439 {
440440 Assert . NotNull ( entry ) ;
@@ -458,7 +458,7 @@ private static void TestIndexRange(List<long>? indexRange)
458458 Assert . Equal ( 2 , indexRange . Count ) ;
459459 var lowerBound = indexRange [ 0 ] ;
460460 var upperBound = indexRange [ 1 ] ;
461-
461+
462462 Assert . True ( lowerBound >= 0 ) ;
463463 Assert . True ( upperBound >= 0 ) ;
464464 Assert . True ( lowerBound <= upperBound ) ;
@@ -470,7 +470,7 @@ private static void TestAddressMeta(MoneroLwsAddressMeta? addressMeta)
470470 Assert . True ( addressMeta . MajIndex >= 0 ) ;
471471 Assert . True ( addressMeta . MinIndex >= 0 ) ;
472472 }
473-
473+
474474 private static void TestAccount ( MoneroLwsAccount ? account , bool request )
475475 {
476476 Assert . NotNull ( account ) ;
@@ -480,7 +480,7 @@ private static void TestAccount(MoneroLwsAccount? account, bool request)
480480 Assert . True ( account . StartHeight >= 0 ) ;
481481 return ;
482482 }
483-
483+
484484 Assert . True ( account . ScanHeight >= 0 ) ;
485485 Assert . True ( account . AccessTime >= 0 ) ;
486486 }
@@ -493,7 +493,7 @@ private static void TestAccounts(List<MoneroLwsAccount>? accounts, bool request)
493493 TestAccount ( account , request ) ;
494494 }
495495 }
496-
496+
497497 private static void TestAccounts ( List < MoneroLwsAccount > ? accounts )
498498 {
499499 TestAccounts ( accounts , false ) ;
0 commit comments