Skip to content
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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Minor gui backend fixes #1855

wants to merge 7 commits into from

Conversation

azarovh
Copy link
Member

@azarovh azarovh commented Dec 18, 2024

  1. Added Transaction type to backend, which is a wrapper around SignedTransaction that allows serialization/deserialization to hex and also methods to convert to text summary or json. Mainly to give UI flexibility and avoid deserializing SignedTransaction.
  2. Added Serialize trait to some common types.

Comment on lines 172 to 175
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()))
}
Copy link
Contributor

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

Copy link
Member Author

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

node-gui/backend/src/error.rs Outdated Show resolved Hide resolved
node-gui/backend/src/messages.rs Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants