Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit fd24b86

Browse files
DRadmirclaude
andcommitted
Refactor WalletConnector loading state to remove redundant computed properties
🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9096fac commit fd24b86

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

Features/WalletConnector/Sources/WalletConnector/Scenes/ConnectionsScene.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public struct ConnectionsScene: View {
2222
ButtonListItem(
2323
title: model.pasteButtonTitle,
2424
image: Images.System.paste,
25-
isLoading: model.isPasteLoading,
25+
isLoading: model.loadingAction == .paste,
2626
action: model.onPaste
2727
)
2828
ButtonListItem(
2929
title: model.scanQRCodeButtonTitle,
3030
image: Images.System.qrCode,
31-
isLoading: model.isScanLoading,
31+
isLoading: model.loadingAction == .scan,
3232
action: model.onScan
3333
)
3434
}

Features/WalletConnector/Sources/WalletConnector/ViewModels/ConnectionsViewModel.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@ public final class ConnectionsViewModel {
2424
var connections: [WalletConnection] = []
2525
var isPresentingScanner: Bool = false
2626
var isPresentingAlertMessage: AlertMessage?
27-
2827
var loadingAction: LoadingAction?
29-
var isPasteLoading: Bool { loadingAction == .paste }
30-
var isScanLoading: Bool { loadingAction == .scan }
3128

3229
public init(
3330
service: ConnectionsService,

0 commit comments

Comments
 (0)