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

[core-v2.3.0-alpha.1] : Feature - Transaction notifications #1070

Merged
merged 124 commits into from
Jun 20, 2022

Conversation

Adamj1232
Copy link
Member

@Adamj1232 Adamj1232 commented Jun 15, 2022

Description

This PR includes the new Transaction Notification feature that will act similar to Notify V1 in that when a wallet connects through Onboard a subscription will be setup through the new MultiChain SDK to watch and notify on all transactions associated with that address.
By default, is Account Center is enabled and there is a DApp ID notifications are enabled.
When switching chains the listener will continue to watch on the previous chain for 60 seconds to capture any remaining notifications and then the subscription will close on the previous chain for all connected accounts.
Notifications can be customized through 3 routes (all visible in the demo code):

  • transactionHandler : Callback function that allows customizing notification based on transaction event properties
  • i18n : Customize verbiage based on set event types in the i18n folder
  • onboard.state.actions.customNotifications method which returns an update and dismiss method for further control

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • This PR passes the Circle CI checks

Copy link
Contributor

@taylorjdawson taylorjdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approve with a few comments!

@@ -3,7 +3,7 @@
"version": "2.0.2",
"private": true,
"workspaces": [
"./packages/*"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Adamj1232 What did removing the ./ prefix resolve?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@taylorjdawson Im not too sure, @aaronbarnardsound added that

packages/core/README.md Outdated Show resolved Hide resolved
packages/core/README.md Outdated Show resolved Hide resolved
packages/core/README.md Outdated Show resolved Hide resolved
packages/core/README.md Outdated Show resolved Hide resolved
packages/core/README.md Outdated Show resolved Hide resolved
- `Notification.link` - add link to hash
- `Notification.onClick()` - notification body click event

Notify can also be completely styled by using the CSS variables found below. These are setup to allow for maximum customization with base styling variables setting to global the global more themed styling (i.e. `--onboard-grey-600`) as well as a more precise component level styling available (`--notify-onboard-grey-600`) with the latter taking precedent if defined
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are setup to allow for maximum customization with base styling variables setting to global the global more themed styling

@Adamj1232 this sentence is a little confusing I think 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sentence makes 0 sense, lol thanks for pointing that out!

packages/core/README.md Outdated Show resolved Hide resolved
packages/core/README.md Show resolved Hide resolved
packages/demo/src/App.svelte Outdated Show resolved Hide resolved
Adamj1232 and others added 5 commits June 17, 2022 10:43
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Adamj1232 and others added 4 commits June 17, 2022 10:47
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
Co-authored-by: Taylor Dawson <taylorjdawson@gmail.com>
packages/core/README.md Outdated Show resolved Hide resolved
@Adamj1232 Adamj1232 merged commit 14facf1 into v2-web3-onboard-develop Jun 20, 2022
@Adamj1232 Adamj1232 deleted the feature/transaction-notifications branch June 20, 2022 16:51
@Adamj1232 Adamj1232 mentioned this pull request Jun 21, 2022
4 tasks
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

Successfully merging this pull request may close these issues.

4 participants