private void Close()
 {
     _input = null;
     _taskCompletionSource.SetResult(false);
     _taskCompletionSource = null;
     StateHasChanged();
 }
 private void HandleValidSubmit()
 {
     DefaultsService.FeeLimit            = _input.FeeLimit;
     DefaultsService.TransactionDuration = TimeSpan.FromSeconds(_input.TransactionDuration);
     DefaultsService.ReceiptWaitDuration = TimeSpan.FromSeconds(_input.ReceiptWaitDuration);
     DefaultsService.ReceiptRetryCount   = _input.ReceiptRetryCount;
     _taskCompletionSource.SetResult(true);
     _taskCompletionSource = null;
     _input = null;
     StateHasChanged();
 }
 public Task <bool> PromptUpdateSettingsAsync()
 {
     _input = new UpdateSettingsDialogInput()
     {
         FeeLimit            = DefaultsService.FeeLimit,
         TransactionDuration = (int)DefaultsService.TransactionDuration.TotalSeconds,
         ReceiptWaitDuration = (int)DefaultsService.ReceiptWaitDuration.TotalSeconds,
         ReceiptRetryCount   = DefaultsService.ReceiptRetryCount
     };
     _taskCompletionSource = new TaskCompletionSource <bool>();
     StateHasChanged();
     return(_taskCompletionSource.Task);
 }