Skip to content

Commit 8dcc162

Browse files
committed
AssetButton
1 parent 73dbd4f commit 8dcc162

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Bitkit/Views/Wallets/Send/SendAmountView.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ struct SendAmountView: View {
2020
app.scannedOnchainInvoice != nil && app.scannedLightningInvoice != nil
2121
}
2222

23+
private var assetButtonTestIdentifier: String {
24+
if canSwitchWallet {
25+
return "switch"
26+
}
27+
return app.selectedWalletToPayFrom == .lightning ? "spending" : "savings"
28+
}
29+
2330
/// The amount to display in the available balance section
2431
/// For onchain transactions, this shows the max sendable amount (balance minus fees)
2532
/// For lightning transactions, this shows the max sendable lightning amount minus routing fees
@@ -92,6 +99,7 @@ struct SendAmountView: View {
9299
app.selectedWalletToPayFrom.toggle()
93100
}
94101
}
102+
.accessibilityIdentifier("AssetButton-\(assetButtonTestIdentifier)")
95103

96104
NumberPadActionButton(
97105
text: currency.primaryDisplay == .bitcoin ? "Bitcoin" : currency.selectedCurrency,

0 commit comments

Comments
 (0)