Skip to content

Commit

Permalink
Exchange trasnaction
Browse files Browse the repository at this point in the history
- broadcast exchange transaction
- read exchange transaction
  • Loading branch information
DiLeqL authored Sep 7, 2022
2 parents 49d4665 + 3d1b52c commit 38916d8
Show file tree
Hide file tree
Showing 19 changed files with 993 additions and 41 deletions.
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

0 comments on commit 38916d8

Please sign in to comment.