Skip to content

Add browser notifications for wallet transactions#1095

Open
jinhojang6 wants to merge 29 commits intomainfrom
wallet-notifications
Open

Add browser notifications for wallet transactions#1095
jinhojang6 wants to merge 29 commits intomainfrom
wallet-notifications

Conversation

@jinhojang6
Copy link
Copy Markdown
Collaborator

@jinhojang6 jinhojang6 commented Apr 7, 2026

Summary

  • add browser notifications for wallet transactions
  • notify users when a transaction is sent, confirmed, or failed
  • add a Settings page(/page.html#/settings, top-right corner gear icon) and toggle to enable or disable transaction notifications. Implemented this feature based on conventional assumption, but it is okay to remove it and enable the notifications always.
Screenshot 2026-04-09 at 10 35 07 PM
  • add background monitoring for pending transactions to avoid duplicate alerts

In the same tab:
Screenshot 2026-04-08 at 11 55 25 PM


In a different tab:
Screenshot 2026-04-08 at 11 57 26 PM

Relevant issue

#930

Testing guide

  1. Start a local chain:
    anvil --host 0.0.0.0 --port 8545 --chain-id 31337 --block-time 1

  2. Fetch the testing commit and cherry-pick it for local chain testing:
    git fetch origin wallet-notifications-anvil && git cherry-pick b11fe716be9dc053c70a2508af35e1cbded7659a

  3. Run the extension and import the default Anvil recovery phrase in the wallet:
    test test test test test test test test test test test junk

    If there is no ETH, click Receive and copy the current wallet address, and fund it on Anvil:
    cast rpc anvil_setBalance <YOUR_WALLET_ADDRESS> 0x8AC7230489E80000 --rpc-url http://127.0.0.1:8545

    Verify the funded balance:
    cast balance <YOUR_WALLET_ADDRESS> --rpc-url http://127.0.0.1:8545

    Then send ETH in the wallet UI to another Anvil address like
    0x70997970C51812dc3A010C7d01b50e0d17dc79C8

  4. Verify that a browser notification appears when the transaction is sent.

  5. Keep the wallet unfocused or switch to another tab, and verify that a confirmation notification still appears after the transaction is mined.

  6. Disable transaction notifications in settings, send another transaction, and verify that no browser notification is shown.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

7 Skipped Deployments
Project Deployment Actions Updated (UTC)
community-dapp-new Ignored Ignored Preview Apr 16, 2026 2:50pm
status-api Ignored Ignored Preview Apr 16, 2026 2:50pm
status-components Ignored Ignored Preview Apr 16, 2026 2:50pm
status-network-hub Ignored Ignored Preview Apr 16, 2026 2:50pm
status-network-website Ignored Ignored Preview Apr 16, 2026 2:50pm
status-portfolio Ignored Ignored Preview Apr 16, 2026 2:50pm
status-website Ignored Ignored Preview Apr 16, 2026 2:50pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 7, 2026

🦋 Changeset detected

Latest commit: 3c0dac0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wallet Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@status-im-auto
Copy link
Copy Markdown
Member

status-im-auto commented Apr 7, 2026

Jenkins Builds

Click to see older builds (18)
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ be8fc90 1 2026-04-07 20:01:47 ~1 min wallet 📦zip
✔️ dec6bd7 2 2026-04-08 15:13:04 ~1 min wallet 📦zip
✔️ f3fddf0 5 2026-04-08 15:23:23 ~1 min wallet 📦zip
✔️ f3d5b79 6 2026-04-08 15:27:39 ~1 min wallet 📦zip
✔️ 583fff4 7 2026-04-09 13:53:02 ~6 min wallet 📦zip
✔️ 50ec9f0 8 2026-04-09 13:54:36 ~1 min wallet 📦zip
✔️ 3a34085 9 2026-04-09 14:19:42 ~48 sec connector 📦zip
✔️ 3a34085 9 2026-04-09 14:20:29 ~1 min wallet 📦zip
✔️ f0d18bd 10 2026-04-13 15:56:50 ~1 min wallet 📦zip
✔️ b9e3add 11 2026-04-13 16:03:12 ~1 min wallet 📦zip
✔️ fe50c3a 12 2026-04-13 16:22:04 ~1 min wallet 📦zip
✔️ 69f43be 13 2026-04-13 16:42:06 ~1 min wallet 📦zip
✔️ 33eda97 14 2026-04-13 16:43:37 ~1 min wallet 📦zip
✔️ effa64c 16 2026-04-14 21:20:02 ~44 sec connector 📦zip
✔️ effa64c 15 2026-04-14 21:20:50 ~1 min wallet 📦zip
✔️ 31575b4 16 2026-04-14 21:51:59 ~1 min wallet 📦zip
6a1b96e 17 2026-04-14 21:53:30 ~1 min wallet 📄log
✔️ 1458916 18 2026-04-15 05:50:08 ~9 min wallet 📦zip
Commit #️⃣ Finished (UTC) Duration Platform Result
✔️ c4bc9df 19 2026-04-15 07:37:24 ~1 min wallet 📦zip
✔️ 3c0dac0 20 2026-04-16 14:52:26 ~2 min wallet 📦zip

@jinhojang6 jinhojang6 changed the title Wallet notifications Wallet browser notifications Apr 8, 2026
@jinhojang6 jinhojang6 changed the title Wallet browser notifications Add browser notifications for wallet transactions Apr 8, 2026
@jinhojang6 jinhojang6 self-assigned this Apr 8, 2026
@jinhojang6 jinhojang6 force-pushed the wallet-notifications branch 2 times, most recently from f3fddf0 to f3d5b79 Compare April 8, 2026 15:25
@jinhojang6 jinhojang6 force-pushed the wallet-notifications branch from f3d5b79 to 583fff4 Compare April 9, 2026 13:46
@jinhojang6 jinhojang6 marked this pull request as ready for review April 9, 2026 13:52
Copilot AI review requested due to automatic review settings April 9, 2026 13:53
@jinhojang6 jinhojang6 requested a review from JulesFiliot April 9, 2026 14:34
Comment thread apps/wallet/src/lib/tx-monitor.ts Outdated
Comment thread apps/wallet/src/entrypoints/background.ts Outdated
Comment thread apps/wallet/src/lib/tx-monitor.ts Outdated
Copy link
Copy Markdown
Contributor

@JulesFiliot JulesFiliot left a comment

Choose a reason for hiding this comment

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

I'm trying to trigger the notification but it is not working.

I followed the test guide and tried to send assets multiple times with my local anvil chain running but I can only see my balance getting depleted but no notification. In the history the tx is on pending forever but I guess that's expected. The only errors I get are [assets.all] Failed to fetch ERC20 token balances for ethereum: Error: Failed to fetch. and No price data for ETH: Error: Failed to fetch: 404 but I also guess that they are expected. I tried sending to addresses provided by Anvil as well as to my own wallet address.

Also note that I had to remove the network parameter from fetchNetworkNonce at the line bellow to get the wallet to build without errors:

const networkNonce = await fetchNetworkNonce(fromAddress, network)

I checked-out to the wallet-notifications branch, did a clean install, then cherry-picked the commit with the command you shared and did a clean install again.

I am using Brave.

Image

Comment thread apps/wallet/src/lib/tx-monitor.ts Outdated
@jinhojang6
Copy link
Copy Markdown
Collaborator Author

jinhojang6 commented Apr 14, 2026

For testing notifications: the current code queries anvil directly at http://127.0.0.1:8545.

@jinhojang6 jinhojang6 force-pushed the wallet-notifications branch from 31575b4 to 6a1b96e Compare April 14, 2026 21:51
@jinhojang6
Copy link
Copy Markdown
Collaborator Author

jinhojang6 commented Apr 15, 2026

In brave, I had to manually enable the notifications by toggling "Allow notifications".

Can you please take a look?
image

@jinhojang6
Copy link
Copy Markdown
Collaborator Author

jinhojang6 commented Apr 15, 2026

I've added a toast to encourage users to enable notifications.
c4bc9df

Screenshot 2026-04-15 at 4 36 50 PM

Copy link
Copy Markdown
Contributor

@JulesFiliot JulesFiliot left a comment

Choose a reason for hiding this comment

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

:shipit:

Image

@github-project-automation github-project-automation bot moved this from In Progress to Waiting in Web & User Interfaces Apr 15, 2026
@jkbktl
Copy link
Copy Markdown
Collaborator

jkbktl commented Apr 15, 2026

Screenshot 2026-04-15 at 20 24 19

Super nitpick, definitely not a blocker, I'd make a little bit bigger space between copy and toggle. As it's very close here, it looks a bit weird.

@jinhojang6
Copy link
Copy Markdown
Collaborator Author

@jkbktl Great point! Updated it like this
Screenshot 2026-04-16 at 11 48 32 PM

@jinhojang6 jinhojang6 force-pushed the wallet-notifications branch from c4bc9df to 3c0dac0 Compare April 16, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting

Development

Successfully merging this pull request may close these issues.

5 participants