-
Notifications
You must be signed in to change notification settings - Fork 28
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
Minor gui backend fixes #1855
base: master
Are you sure you want to change the base?
Minor gui backend fixes #1855
Conversation
node-gui/backend/src/messages.rs
Outdated
pub fn to_json(&self, config: &ChainConfig) -> Result<serde_json::Value, BackendError> { | ||
common::address::dehexify::to_dehexified_json(config, self.tx.transaction()) | ||
.map_err(|e| BackendError::JsonError(e.to_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.
I kind of missed the fact that Transaction
is serializable. So now I'm wondering why SignedTransaction
shouldn't be
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.
I don't know, my guess would be that we don't have a use case for serializing witnesses
Transaction
type to backend, which is a wrapper aroundSignedTransaction
that allows serialization/deserialization to hex and also methods to convert to text summary or json. Mainly to give UI flexibility and avoid deserializingSignedTransaction
.