fix: replace zap slider with common amount pills #296
Reference in New Issue
Block a user
Delete Branch "userAdityaa/flotilla:295-zap-amount-pills"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Replaces the log-scale zap amount slider with preset amount pills in both zap modals.
Before: Zap and ZapInvoice modals used a logarithmic range slider (21–1,000,000 sats) synced bidirectionally with a number input via

$effecthooks.After: Common Nostr zap amounts (21, 100, 1,000, 10,000 sats) are shown as selectable pills. The number input remains for custom amounts. Default is still 21 sats.

Closes #295.
Let's also add custom zap amounts as a setting under "wallet". Default to 21, 210, 2100, 21000, and allow the user to add/remove options.
cf6380a2a6to954df262e7ok, added a custom zap amounts as setting under "wallet".

@@ -122,3 +107,2 @@let pos = $state(minPos)let amount = $state(minVal)let amount = $state(zapAmounts.get()[0])first($zapAmounts) ?? 21.@@ -111,1 +111,4 @@export const defaultZapAmounts = [21, 210, 2100, 21000]export const zapAmounts = withGetter(writable([...defaultZapAmounts]))Add this to defaultSettings.
@@ -81,0 +115,4 @@if (amounts.length === 0) {return pushToast({theme: "error",message: "Add at least one zap amount greater than zero.",Separate this out into length and >0 checks so the message can be tailored to each case.
954df262e7tocf823be669View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.