Commit Graph

2010 Commits

Author SHA1 Message Date
William Casarin
47a74257c8 nwc debugging 2023-05-24 15:16:45 -07:00
William Casarin
1b161fefd0 nwc: make sure to support nostr+walletconnect scheme
not sure why we have 2 schemes
2023-05-15 12:54:42 -07:00
William Casarin
0b9a274e67 postbox: change initial retry_after from 2 to 10 seconds 2023-05-15 12:54:09 -07:00
William Casarin
2bbbb5db65 Fix a few bugs with donations 2023-05-15 12:53:36 -07:00
William Casarin
bffa42a13a Supporter Badges 2023-05-15 11:57:37 -07:00
William Casarin
8097cfdfb8 Include donation_amount on profile 2023-05-15 09:59:51 -07:00
William Casarin
af912b1a0e v1.5-1 2023-05-15 09:59:22 -07:00
William Casarin
51cd34c9c2 c: move parse_digit to remove warning 2023-05-15 09:59:10 -07:00
William Casarin
a6745af519 Implement damus zap split donations using NWC 2023-05-15 09:41:26 -07:00
William Casarin
631220fdcb ui: add support damus ui in WalletView
This appears after you've connected your wallet
2023-05-14 22:24:12 -07:00
William Casarin
5aa0d6c3e1 settings: add donation_percent to settings
This will be used in damus donations splits
2023-05-14 22:24:12 -07:00
f9982e992a Migrate away from sticky deprecated non-pubkey-scoped settings
Changelog-Fixed: Migrate away from sticky deprecated non-pubkey-scoped settings
Closes: #1124
2023-05-14 21:08:56 -07:00
transifex-integration[bot]
0eaebb80f1 Apply translations
in:

- nl
- de
- cs
- hu_HU
- sv_SE
- ar
- fa
- pl_PL
- ja

Closes: #1122
2023-05-14 21:06:20 -07:00
6f23b69f2c Export strings for translation 2023-05-14 20:54:13 -07:00
William Casarin
ec50c75062 ui: expose raw LinearGradient in DamusGradient
This will be used in background-fill applications
2023-05-14 20:47:53 -07:00
William Casarin
0293b61d7a Rename 'Connect to Alby' to 'Attach Alby Wallet' 2023-05-14 14:07:04 -07:00
50e4452016 Fix nostr URL scheme to open properly even if there's already a different view open
Closes: #1130
Changelog-Fixed: Fix nostr URL scheme to open properly even if there's already a different view open
2023-05-14 11:36:46 -07:00
William Casarin
a30a79b1fc Fix tests 2023-05-14 11:20:28 -07:00
William Casarin
60260ae53b nwc: make delay 5 seconds instead of 3 2023-05-14 11:11:27 -07:00
William Casarin
1fff0abce5 Make it easier to tap zap button
Right now the tap target only covered the bolt, now it's bolt+amount
2023-05-14 11:04:56 -07:00
William Casarin
b1fee253b4 nwc: fix bug where private nwc zaps weren't getting tracked properly
It was using the wrapper zap request id instead of the inner id. Fix
this type error by creating a ZapRequestId wrapper that makes sure it
uses the proper request id.
2023-05-14 10:52:37 -07:00
William Casarin
e472e559a5 nwc: don't use yellow on the Zap Button for pending zaps
I just find this stressful
2023-05-14 10:49:54 -07:00
William Casarin
0091df8f77 nwc: fix broken test 2023-05-14 10:49:54 -07:00
William Casarin
d0c67237dd nwc: remove requests from postbox
Since these are ephemeral events, there will never be command results,
so we need to remove them manually on NWC responses or else it will keep
trying to send them.

