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

Exchange trasnaction #15

Merged
merged 1 commit into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/model/account/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl Address {
Ok(Address {
bytes: Crypto::get_address(
&chain_id,
&Crypto::get_public_key_hash(public_key.bytes())?,
&Crypto::get_public_key_hash(&public_key.bytes())?,
)?,
})
}
Expand Down
4 changes: 2 additions & 2 deletions src/model/account/public_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ impl PublicKey {
Base58::encode(&self.bytes, false)
}

pub fn bytes(&self) -> &Vec<u8> {
&self.bytes
pub fn bytes(&self) -> Vec<u8> {
self.bytes.clone()
}

pub fn address(&self, chain_id: u8) -> Result<Address> {
Expand Down
2 changes: 2 additions & 0 deletions src/model/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ pub mod chain_id;
pub mod data_entry;
pub mod id;
pub mod lease_info;
pub mod order;
pub mod script;
pub mod state_changes;
pub mod transaction;
Expand All @@ -17,6 +18,7 @@ pub use base64string::*;
pub use chain_id::*;
pub use id::*;
pub use lease_info::*;
pub use order::*;
pub use script::*;
pub use state_changes::*;
pub use transaction::*;
Loading