* Add Random link and basic query
* Use random
* refine random sort query
* make vote threshold higher
---------
Co-authored-by: k00b <k00b@stacker.news>
* Use custom relay API
Relay from nostr-tools was cumbersome to use. This custom abstraction over window.WebSocket makes interacting with nostr relays easier.
* Use variables for nostr message parts
* Fix NWC save
* Use try/finally
* Refactor crossposting code
* use custom replay API
* simplify callWithTimeout
* Use isomorphic-ws for nip57 zap receipts
* Use async map
* Reject with timeout error
* Move time functions into lib/time
* Remove outdated comment regarding relay.close()
* blink attachment
* support staging
* add staging dashboard link
* Revert "add staging dashboard link"
This reverts commit a43fa2204f03d74e733063aedd6862c6d71e4a46.
* Revert "support staging"
This reverts commit 93c15aa5083e60b1dafc77c30e999fb90fef8589.
* handle pending payments, code cleanup and comments
* stable sats -> stablesats
* catch HTTP errors
* print wallet currency in debug
* disable autocomplete
* schema without test()
* Fix save since default is not applied for empty strings
Formik validation must see 'currency' as undefined and apply the default but the validation before save sees an empty string.
* Save transformed config
* Remove unnecessary defaults
* Prefix HTTP error with text
---------
Co-authored-by: ekzyis <ek@stacker.news>
* Generate more code from wallet defs
* generate "type WalletLND { ... }"
* generate "union WalletDetails = WalletLND | ..."
* hardcode function for __resolveType
* add comments where updates are needed if another server wallet is added
* Fix type for LN addresses
* Generate __resolveType from wallet.type column
Every wallet returned by the useWallet hook has sendPayment set even if it doesn't support payments since wallet.sendPayment is wrapped with a useCallback hook.
* not-custodial zap scaffolding
* invoice forward state machine
* small refinements to state machine
* make wrap invoice work
* get state machine working end to end
* untested logic layout for paidAction invoice wraps
* perform pessimisitic actions before outgoing payment
* working end to end
* remove unneeded params from wallets/server/createInvoice
* fix cltv relative/absolute confusion + cancelling forwards
* small refinements
* add p2p wrap info to paidAction docs
* fallback to SN invoice when wrap fails
* fix paidAction retry description
* consistent naming scheme for state machine
* refinements
* have sn pay bounded outbound fee
* remove debug logging
* reenable lnc permissions checks
* don't p2p zap on item forward splits
* make createInvoice params json encodeable
* direct -> p2p badge on notifications
* allow no tls in dev for core lightning
* fix autowithdraw to create invoice with msats
* fix autowithdraw msats/sats inconsitency
* label p2p zaps properly in satistics
* add fees to autowithdrawal notifications
* add RETRYING as terminal paid action state
* Update api/paidAction/README.md
Co-authored-by: ekzyis <ek@stacker.news>
* Update api/paidAction/README.md
Co-authored-by: ekzyis <ek@stacker.news>
* Update api/lnd/index.js
Co-authored-by: ekzyis <ek@stacker.news>
* ek suggestions
* add bugetable to nwc card
* get paranoid with numbers
* better finalize retries and better max timeout height
* refine forward failure transitions
* more accurate satistics p2p status
* make sure paidaction cancel in state machine only
* dont drop bolt11s unless status is not null
* only allow PENDING_HELD to transition to FORWARDING
* add mermaid state machine diagrams to paid action doc
* fix cancel transition name
* cleanup readme
* move forwarding outside of transition
* refine testServerConnect and make sure ensureB64 transforms
* remove unused params from testServerConnect
---------
Co-authored-by: ekzyis <ek@stacker.news>
Co-authored-by: k00b <k00b@stacker.news>
* Support receiving with LNbits
* Remove hardcoded LNbits url on server
* Fix saveConfig ignoring save errors
* saveConfig was meant to only ignore validation errors, not save errors
* on server save errors, we redirected as if save was successful
* this is now fixed with a promise chain
* logging payments vs receivals was also moved to correct place
* Fix enabled falsely disabled on SSR
If a wallet was configured for payments but not for receivals and you refreshed the configuration form, enabled was disabled even though payments were enabled.
This was the case since we don't know during SSR if it's enabled since this information is stored on the client.
* Fix missing 'receivals disabled' log message
* Move 'wallet detached for payments' log message
* Fix stale walletId during detach
If page was reloaded, walletId in clearConfig was stale since callback dependency was missing.
* Add missing callback dependencies for saveConfig
* Verify that invoiceKey != adminKey
* Verify LNbits keys are hex-encoded
* Fix local config polluted with server data
* Fix creation of duplicate wallets
* Remove unused dependency
* Fix missing error message in logs
* Fix setPriority
* Rename: localConfig -> clientConfig
* Add description to LNbits autowithdrawals
* Rename: receivals -> receives
* Use try/catch instead of promise chain in saveConfig
* add connect label to lnbits for no url found for lnbits
* Fix adminKey not saved
* Remove hardcoded LNbits url on server again
* Add LNbits ATTACH.md
* Delete old docs to attach LNbits with polar
* Add missing callback dependencies
* Set editable: false
* Only set readOnly if field is configured
---------
Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
* Only validate tipRandom if enabled
* Use consistent naming scheme for zap settings
---------
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>