Skip to content

[Bug]: autoDismiss parameter not working when updating custom notification #1466

@lnbc1QWFyb24

Description

@lnbc1QWFyb24

Current Behavior

The autoDismiss parameter is not working when calling the update method that is returned from creating a custom notification.

Expected Behavior

The autoDismiss parameter will work on the updated notification as it does in the original custom notification.

Steps To Reproduce

  1. Create a custom notification:
const { update, dismiss } = customNotification({
  eventCode: 'dbUpdate',
  type: 'hint',
  message: 'Custom hint notification created by the dapp',
  onClick: () => window.open(`https://www.blocknative.com`)
})
  1. Sometime late, update the notification with a autoDismiss param:
update({
  eventCode: 'dbUpdateSuccess',
  message: 'Hint notification reason resolved!',
  type: 'success',
  autoDismiss: 2000
})
  1. Notice that the updated notification does not auto dismiss.

What package is effected by this issue?

@web3-onboard/core

Is this a build or a runtime issue?

Runtime

Package Version

2.13.0

Node Version

19.0.0

What browsers are you seeing the problem on?

Chrome

Relevant log output

No response

Anything else?

No response

Sanity Check

  • If this is a build issue, I have included my build config. If this is a runtime issue, I have included reproduction steps and/or a Minimal, Reproducible Example.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions