toNotificationLevel
An opinionated utility function to convert nofication type
to a simplified severity level. There are four levels: info
, warning
, success
, and error
. This function is useful for mapping transaction status to colors in your UI.
Note that for transactions the Finalized
status will convert to success
, but this does not necessarily mean that the transaction was successful in the user's eyes. It means that the transaction has been processed, gas has been removed from the caller's balance, and the block has been finalized.
Notification type
Conversion List
type
Conversion ListReturn Type
Last updated
Was this helpful?