Commit Graph

469 Commits

Author SHA1 Message Date
Nicolas Dorier
89c836e5f9 Add wallet policy support (#6765) 2025-07-16 09:06:11 +09:00
Israel Ulelu
b445f32b65 feat: exposed invoice accounting endpoint to facilitate refund on btcpayserver app project (#6818)
* feat: exposed invoice accounting endpoint to facilitate refund on btcpayserver app project

* merge from master

* refactor: optimizations

* refactor: added documentation, test assertions and renamed endpoint

* refactor: updated documentation based on code rabbit improvement suggestions

* refactor: updated refund properties terminology
2025-07-14 09:46:28 +09:00
nicolas.dorier
a130630042 Export all metadatas of invoices in the Legacy Invoice Export 2025-07-11 16:12:52 +09:00
Abhijay Jain
895d13c34e (Feat): Allowed Fallback Exchange Rate to Be Enabled via API (#6839)
Signed-off-by: Abhijay jain <Abhijay007j@gmail.com>
2025-07-10 10:58:59 +09:00
Nicolas Dorier
9b64e90394 Remove useless code (#6817)
* Remove unused code

* Obsolete SigningKey concept
2025-06-30 19:28:01 +09:00
Nicolas Dorier
49ab3b22a4 Simplify code (#6761) 2025-06-02 16:06:32 +09:00
rockstardev
9454a272c0 Merge pull request #6752 from btcpayserver/bugfix/flag-skip-email
Adding flag on Greenfield API Create User method to skip email invitation
2025-05-29 12:04:38 -05:00
Dennis Reimann
5b2b6d6994 Update email invite flag 2025-05-28 13:59:16 +02:00
Chukwuleta Tobechi
c483705761 Include amount paid on greenfield invoice (#6747)
* Include amount paid on greenfield invoice

* revert changes in invoice watcher

* Round up currency and include changes in swagger docs

* Add test

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2025-05-24 21:44:35 +09:00
rockstardev
49653c3388 Adding flag on Greenfield create user call to skip email invitation 2025-05-23 22:50:15 -05:00
nicolas.dorier
15ca966889 Fix warnings 2025-05-13 11:01:57 +09:00
Nicolas Dorier
1e79730c6e Implement store templates (#6704)
* Implement store templates

* Use the template for the default rate rules

* Polish messages

* Do not show exchange selection if template has a script
2025-05-09 15:58:24 +09:00
nicolas.dorier
9dc1aeda72 [Feature] Can configure fallback rates 2025-05-08 19:05:55 +09:00
Nicolas Dorier
41e1eb1be2 Do not reuse outpoint used in ongoing pending transactions (#6699) 2025-04-28 16:17:23 +09:00
Nicolas Dorier
dd6c4c771e Include XPubs in PSBTs for multi sig (#6696) 2025-04-24 21:36:09 +09:00
nicolas.dorier
5f908322c2 Make Rider a bit less verbose Code cleanup 2025-04-23 16:51:56 +09:00
Nicolas Dorier
a2d94a265b Fix: No need to select the Signing Key for signing through multi sig process (#6674) 2025-04-21 17:11:50 +09:00
rockstardev
c3998fdf34 Addressing PR review issues 2025-04-16 10:49:08 +09:00
d11n
1c921030dc Store users: Ensure the last owner cannot be downgraded (#6654)
* Store users: Ensure the last owner cannot be downgraded

Changes the behaviour of the `AddOrUpdateStoreUser` method to throw errors for the failure cases, so that the UI and API can report the actual problem. A role change might fail if the user already has that role or if they are the last owner of the store.

* Cleanup code

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2025-04-08 17:21:07 +09:00
Nicolas Dorier
ce83e4d96d Fix: PaymentRequests created via API never expires (#6657) 2025-04-08 14:17:31 +09:00
nicolas.dorier
c373f1e08f Refactor UserService.IsDisabled to a property 2025-04-04 16:42:27 +09:00
nicolas.dorier
ead74a985f Remove deprecated properties 2025-04-04 16:28:44 +09:00
d11n
a916ae81be Greenfield: Expand user data (#6649) 2025-04-04 16:15:33 +09:00
Nicolas Dorier
658ddd1f27 Fix: Refunds through API were ignoring BOLT11 expiration at store level (#6644) 2025-03-31 09:32:12 +09:00
nicolas.dorier
c3c6473e35 Disable cold wallet creation by default 2025-03-13 19:23:23 +09:00
nicolas.dorier
2911771f19 Feature: RBF and UX improvement to fee bumping 2025-03-11 17:44:18 +09:00
rockstardev
1da2cedffd Reverting changes, validate email only if it was provided 2025-03-05 22:49:07 -06:00
rockstardev
18852af241 Refactoring and commenting 2025-03-05 22:49:06 -06:00
rockstardev
8094800cfc IsMailboxAddress already checks for null, simplifying code 2025-03-05 22:49:06 -06:00
nicolas.dorier
be8ecb823e Refactor email endpoints 2025-03-05 22:49:06 -06:00
rockstardev
a7e3cbb105 Adding endpoint to set server email settings (#6601)
* Adding endpoint in Greenfield to allow server email settings

* Adding related swagger file

* Refactoring EmailSettingsData to be more readable

* Adding server email masking

* Adding tests

* Update BTCPayServer/wwwroot/swagger/v1/swagger.template.serveremail.json

Co-authored-by: d11n <mail@dennisreimann.de>

* Masking smtp server email returned over greenfield api and test

* Retaining password if password mask is used

* Remove magic string *****

* Flatten request for server's settings. Fix bug on shared setting instances

* Remove useless doc

* Simplify code

* Fix Store Email settings page

---------

Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2025-02-27 15:59:17 +09:00
nicolas.dorier
bbe95d780f Fix: Incorrect enabled value for v1/stores/{storeId}/payment-methods/{paymentMethod} 2025-01-21 17:48:37 +09:00
nicolas.dorier
d3d6b2d15c Make HtmlTags safer, properly sanitize in the view as well 2025-01-19 11:00:09 +09:00
Nicolas Dorier
92a92a7fff Rename and add to greenfield HtmlTags and HtmlMetaTags for apps (#6557) 2025-01-15 23:48:10 +09:00
d11n
637c06fc01 Greenfield: Improve invoice receipt (#6483)
Assembles and provides the same data as the UIInvoiceController. Merging the invoice's receipt options with the store ones was missing in Greenfield.
2024-12-23 09:25:05 +09:00
Nicolas Dorier
8acf1c2d62 Refactoring: Introduce IUrlHelper.ActionAbsolute (#6513) 2024-12-21 00:16:04 +09:00
d11n
44dc6499cd POS: Fix form redirect in conjunction with root path setting (#6506)
* POS: Fix form redirect in conjunction with root path setting

Fixes #6493 and also adds missing status messages on the forms pages.

* Fix other occurrences
2024-12-20 22:59:07 +09:00
d11n
d24e0cd1a2 Greenfield: Remove authorization requirement for app data (#6499)
As discussed with @NicolasDorier on Mattermost: Right now only store owners can access the app data, which doesn't contain sensitive info or something beyond what one would see as a regular customer. The app would need a way to access the data for roles other than `Owner` as well, e.g. `Employee`.
2024-12-19 09:54:28 +09:00
Dennis Reimann
fe3bccf3ce Greenfield: Resolve store user's image URL
Amendment to #6427.
2024-12-15 10:02:13 +01:00
d11n
00cc16455c App: Add events which the app subscribes to (#6435)
* App: Add events which the app subscribes to

Various events, which are relevant for the app to react to changes made on the server.

* Refactor events

* Do not extend NewBlockEvent

* Refactoring events

* Add store role events

* Refactoring: Rename StoreUserEvent

* Fix: Subscribe to UserEvent.Invited

---------

Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
2024-12-11 20:11:51 +09:00
d11n
898f0f4481 Greenfield: Improve store users API (#6427)
* Greenfield: Improve store users API

- Adds an endpoint to update store users (before they had to be removed ad re-added)
- Checks for the existance of a user and responds with 404 in that case (fixes #6423)
- Allows retrieval of user by user id or email for add and update (consistent with the other endpoints)
- Improves the API docs for the store users endpoints

* Swagger: Reuse UserIdOrEmail parameter component

* Add details to store user data
2024-12-02 15:35:33 +01:00
d11n
d3315c2fa6 Integrate mobile-working-branch part 1 (#6428) 2024-11-26 14:17:40 +09:00
d11n
d6211327db Greenfield: Users API fixes (#6425)
* Do not crash when creatuing users without password

* More precise error message for user approval toggling
2024-11-25 09:38:44 +09:00
nicolas.dorier
8e688b7f28 Fix: Getting notifications via API would crash 2024-11-14 21:53:37 +09:00
Nicolas Dorier
31b73f0d82 Fix: Boltcard would get bricked during reset from the balance view with wrong card (#6400) 2024-11-14 13:14:36 +09:00
Nicolas Dorier
fdbee350b8 Greenfield: Create Pull Request payoutMethods is now optional (#6396) 2024-11-13 18:31:55 +09:00
Nicolas Dorier
894f68f2ae Improve error messages for on-chain related greenfield operations (#6393)
* Improve error messages for on-chain related greenfield operations

* Fix test
2024-11-13 10:11:04 +09:00
d11n
a129114603 Greenfield: Add image upload for app items (#6226)
Upload endpoints for app item images. Follow-up to #6075.
Tested to work with the app item editor.

Uses UploadImage consistently in API and UI.
2024-11-07 10:43:22 +09:00
d11n
641bdcff31 Histograms: Add Lightning data and API endpoints (#6217)
* Histograms: Add Lightning data and API endpoints

Ported over from the mobile-working-branch.

Adds histogram data for Lightning and exposes the wallet/lightning histogram data via the API. It also add a dashboard graph for the Lightning balance.

Caveat: The Lightning histogram is calculated by using the current channel balance and going backwards through as much invoices and transactions as we have. The "start" of the LN graph data might not be accurate though. That's because we don't track (and not even have) the LN onchain data. It is calculated by using the current channel balance and going backwards through as much invoices and transactions as we have. So the historic graph data for LN is basically a best effort of trying to reconstruct it with what we have: The LN channel transactions.

* More timeframes

* Refactoring: Remove redundant WalletHistogram types

* Remove store property from dashboard tile view models

* JS error fixes
2024-11-05 21:40:37 +09:00
d11n
ff79a31066 Refactoring: Move AppItem to Client lib and use the class for item list (#6258)
* Refactoring: Move AppItem to Client lib and use the class for item list

This makes it available for the app, which would otherwise have to replicate the model. Also uses the proper class for the item/perk list of the app models.

* Remove unused app item payment methods property

* Do not ignore nullable values in JSON

* Revert to use Newtonsoft types
2024-11-05 11:49:30 +09:00