We should probably handle this for all ephemeral events in the postbox
somehow. We probably shouldn't use the postbox for ephemeral events
without response events.
2023-05-14 10:49:54 -07:00
William Casarin
1313880574 Add release Damus build scheme 2023-05-14 10:49:54 -07:00
William Casarin
122b528407 Add rigid haptic feedback when you zap cancel fails
This feels different than the soft haptic feedback so it should let
people know that cancelling is no longer possible
2023-05-14 10:49:54 -07:00
William Casarin
02d99f7340 postbox: try flushing events every second
relying on network activity for flushing is not reliable and is causing
delays in zapping
2023-05-14 10:49:54 -07:00
William Casarin
8fb5b4f49c misc logs 2023-05-14 00:03:51 -07:00
William Casarin
ae4d9ab8ba nwc: make delay 3 seconds instead of 5 2023-05-14 00:03:51 -07:00
William Casarin
85262e1a4e nwc: fix response parsing 2023-05-14 00:03:51 -07:00
William Casarin
64a224135a nwc: always allow long press zap 2023-05-13 23:54:02 -07:00
William Casarin
69fc6694f1 nwc: turn pending zap orange when we have a NWC success
Orange means payment successful now, not just presence of zap

This introduces a paid pending state, which shows up as an orange timer
thing in the zaps view. This can be useful if the zap is never sent. We
don't want the user to think the payment didn't go through.
2023-05-13 23:30:03 -07:00
William Casarin
03691d0369 Pending Zaps
A fairly large change that replaces Zaps in the codebase with "Zapping"
which is a tagged union consisting of a resolved Zap and a Pending Zap.
These are both counted as Zaps everywhere in Damus, except pending zaps
can be cancelled (most of the time).
2023-05-13 21:33:34 -07:00
William Casarin
1518a0a16c zaps: ensure returned bolt11 is the correct amount 2023-05-13 19:51:06 -07:00
William Casarin
dafa1ba4de test: add nwc and ephemeral relay test
This ensures that when paying with nwc, we get an ephemeral relay added
and a request queued in the postbox.
2023-05-10 16:24:02 -07:00
William Casarin
bb32d72903 nwc: clear the zapper cache for our pubkey when we attach a new wallet 2023-05-10 14:07:24 -07:00
William Casarin
f77a7bcb29 ui: show lud16 in attach wallet ui 2023-05-10 14:07:24 -07:00
William Casarin
5cce18c8b6 nwc: attach lud16 to profile when attaching wallet 2023-05-10 14:07:24 -07:00
William Casarin
a5726d4650 nwc: add lud16 parameter
This will be used for auto-setting up the lightning wallet

See https://github.com/nostr-protocol/nips/pull/513
2023-05-10 14:07:24 -07:00
William Casarin
370a5feb4e ui: add Nostr Wallet Connect views 2023-05-10 14:07:24 -07:00
William Casarin
fe3d976cdb nwc: pay with nwc if we have it configured 2023-05-10 14:07:24 -07:00
William Casarin
996312cf1c settings: Add nostr_wallet_connect setting
Stored in the keychain for security
2023-05-10 14:07:24 -07:00
William Casarin
d0216bbce6 nwc: Add WalletModel
This model will be used for controlling the logic in the Wallet views
2023-05-10 14:07:24 -07:00
William Casarin
4d2b79057d nwc: add Nostr Wallet Connect logic
- WalletConnectURL parses nostrwalletconnect:// urls
- Add support for parsing and creating NWC requests
2023-05-10 14:07:24 -07:00
William Casarin
ca2bf20eb7 info: add nostrwalletconnect uri handlers
We will need this to handle nostrwalletconnect:// links
2023-05-10 14:07:24 -07:00
William Casarin
9093bdec2d home: add some more helper functions 2023-05-10 14:07:24 -07:00
William Casarin
baed6adf49 refactor: ensure make_metadata_event has full keypair 2023-05-10 14:07:23 -07:00
William Casarin
f068833c5e colors: add adaptableBlack
Used in template icons
2023-05-10 14:07:23 -07:00
William Casarin
c3808cd21f icons: convert to template images 2023-05-10 14:07:23 -07:00
William Casarin
acbd09bf6f ------ ephemeral relays -------
Add docs
2023-05-10 13:31:53 -07:00