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

Custom notification standard #20

Open
Tarnadas opened this issue Aug 21, 2023 · 0 comments
Open

Custom notification standard #20

Tarnadas opened this issue Aug 21, 2023 · 0 comments

Comments

@Tarnadas
Copy link

Hey,
we already have many different notification types on the BOS.
See a list here:
https://near.social/mob.near/widget/WidgetSource?src=mob.near/widget/Notification.Item
However it would be good to include a custom component type for dapps.

I just recently developed a notification widget for a chess game, but if every dapp would want to add notifications, they would have to ask the respective gateway developers to update their widget. It would be good to provide a custom notification type.

I thought a lot about this and I think if we add a custom type to the current notification standard, then we would make it extremely easy to broadcast scams to many wallets. For a notification to be useful it should at least include an action item with a link or with a tx sign prompt. The way notifications work right now is that you can send any wallet any notification.
Possible solutions I could think of are:

  1. make it an on-chain whitelist

We could have a whitelist of notification items stored on the social.near contract, that can be updated via DAO proposals for dapps to add them to the list. Only specific versions of widgets should be added to the whitelist.

  1. create a new passive notified standard

Users would be able to be notified only if they actively allowed the dapp to do so by calling grant_write_permission on the social.near contract for <contractId>/index/notified. The dapp can then set this index on the user's key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant