File tree Expand file tree Collapse file tree
src/ByteSync.Client/ViewModels/TrustedNetworks Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- using System . Diagnostics . CodeAnalysis ;
1+ using System . Diagnostics . CodeAnalysis ;
22using System . Reactive ;
33using System . Reactive . Disposables ;
44using System . Reactive . Linq ;
@@ -279,13 +279,13 @@ private async Task ValidateClient()
279279 _publicKeysManager . Trust ( TrustedPublicKey ) ;
280280
281281 ShowSuccess = true ;
282- await Task . Delay ( TimeSpan . FromSeconds ( 3 ) ) ;
282+ await DelayAsync ( TimeSpan . FromSeconds ( 3 ) ) ;
283283 ShowSuccess = false ;
284284 }
285285 else
286286 {
287287 ShowError = true ;
288- await Task . Delay ( TimeSpan . FromSeconds ( 3 ) ) ;
288+ await DelayAsync ( TimeSpan . FromSeconds ( 3 ) ) ;
289289 ShowError = false ;
290290 }
291291
@@ -309,7 +309,7 @@ private async Task RejectClient()
309309 var task2 = _publicKeysTruster . OnPublicKeyValidationCanceled ( PublicKeyCheckData ! , TrustDataParameters ) ;
310310
311311 ShowError = true ;
312- await Task . Delay ( TimeSpan . FromSeconds ( 3 ) ) ;
312+ await DelayAsync ( TimeSpan . FromSeconds ( 3 ) ) ;
313313 ShowError = false ;
314314
315315 await Task . WhenAll ( task , task2 ) ;
@@ -330,6 +330,8 @@ private async Task Cancel()
330330 await _publicKeysTruster . OnPublicKeyValidationCanceled ( PublicKeyCheckData ! , TrustDataParameters ) ;
331331 }
332332
333+ protected virtual Task DelayAsync ( TimeSpan delay ) => Task . Delay ( delay ) ;
334+
333335 private string [ ] BuildSafetyWords ( )
334336 {
335337 var safetyWordsComputer = new SafetyWordsComputer ( SafetyWordsValues . AVAILABLE_WORDS ) ;
You can’t perform that action at this time.
0 commit comments