-
Notifications
You must be signed in to change notification settings - Fork 2
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
Workaround (quick fix) to support construction of cross-shard transactions #52
Conversation
if len(operations) > 1 { | ||
options["value"] = operations[1].Amount.Value | ||
} else { | ||
options["value"] = strings.Trim(operations[0].Amount.Value, "-") |
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.
This is a temporary workaround - will be refactored in #51.
options["sender"] = operations[0].Account.Address | ||
|
||
if metadata["receiver"] != nil { | ||
options["receiver"] = metadata["receiver"] |
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.
The receiver
from the metadata takes priority.
} | ||
|
||
if metadata["value"] != nil { | ||
options["value"] = metadata["value"] |
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.
The value
from the metadata takes priority.
Add support for constructing cross-shard transactions - handle
receiver
andvalue
from the preprocess metadata, when they are present.Related to: multiversx/mx-chain-rosetta-checks#7
The construction API will be partly refactored in #51.