Skip to content

Commit 860c68e

Browse files
Update ERC20 tests.
1 parent 3f73e03 commit 860c68e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Tests/web3swiftTests/remoteTests/ST20AndSecurityTokenTests.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import Core
1616
class ST20AndSecurityTokenTests: XCTestCase {
1717

1818
// FIXME: Enable me back again
19+
// Test fails because there's no such wallet on goerli chain as well as token.
1920
// func testERC20TokenCreation() async throws {
2021
// let web3 = await Web3.InfuraGoerliWeb3(accessToken: Constants.infuraToken)
2122
// let w3sTokenAddress = EthereumAddress("0x2dD33957C90880bE4Ee9fd5F703110BDA2E579EC")!
@@ -33,7 +34,7 @@ class ST20AndSecurityTokenTests: XCTestCase {
3334
let userAddress = EthereumAddress("0xe22b8979739D724343bd002F9f432F5990879901")!
3435
let balance = try await st20token.getBalance(account: userAddress)
3536
let allowance = try await st20token.getAllowance(originalOwner: userAddress, delegate: userAddress)
36-
XCTAssertEqual(String(balance), "0")
37+
XCTAssertEqual(balance, 0)
3738
XCTAssertEqual(allowance, 0)
3839
}
3940

@@ -42,11 +43,11 @@ class ST20AndSecurityTokenTests: XCTestCase {
4243
let w3sTokenAddress = EthereumAddress("0x2dD33957C90880bE4Ee9fd5F703110BDA2E579EC")!
4344
let stoken = SecurityToken.init(web3: web3, provider: web3.provider, address: w3sTokenAddress)
4445
let investorsCount = try await stoken.investorCount()
45-
let stringInvestorsCount = String(investorsCount)
46-
XCTAssertEqual(stringInvestorsCount, "0")
46+
XCTAssertEqual(investorsCount, 0)
4747
}
4848

4949
// FIXME: Enable me back again
50+
// Test fails because there's no such wallet on goerli chain as well as token.
5051
// func testSecurityTokenGranularity() async throws {
5152
// let web3 = await Web3.InfuraGoerliWeb3(accessToken: Constants.infuraToken)
5253
// let w3sTokenAddress = EthereumAddress("0x2dD33957C90880bE4Ee9fd5F703110BDA2E579EC")!

0 commit comments

Comments
 (0)