-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SmartContractTransactionsOutcomeParser - parseDeploy() #424
Conversation
@@ -117,7 +117,7 @@ export class TransactionsConverter { | |||
// Before Sirius, there was no "additionalData" field on transaction logs. | |||
// After Sirius, the "additionalData" field includes the payload of the legacy "data" field, as well (as its first element): | |||
// https://github.com/multiversx/mx-chain-go/blob/v1.6.18/process/transactionLog/process.go#L159 | |||
const legacyData = eventOnNetwork.dataPayload?.valueOf() || Buffer.from([]); | |||
const legacyData = eventOnNetwork.dataPayload?.valueOf() || Buffer.from(eventOnNetwork.data || ""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better handling of legacy data.
@@ -32,15 +32,15 @@ export class Address { | |||
/** | |||
* Creates an address object, given a raw string (whether a hex pubkey or a Bech32 address), a sequence of bytes, or another Address object. | |||
*/ | |||
public constructor(value: Address | Buffer | string) { | |||
public constructor(value: Address | Buffer | Uint8Array | string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small preparation for future updates.
} | ||
|
||
return events; | ||
return findEventsByPredicate(transactionOutcome, (event) => event.identifier == identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arbitrary constraint about any / no found events was dropped (not useful).
See: multiversx/mx-sdk-specs#60.