fix(creditcall): restore progress updates across transactions

This commit is contained in:
2026-11-16 14:27:45 +00:00
parent 3d4a765d5b
commit c8924bcbb9
4 changed files with 356 additions and 296 deletions
-6
View File
@@ -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}