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

fix(multisig-prover): update stellar gateway message definition #664

Merged
merged 4 commits into from
Oct 21, 2024
Merged
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
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
Loading