Skip to content

Commit

Permalink
Update crypto lib to latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenbf committed Sep 12, 2024
1 parent 2e1e995 commit 8f4c7b3
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Concordium/concordium-wallet-crypto-swift.git",
"state" : {
"revision" : "3d0660ded3949adf0590739a8d42f6f735a66c4d",
"version" : "4.0.0"
"revision" : "32e4c86bd6ad018ea381b0fffbb39520520e1985",
"version" : "4.1.0"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ let package = Package(
.package(url: "https://github.com/bisgardo/Hextension.git", from: "1.0.1"),
overridableCryptoDependency(
url: "https://github.com/Concordium/concordium-wallet-crypto-swift.git",
from: "4.0.0"
from: "4.1.0"
),
],
targets: [
Expand Down
36 changes: 32 additions & 4 deletions Tests/ConcordiumTests/Model/ContractTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,37 @@ import XCTest
let TEST_CONTRACT_SCHEMA = "//8CAQAAAAwAAABUZXN0Q29udHJhY3QBBAIDAQAAABAAAAByZWNlaXZlX2Z1bmN0aW9uBgYIBw=="
let TEST_CONTRACT_RECEIVE_ERROR_SCHEMA = "Bw==" // i16
let TEST_CONTRACT_INIT_ERROR_SCHEMA = "Aw==" // u16

let AUCTION_WITH_ERRORS_VIEW_RETURN_VALUE_SCHEMA_TEMPLATE = """
{
"auction_state": {
"Enum": [
{
"NotSoldYet": []
},
{
"Sold": [
"<AccountAddress>"
]
}
]
},
"end": "<Timestamp (e.g. `2000-01-01T12:00:00Z`)>",
"highest_bidder": {
"Enum": [
{
"None": []
},
{
"Some": [
"<AccountAddress>"
]
}
]
},
"item": "<String>"
}
"""
let AUCTION_WITH_ERRORS_VIEW_RETURN_VALUE_SCHEMA =
"FAAEAAAADQAAAGF1Y3Rpb25fc3RhdGUVAgAAAAoAAABOb3RTb2xkWWV0AgQAAABTb2xkAQEAAAALDgAAAGhpZ2hlc3RfYmlkZGVyFQIAAAAEAAAATm9uZQIEAAAAU29tZQEBAAAACwQAAABpdGVtFgIDAAAAZW5kDQ=="

Expand All @@ -28,11 +59,8 @@ final class ContractTest: XCTestCase {
}

func testTypeSchemaTemplate() throws {
let expected = """
{"auction_state":{"Enum":[{"NotSoldYet":[]},{"Sold":["<AccountAddress>"]}]},"end":"<Timestamp (e.g. `2000-01-01T12:00:00Z`)>","highest_bidder":{"Enum":[{"None":[]},{"Some":["<AccountAddress>"]}]},"item":"<String>"}
"""
let schema = try TypeSchema(base64: AUCTION_WITH_ERRORS_VIEW_RETURN_VALUE_SCHEMA)
XCTAssertEqual(try schema.template, expected)
XCTAssertEqual(try schema.template, AUCTION_WITH_ERRORS_VIEW_RETURN_VALUE_SCHEMA_TEMPLATE)
}

func testSchemaEq() throws {
Expand Down
4 changes: 2 additions & 2 deletions examples/CLI/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Concordium/concordium-wallet-crypto-swift.git",
"state" : {
"revision" : "3d0660ded3949adf0590739a8d42f6f735a66c4d",
"version" : "4.0.0"
"revision" : "32e4c86bd6ad018ea381b0fffbb39520520e1985",
"version" : "4.1.0"
}
},
{
Expand Down
4 changes: 2 additions & 2 deletions examples/DocSnippets/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/Concordium/concordium-wallet-crypto-swift.git",
"state" : {
"revision" : "3d0660ded3949adf0590739a8d42f6f735a66c4d",
"version" : "4.0.0"
"revision" : "32e4c86bd6ad018ea381b0fffbb39520520e1985",
"version" : "4.1.0"
}
},
{
Expand Down

0 comments on commit 8f4c7b3

Please sign in to comment.