diff --git a/packages/core/package.json b/packages/core/package.json index ab4f274c2..dc267b349 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@web3-onboard/core", - "version": "2.3.0-alpha.1", + "version": "2.3.0-alpha.2", "scripts": { "build": "rollup -c", "dev": "rollup -c -w", diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts index 7f307fc22..8a883db33 100644 --- a/packages/core/src/types.ts +++ b/packages/core/src/types.ts @@ -180,7 +180,7 @@ export type Notification = { message: string autoDismiss: number link?: string - onclick?: (event: Event) => void + onClick?: (event: Event) => void } export type TransactionHandlerReturn = CustomNotification | boolean | void diff --git a/packages/core/src/validation.ts b/packages/core/src/validation.ts index 322af9760..f66b93fc4 100644 --- a/packages/core/src/validation.ts +++ b/packages/core/src/validation.ts @@ -189,7 +189,9 @@ const customNotificationUpdate = Joi.object({ eventCode: Joi.string(), message: Joi.string().required(), id: Joi.string().required(), - autoDismiss: Joi.number() + autoDismiss: Joi.number(), + onClick: Joi.function(), + link: Joi.string() }) const customNotification = Joi.object({ @@ -198,7 +200,9 @@ const customNotification = Joi.object({ eventCode: Joi.string(), message: Joi.string(), id: Joi.string(), - autoDismiss: Joi.number() + autoDismiss: Joi.number(), + onClick: Joi.function(), + link: Joi.string() }) const notification = Joi.object({ @@ -209,7 +213,9 @@ const notification = Joi.object({ message: Joi.string().required(), autoDismiss: Joi.number().required(), network: Joi.string().required(), - startTime: Joi.number() + startTime: Joi.number(), + onClick: Joi.function(), + link: Joi.string() }) const transactionHandlerReturn = Joi.any().allow( diff --git a/packages/core/src/views/notify/Notification.svelte b/packages/core/src/views/notify/Notification.svelte index 412df33a3..2f59e6892 100644 --- a/packages/core/src/views/notify/Notification.svelte +++ b/packages/core/src/views/notify/Notification.svelte @@ -103,8 +103,8 @@