Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wallet-backend): introduce web-monetization payment pointers #896

Merged
merged 30 commits into from
Oct 19, 2023

Conversation

beniaminmunteanu
Copy link
Member

@beniaminmunteanu beniaminmunteanu commented Oct 16, 2023

implements: #880

This PR introduces web monetization payment pointers. It also adds Caching over Redis.

@github-actions github-actions bot added package: wallet/backend Wallet backend implementations type: source Source changes labels Oct 16, 2023
@raducristianpopa raducristianpopa changed the base branch from main to hackathon October 17, 2023 04:27
add register key and revoke key to wmPaymentPointerService
move wm module out of paymentPointers directory
use revoke and register key in paymentPointerService to also apply changes to WMPaymentPointers
getAccounts for user now also returns wmPaymentPointers
getRafikiAsset can now receive an assetScale filter param along with the assetCode one
@github-actions github-actions bot added the package: wallet/frontend Wallet frontend implementations label Oct 18, 2023
@beniaminmunteanu beniaminmunteanu changed the title Wm payment pointers module feat(wallet-backend): introduce web-monetization payment pointers Oct 18, 2023
@beniaminmunteanu beniaminmunteanu marked this pull request as ready for review October 18, 2023 12:34
@beniaminmunteanu
Copy link
Member Author

beniaminmunteanu commented Oct 18, 2023

The Frontend changes just concat wmPaymentPointers with normal paymentPointers,so the code doesn't break.

@raducristianpopa @Tymmmy maybe you decide further on how you want to aggregate/segregate the data.
But the list payment pointers request now returns
{ wmPaymentPointers:[], paymentPointers:[] }
As per @raducristianpopa 's request

@beniaminmunteanu beniaminmunteanu merged commit 518dce0 into hackathon Oct 19, 2023
@beniaminmunteanu beniaminmunteanu deleted the wm-payment-pointers-module branch October 19, 2023 09:37
raducristianpopa pushed a commit that referenced this pull request Oct 24, 2023
* fix(wallet-backend): env parsing

* feat(wallet-backend) add caching

* fix(wallet-backend): docker-compose dev variable names

* feat(wallet-backend): introduce web monetized payment pointers module

* feat(wallet-backend): update balance now only does balance
add register key and revoke key to wmPaymentPointerService
move wm module out of paymentPointers directory

* feat(wallet-backend): WM payment pointers:
use revoke and register key in paymentPointerService to also apply changes to WMPaymentPointers
getAccounts for user now also returns wmPaymentPointers
getRafikiAsset can now receive an assetScale filter param along with the assetCode one

* chore(wallet-backend): remove comment

* fix(wallet-backend): wm get shouldn't throw

* chore(wallet-backend): wmPp get method refactor

* move wmPaymentPointerModel into paymentPointerModule

* move wmPaymentPointers to PaymentPointers

* add REDIS_URL to prod env.example

* cache service now has a generic type across the cache

* rename CacheService to Cache

* list now returns 2 arrays of wm or not wm paymentPointers

* update frontend to match list response

* remove leftover wmPaymentPointers relation on getAccounts

* format

* add concat on paymentPointers response to transactions list as well

* lint

* fix frontend error

* fix frontend error

* add redis_url default value in env

* accountId is now optional on Payment pointer  getByID

* update balance no longer needs accoutId

* format & errors

* resolve PR comments

* remove wmPaymentPointers from the account page payment pointers list

* format
raducristianpopa added a commit that referenced this pull request Oct 26, 2023
* feat(wallet/backend): add initial migrations for wm (#887)

* Add migrations

* Add new env variables

* Add models and debt column

* Format

* Update MAX_ASSET_SCALE value

* Update column name

* feat(wallet/frontend): specify payment pointer type (#893)

* Add option to use PP as WM-PP when creating

* PR review changes

* Update Checkbox.tsx

* PR changes

* PR changes

* feat(wallet-backend): introduce web-monetization payment pointers (#896)

* fix(wallet-backend): env parsing

* feat(wallet-backend) add caching

* fix(wallet-backend): docker-compose dev variable names

* feat(wallet-backend): introduce web monetized payment pointers module

* feat(wallet-backend): update balance now only does balance
add register key and revoke key to wmPaymentPointerService
move wm module out of paymentPointers directory

* feat(wallet-backend): WM payment pointers:
use revoke and register key in paymentPointerService to also apply changes to WMPaymentPointers
getAccounts for user now also returns wmPaymentPointers
getRafikiAsset can now receive an assetScale filter param along with the assetCode one

* chore(wallet-backend): remove comment

* fix(wallet-backend): wm get shouldn't throw

* chore(wallet-backend): wmPp get method refactor

* move wmPaymentPointerModel into paymentPointerModule

* move wmPaymentPointers to PaymentPointers

* add REDIS_URL to prod env.example

* cache service now has a generic type across the cache

* rename CacheService to Cache

* list now returns 2 arrays of wm or not wm paymentPointers

* update frontend to match list response

* remove leftover wmPaymentPointers relation on getAccounts

* format

* add concat on paymentPointers response to transactions list as well

* lint

* fix frontend error

* fix frontend error

* add redis_url default value in env

* accountId is now optional on Payment pointer  getByID

* update balance no longer needs accoutId

* format & errors

* resolve PR comments

* remove wmPaymentPointers from the account page payment pointers list

* format

* feat(wm): update webhook handling and transactions service (#906)

* feat(wm): update webhook handling and transactions service

* fix: change fetched user

* chore: add redis testing container

* chore: fix formatting

* chore: fix tests

* fix: handle failed outgoing payments

* feat: return ids and sum of transactions

* fix: add incoming transaction default values

* fix: remove value on creating wm transaction

* feat(wallet-frontend): Display wm payment pinters in separate list (#902)

* Add Web Monetization list

* Update PaymentPointerCard.tsx

* Update web-monetization.tsx

* List WM PPs

* Display WM PPs with balance, in tabs with account

* PR changes applied

* Update Tabs.tsx

* PR changhes

* Update SettingsTabs.tsx

* feat(wallet/backend): add wm payment pointer transactions worker (#905)

* Add Web Monetization list

* Update PaymentPointerCard.tsx

* Update web-monetization.tsx

* List WM PPs

* feat(wm): update webhook handling and transactions service

* fix: change fetched user

* chore: add redis testing container

* chore: fix formatting

* chore: fix tests

* fix: handle failed outgoing payments

* feat: return ids and sum of transactions

* Init worker

* Display WM PPs with balance, in tabs with account

* Progress

* PR changes applied

* Update Tabs.tsx

* PR changhes

* Update SettingsTabs.tsx

* Add to debt

* Progress

* Remove updateBalance method and fix transaction

* PR feedback

* Start server before running workers

* PR feedback

* Update asset check

---------

Co-authored-by: Tymmmy <[email protected]>
Co-authored-by: Dragos <[email protected]>

* fix(wallet/frontend): payment pointer format and focus (#932)

Update [accountId].tsx

* feat(wallet/frontend): add cookie name environment variable (#936)

* Add cookie name env variable

* Update middleware

* feat(wallet): WM only for USD accounts (#938)

WM only for USD accounts

---------

Co-authored-by: Timea <[email protected]>
Co-authored-by: xplicit <[email protected]>
Co-authored-by: dragosp1011 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: wallet/backend Wallet backend implementations package: wallet/frontend Wallet frontend implementations type: source Source changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants