Skip to content

Commit d452354

Browse files
authored
Merge pull request #597 from CypherPoet/fix/transfer-activity-explore-button
fix: restore Explore button on transfers
2 parents 1f9d041 + 1079e78 commit d452354

2 files changed

Lines changed: 26 additions & 21 deletions

File tree

Bitkit/Views/Wallets/Activity/ActivityItemView.swift

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -566,33 +566,37 @@ struct ActivityItemView: View {
566566
}
567567
.accessibilityIdentifier(boostButtonIdentifier)
568568

569-
if isTransfer, let channelId = transferChannelId {
570-
CustomButton(
571-
title: t("lightning__connection"), size: .small,
572-
icon: Image("bolt-hollow")
573-
.foregroundColor(accentColor),
574-
shouldExpand: true
575-
) {
576-
navigation.navigate(.connectionDetail(channelId: channelId))
577-
}
578-
.accessibilityIdentifier("ChannelButton")
579-
} else {
580-
CustomButton(
581-
title: t("wallet__activity_explore"), size: .small,
582-
icon: Image("branch")
583-
.foregroundColor(accentColor),
584-
shouldExpand: true
585-
) {
586-
navigation.navigate(.activityExplorer(viewModel.activity))
587-
}
588-
.accessibilityIdentifier("ActivityTxDetails")
589-
}
569+
exploreButton
590570
}
591571
.frame(maxWidth: .infinity)
572+
573+
if isTransfer, let channelId = transferChannelId {
574+
CustomButton(
575+
title: t("lightning__connection"), size: .small,
576+
icon: Image("bolt-hollow")
577+
.foregroundColor(accentColor),
578+
shouldExpand: true
579+
) {
580+
navigation.navigate(.connectionDetail(channelId: channelId))
581+
}
582+
.accessibilityIdentifier("ChannelButton")
583+
}
592584
}
593585
.frame(maxWidth: .infinity)
594586
}
595587

588+
private var exploreButton: some View {
589+
CustomButton(
590+
title: t("wallet__activity_explore"), size: .small,
591+
icon: Image("branch")
592+
.foregroundColor(accentColor),
593+
shouldExpand: true
594+
) {
595+
navigation.navigate(.activityExplorer(viewModel.activity))
596+
}
597+
.accessibilityIdentifier("ActivityTxDetails")
598+
}
599+
596600
private func detachContact() async {
597601
do {
598602
try await activityList.setContact(nil, forPaymentId: viewModel.activityId)

changelog.d/next/361.fixed.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Channel close and transfer activities, including force closes, now offer an Explore button so the on-chain transaction ID and block explorer details are accessible.

0 commit comments

Comments
 (0)