Skip to content

Commit c6d3a64

Browse files
committed
fix: restore quarter button behaviour
1 parent 9b87893 commit c6d3a64

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Bitkit.xcodeproj/xcshareddata/xcschemes/BitkitAITests.xcscheme

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@
3131
shouldAutocreateTestPlan = "YES">
3232
<Testables>
3333
<TestableReference
34-
skipped = "NO"
35-
parallelizable = "NO">
34+
skipped = "NO">
3635
<BuildableReference
3736
BuildableIdentifier = "primary"
3837
BlueprintIdentifier = "96FE1F7B2C2DE6AC006D0C8B"

Bitkit/Views/Transfer/SpendingAmount.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ struct SpendingAmount: View {
146146

147147
NumberPadActionButton(text: t("lightning__spending_amount__quarter")) {
148148
guard let max = maxTransferAmount else { return }
149-
amountViewModel.updateFromSats(max / 4, currency: currency)
149+
let quarter = UInt64(wallet.spendableOnchainBalanceSats) / 4
150+
amountViewModel.updateFromSats(min(quarter, max), currency: currency)
150151
}
151152
.accessibilityIdentifier("SpendingAmountQuarter")
152153

0 commit comments

Comments
 (0)