Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
keefertaylor committed Sep 19, 2019
1 parent ec915e4 commit 54d2cbc
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import XCTest
/// Token Contract: https://alphanet.tzscan.io/KT1PARMPddZ9WD1MPmPthXYBCgErmxAHKBD8
/// Address: https://alphanet.tzscan.io/tz1XVJ8bZUXs7r5NV8dHvuiBhzECvLRLR3jW


extension Address {
public static let tokenContractAddress = "KT1WiDkoaKgH6dcmHa3tLJKzfnW5QuPjppgn"
public static let tokenRecipient = "tz1XarY7qEahQBipuuNZ4vPw9MN6Ldyxv8G3"
Expand Down
2 changes: 1 addition & 1 deletion Tests/TezosKit/GetContractStorageRPCTest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ final class GetContractStorageRPCTest: XCTestCase {
let address = "abc123"
let rpc = GetContractStorageRPC(address: address)

XCTAssertEqual(rpc.endpoint, "chains/main/blocks/head/context/contracts/\(address)/storage")
XCTAssertEqual(rpc.endpoint, "/chains/main/blocks/head/context/contracts/\(address)/storage")
XCTAssertNil(rpc.payload)
XCTAssertFalse(rpc.isPOSTRequest)
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/TezosKit/MichelsonTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ final class MichelsonTests: XCTestCase {
let date = Date(timeIntervalSince1970: 1_593_453_621) // Monday, June 29, 2020 6:00:21 PM, GMT
let michelson = StringMichelsonParameter(date: date)
let encoded = JSONUtils.jsonString(for: michelson.networkRepresentation)
XCTAssertEqual(encoded, Helpers.orderJSONString("{\"string\":\"2020-06-29T14:00:21Z\"}"))
XCTAssertEqual(encoded, Helpers.orderJSONString("{\"string\":\"2020-06-29T18:00:21Z\"}"))
}

func testEncodeStringToJSON() {
Expand Down
3 changes: 3 additions & 0 deletions TezosKit/Michelson/StringMichelsonParameter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ public class StringMichelsonParameter: AbstractMichelsonParameter {
public convenience init(date: Date, annotations: [MichelsonAnnotation]? = nil) {
let dateFormatter = DateFormatter()
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss'Z'"
dateFormatter.timeZone = TimeZone(abbreviation: "GMT")

let string = dateFormatter.string(from: date)

self.init(string: string, annotations: annotations)
}
}

0 comments on commit 54d2cbc

Please sign in to comment.