From 269c39e4e68244d81bfdc37512419f01a9911def Mon Sep 17 00:00:00 2001 From: Tran Giang Long Date: Mon, 19 Feb 2024 19:41:21 +0700 Subject: [PATCH 1/3] feat(wormhole): ensure disabling --- .../Components/Crypto Accounts/CryptoAccountsViewModel.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift b/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift index 439196c52..5e7261e3b 100644 --- a/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift +++ b/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift @@ -152,6 +152,7 @@ final class CryptoAccountsViewModel: BaseViewModel, ObservableObject { case .tap: analyticsManager.log(event: .cryptoTokenClick(tokenName: renderableAccount.account.token.symbol)) case .extraButtonTap: + guard renderableAccount.status != .isClaiming else { return } analyticsManager.log(event: .cryptoClaimTransferredClick) navigation.send(.claim(renderableAccount.account, renderableAccount.userAction)) default: From dc08f23ed914233026abfa6eaa75197d00b1eb9d Mon Sep 17 00:00:00 2001 From: Tran Giang Long Date: Tue, 20 Feb 2024 18:09:31 +0700 Subject: [PATCH 2/3] feat: change default endpoint --- p2p_wallet/Common/Services/GlobalAppState.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/p2p_wallet/Common/Services/GlobalAppState.swift b/p2p_wallet/Common/Services/GlobalAppState.swift index 87d9a6751..4e1ba96f9 100644 --- a/p2p_wallet/Common/Services/GlobalAppState.swift +++ b/p2p_wallet/Common/Services/GlobalAppState.swift @@ -75,7 +75,7 @@ class GlobalAppState: ObservableObject { @Published var bridgeEndpoint: String = (Environment.current == .release) ? String.secretConfig("BRIDGE_PROD")! : - String.secretConfig("BRIDGE_DEV")! + String.secretConfig("BRIDGE_PROD")! @Published var tokenEndpoint: String = (Environment.current == .release) ? String.secretConfig("TOKEN_SERVICE_PROD")! : From 565a40c05c96e7a998dd751b489c05977761c413 Mon Sep 17 00:00:00 2001 From: Tran Giang Long Date: Tue, 20 Feb 2024 20:12:53 +0700 Subject: [PATCH 3/3] fix(wormhole): wrong screen --- .../Components/Crypto Accounts/CryptoAccountsViewModel.swift | 1 - .../Scenes/Main/Crypto/Container/CryptoCoordinator.swift | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift b/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift index 5e7261e3b..439196c52 100644 --- a/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift +++ b/p2p_wallet/Scenes/Main/Crypto/Components/Crypto Accounts/CryptoAccountsViewModel.swift @@ -152,7 +152,6 @@ final class CryptoAccountsViewModel: BaseViewModel, ObservableObject { case .tap: analyticsManager.log(event: .cryptoTokenClick(tokenName: renderableAccount.account.token.symbol)) case .extraButtonTap: - guard renderableAccount.status != .isClaiming else { return } analyticsManager.log(event: .cryptoClaimTransferredClick) navigation.send(.claim(renderableAccount.account, renderableAccount.userAction)) default: diff --git a/p2p_wallet/Scenes/Main/Crypto/Container/CryptoCoordinator.swift b/p2p_wallet/Scenes/Main/Crypto/Container/CryptoCoordinator.swift index 4eda5fbb2..df93e811f 100644 --- a/p2p_wallet/Scenes/Main/Crypto/Container/CryptoCoordinator.swift +++ b/p2p_wallet/Scenes/Main/Crypto/Container/CryptoCoordinator.swift @@ -154,7 +154,7 @@ final class CryptoCoordinator: Coordinator { .map { _ in () } .eraseToAnyPublisher() case let .claim(account, userAction): - if let userAction, userAction.status == .processing { + if let userAction, userAction.status != .ready { return coordinate(to: TransactionDetailCoordinator( viewModel: .init(userAction: userAction), presentingViewController: navigationController @@ -169,7 +169,7 @@ final class CryptoCoordinator: Coordinator { ) ) .handleEvents(receiveOutput: { [weak self] result in - guard let self = self else { return } + guard let self else { return } switch result { case let .claiming(pendingTrx): self.coordinate(