Skip to content

Document the transaction object with examples for onTransaction #832

@Montoya

Description

@Montoya

We have received feedback about the onTransaction export: I was looking into a Snap that uses the "transaction" object returned by the "onTransaction" hook. The Snap accesses several properties of this object, but does not check if they are defined. Thus, I was wondering whether these properties were guaranteed to be defined by MM. I wasn't able to find any reference in the doc, but maybe I haven't looked in the right place.

To be clear, we do not document the transaction object and it isn't documented elsewhere. We should explain what to expect from it and provide examples. As far as I know, it differs depending on the type of transaction, and nothing is guaranteed to be there, but we should at least give examples.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions