Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Thoralf-M committed Oct 12, 2023
1 parent 6dc376b commit 765baab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
12 changes: 5 additions & 7 deletions sdk/tests/client/input_signing_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn input_signing_data_conversion() {
false,
Some(
SlotCommitmentId::from_str(
"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f9567d82bf96689",
"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f950100",
)
.unwrap(),
),
Expand All @@ -52,14 +52,12 @@ fn input_signing_data_conversion() {
),
Some(
SlotCommitmentId::from_str(
"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f9567d82bf96689",
"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f950100",
)
.unwrap(),
),
SlotCommitmentId::from_str(
"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f9567d82bf96689",
)
.unwrap(),
SlotCommitmentId::from_str("0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f950100")
.unwrap(),
),
chain: Some(bip44_chain),
};
Expand All @@ -71,7 +69,7 @@ fn input_signing_data_conversion() {
InputSigningData::try_from_dto_with_params(input_signing_data_dto.clone(), &protocol_parameters).unwrap();
assert_eq!(input_signing_data, restored_input_signing_data);

let input_signing_data_dto_str = r#"{"output":{"type":0,"amount":"1000000","mana":"0","unlockConditions":[{"type":0,"address":{"type":0,"pubKeyHash":"0x7ffec9e1233204d9c6dce6812b1539ee96af691ca2e4d9065daa85907d33e5d3"}}]},"outputMetadata":{"blockId":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda00000000","transactionId":"0xbce525324af12eda02bf7927e92cea3a8e8322d0f41966271443e6c3b245a440","outputIndex":0,"isSpent":false,"commitmentIdSpent":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f9567d82bf96689","transactionIdSpent":"0x24a1f46bdb6b2bf38f1c59f73cdd4ae5b418804bb231d76d06fbf246498d5883","includedCommitmentId":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f9567d82bf96689","latestCommitmentId":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f9567d82bf96689"},"chain":{"coinType":4219,"account":0,"change":0,"addressIndex":0}}"#;
let input_signing_data_dto_str = r#"{"output":{"type":0,"amount":"1000000","mana":"0","unlockConditions":[{"type":0,"address":{"type":0,"pubKeyHash":"0x7ffec9e1233204d9c6dce6812b1539ee96af691ca2e4d9065daa85907d33e5d3"}}]},"outputMetadata":{"blockId":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda00000000","transactionId":"0xbce525324af12eda02bf7927e92cea3a8e8322d0f41966271443e6c3b245a440","outputIndex":0,"isSpent":false,"commitmentIdSpent":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f950100","transactionIdSpent":"0x24a1f46bdb6b2bf38f1c59f73cdd4ae5b418804bb231d76d06fbf246498d5883","includedCommitmentId":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f950100","latestCommitmentId":"0xedf5f572c58ddf4b4f9567d82bf96689cc68b730df796d822b4b9fb643f5efda4f950100"},"chain":{"coinType":4219,"account":0,"change":0,"addressIndex":0}}"#;
assert_eq!(
serde_json::to_string(&input_signing_data_dto).unwrap(),
input_signing_data_dto_str
Expand Down
4 changes: 2 additions & 2 deletions sdk/tests/types/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ fn dto_mismatch_version() {
"protocolVersion": protocol_version,
"networkId": network_id.to_string(),
"issuingTime": issuing_time.to_string(),
"slotCommitmentId": "0x8633b2eb1845fdecf12ee6c5e789c3cf1f0d0bbb3cee65cb5fb2757e995b5cd70000000000000000",
"slotCommitmentId": "0x8633b2eb1845fdecf12ee6c5e789c3cf1f0d0bbb3cee65cb5fb2757e995b5cd700000000",
"latestFinalizedSlot": "0",
"issuerId": "0x0000000000000000000000000000000000000000000000000000000000000000",
"block": {
Expand Down Expand Up @@ -173,7 +173,7 @@ fn dto_mismatch_network_id() {
"protocolVersion": 3,
"networkId": network_id.to_string(),
"issuingTime": issuing_time.to_string(),
"slotCommitmentId": "0x8633b2eb1845fdecf12ee6c5e789c3cf1f0d0bbb3cee65cb5fb2757e995b5cd70000000000000000",
"slotCommitmentId": "0x8633b2eb1845fdecf12ee6c5e789c3cf1f0d0bbb3cee65cb5fb2757e995b5cd700000000",
"latestFinalizedSlot": "0",
"issuerId": "0x0000000000000000000000000000000000000000000000000000000000000000",
"block": {
Expand Down

0 comments on commit 765baab

Please sign in to comment.