aptos-core
aptos-core copied to clipboard
[API] Restructure Transaction response so common fields are always available
Currently Transaction is a union of different variants of transactions. We know however that all of these variants have some common fields, e.g. success
in some cases, for example when reading an on-chain transaction (though in this case, we'd need two enums, one with PendingTransaction and one without). We should restructure the code such that there is a top level struct with these common fields, and then have the dissimilar variants be a field within that top level struct. That way you don't have to do something like this:
(transaction as any).success
But can instead just do this:
transaction.success
@banool Is this issue available to work on?
This issue is stale because it has been open 45 days with no activity. Remove the stale
label or comment - otherwise this will be closed in 15 days.