Skip to content

Commit

Permalink
fix(multisig-prover): update stellar gateway message definition (axel…
Browse files Browse the repository at this point in the history
…arnetwork#664)

Co-authored-by: Milap Sheth <[email protected]>
  • Loading branch information
ahramy and milapsheth authored Oct 21, 2024
1 parent 7e58452 commit 7decfc9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions external-gateways/stellar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ impl TryFrom<CommandType> for ScVal {

#[derive(Debug, Clone)]
pub struct Message {
pub message_id: String,
pub source_chain: String,
pub message_id: String,
pub source_address: String,
pub contract_address: Contract,
pub payload_hash: Hash,
Expand All @@ -73,6 +73,7 @@ impl TryFrom<&router_api::Message> for Message {
impl TryFrom<Message> for ScVal {
type Error = XdrError;

// Note that XDR encodes the values in sorted order by key
fn try_from(value: Message) -> Result<Self, XdrError> {
let keys: [&'static str; 5] = [
"contract_address",
Expand Down Expand Up @@ -429,8 +430,8 @@ mod test {

let messages: Messages = (1..=4)
.map(|i| Message {
message_id: format!("test-{}", i),
source_chain: format!("source-{}", i),
message_id: format!("test-{}", i),
source_address: "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHK3M"
.to_string(),
contract_address: "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMDR4"
Expand Down

0 comments on commit 7decfc9

Please sign in to comment.