fix(creditcall): restore progress updates across transactions
This commit is contained in:
@@ -27,8 +27,6 @@ namespace Creditcall.ChipDna.Client
|
||||
|
||||
internal readonly TransactionProgressTap Progress = new TransactionProgressTap();
|
||||
|
||||
public void SuppressUncertainProgress() { Progress.Suppress(); }
|
||||
|
||||
private volatile bool voiceReferralRequired;
|
||||
private volatile bool voiceReferralDone;
|
||||
private readonly bool saveReceipt;
|
||||
@@ -245,13 +243,11 @@ namespace Creditcall.ChipDna.Client
|
||||
|
||||
parameters.Add(GetExtraParams("StartTransaction"));
|
||||
Console.WriteLine(parameters.ToString());
|
||||
Progress.Begin(reference);
|
||||
Response response = chipDnaClientLib.StartTransaction(parameters);
|
||||
|
||||
string errors;
|
||||
if (response.GetValue(ParameterKeys.Errors, out errors) && !string.IsNullOrEmpty(errors))
|
||||
{
|
||||
Progress.StartFailed(errors);
|
||||
var result = new Dictionary<string, string>
|
||||
{
|
||||
{ ParameterKeys.Errors, errors },
|
||||
@@ -1307,7 +1303,6 @@ namespace Creditcall.ChipDna.Client
|
||||
|
||||
private void ChipDnaClientLibOnTransactionFinished(object sender, EventParameters transactionFinishedEventArgs)
|
||||
{
|
||||
Progress.End();
|
||||
var result = new Dictionary<string, string>();
|
||||
var transactionFinishedStringBuilder = new StringBuilder();
|
||||
transactionFinishedStringBuilder.Append("Transaction Finished Event Parameters: ");
|
||||
@@ -1518,7 +1513,6 @@ namespace Creditcall.ChipDna.Client
|
||||
|
||||
private void ChipDnaClientLibOnErrorEvent(object sender, ClientHelperErrorEventArgs errorEventArgs)
|
||||
{
|
||||
Progress.SuppressIfActive();
|
||||
var result = new Dictionary<string, string>
|
||||
{
|
||||
{ ParameterKeys.Errors, errorEventArgs.RaisedException.Message}
|
||||
|
||||
Reference in New Issue
Block a user