Skip to content

Commit

Permalink
Encode UpdateTokenPrice.price as le
Browse files Browse the repository at this point in the history
  • Loading branch information
NunoAlexandre committed Jan 31, 2023
1 parent 1e0e8bb commit 76e4ff6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pallets/connectors/src/message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ impl<
message.append(&mut encoded_pool_id);

message.append(&mut tranche_id.encode());
message.append(&mut price.encode());

let mut encoded_price = price.encode();
encoded_price.reverse();
message.append(&mut encoded_price);

message
}
Expand Down Expand Up @@ -295,7 +298,7 @@ mod tests {
};
let encoded = msg.encode();

let input = "03000000000000000100000000000000000000000000000001000000e83c80d09f3c2e3b0300000000";
let input = "0300000000000000010000000000000000000000000000000100000000033b2e3c9fd0803ce8000000";
let expected = <[u8; 41]>::from_hex(input).expect("Decoding failed");
assert_eq!(encoded, expected);
}
Expand Down

0 comments on commit 76e4ff6

Please sign in to comment.