From b7bf7423d7c6a460fff6fe52a8fdad75baa99e33 Mon Sep 17 00:00:00 2001 From: just-software-dev Date: Mon, 14 Oct 2024 01:03:18 -0300 Subject: [PATCH] [trello.com/c/CdfJ7GTd] AdamantTransactionStatusService crash fix --- .../AdamantTransactionStatusService.swift | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Adamant/Services/AdamantTransactionStatusService.swift b/Adamant/Services/AdamantTransactionStatusService.swift index ba7da72bc..e02cf5fa3 100644 --- a/Adamant/Services/AdamantTransactionStatusService.swift +++ b/Adamant/Services/AdamantTransactionStatusService.swift @@ -72,12 +72,26 @@ private extension AdamantTransactionStatusService { let blockchain: String } - struct RichTransferData { + final class RichTransferData { let provider: WalletService var status: TransactionStatus var transactions: [String: RichMessageTransaction] var oldPendingAttempts: Int var subscription: AnyCancellable? + + init( + provider: WalletService, + status: TransactionStatus, + transactions: [String: RichMessageTransaction], + oldPendingAttempts: Int, + subscription: AnyCancellable? = nil + ) { + self.provider = provider + self.status = status + self.transactions = transactions + self.oldPendingAttempts = oldPendingAttempts + self.subscription = subscription + } } enum TransactionStatusState {