Skip to content

Commit df91e11

Browse files
committed
more tests passing
1 parent 23d47bb commit df91e11

22 files changed

+110
-441
lines changed

web3swift.xcodeproj/project.pbxproj

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
8484
81909D1821862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; };
8585
81909D1921862D5A007D2AE5 /* Web3+Eventloop.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81909D1721862D5A007D2AE5 /* Web3+Eventloop.swift */; };
8686
81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */ = {isa = PBXBuildFile; fileRef = 815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */; };
87+
81909D1C2187BB67007D2AE5 /* web3swift_RLP_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7F20EA3CEA0030E0D6 /* web3swift_RLP_Tests.swift */; };
88+
81909D1D2187BBAE007D2AE5 /* web3swift_ERC20_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7B20EA37B50030E0D6 /* web3swift_ERC20_Tests.swift */; };
89+
81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00E5FE7920EA355D0030E0D6 /* web3swift_transactions_Tests.swift */; };
90+
81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */; };
8791
81A1821520D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; };
8892
81A1821620D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821420D5A2700016741F /* Promise+Web3+Eth+GetBalance.swift */; };
8993
81A1821A20D5A6F70016741F /* Promise+HttpProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81A1821720D5A3E70016741F /* Promise+HttpProvider.swift */; };
@@ -207,7 +211,6 @@
207211
5B83FA95B72D7DA53870479B /* Pods-web3swift-macOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-web3swift-macOS.release.xcconfig"; path = "Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.release.xcconfig"; sourceTree = "<group>"; };
208212
68360683136B1FE2C57D65D9 /* Pods_Web3Swift_ios_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Web3Swift_ios_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
209213
740EB523E2A6AEE0C6916C71 /* Pods_Web3Swift_osx_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Web3Swift_osx_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
210-
8102F5C2211E00820032DF60 /* scrypt_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = scrypt_Tests.swift; sourceTree = "<group>"; };
211214
8103BBCB2077B84400499769 /* PlainKeystore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlainKeystore.swift; sourceTree = "<group>"; };
212215
8104E2271FE82BDC00F952CB /* Web3+Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+Utils.swift"; sourceTree = "<group>"; };
213216
810B0F991FEC446B00CF0DA2 /* Web3+JSONRPC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+JSONRPC.swift"; sourceTree = "<group>"; };
@@ -317,7 +320,6 @@
317320
E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_EIP67_Tests.swift; sourceTree = "<group>"; };
318321
E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_rinkeby_personalSignature_Tests.swift; sourceTree = "<group>"; };
319322
E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_numberFormattingUtil_Tests.swift; sourceTree = "<group>"; };
320-
E23B5AE420EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = web3swift_contractV2_Tests.swift; sourceTree = "<group>"; };
321323
E2C590752152835400FF53D3 /* JSONRPCrequestDispatcher+ObjC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "JSONRPCrequestDispatcher+ObjC.swift"; sourceTree = "<group>"; };
322324
E2E94C5F217788E0005F54A0 /* Web3+ERC721.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Web3+ERC721.swift"; sourceTree = "<group>"; };
323325
FB43EC035C593F9E5A3644B6 /* Pods-web3swift-macOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-web3swift-macOS.debug.xcconfig"; path = "Pods/Target Support Files/Pods-web3swift-macOS/Pods-web3swift-macOS.debug.xcconfig"; sourceTree = "<group>"; };
@@ -414,7 +416,6 @@
414416
81A7B2892143DF1D004CD2C7 /* web3swift_EIP681_Tests.swift */,
415417
81A7B2782143C978004CD2C7 /* web3swift_ENS_Tests.swift */,
416418
8159C50D2135901700197B91 /* web3swift_ERC20_Class_Tests.swift */,
417-
8102F5C2211E00820032DF60 /* scrypt_Tests.swift */,
418419
81FECD5D211AEFCE006DA367 /* web3swift_ObjC_Tests.swift */,
419420
815C74C720ECBF3E00DE2AC4 /* web3swift_User_cases.swift */,
420421
00E5FE8120EA3FF40030E0D6 /* web3swift_infura_Tests.swift */,
@@ -431,7 +432,6 @@
431432
E23B5ADC20EA685D00DC7F32 /* web3swift_EIP67_Tests.swift */,
432433
E23B5AE020EA695400DC7F32 /* web3swift_rinkeby_personalSignature_Tests.swift */,
433434
E23B5AE220EA69B900DC7F32 /* web3swift_numberFormattingUtil_Tests.swift */,
434-
E23B5AE420EA6A0A00DC7F32 /* web3swift_contractV2_Tests.swift */,
435435
);
436436
path = web3swiftTests;
437437
sourceTree = "<group>";
@@ -1067,7 +1067,11 @@
10671067
buildActionMask = 2147483647;
10681068
files = (
10691069
00E5FE8220EA3FF40030E0D6 /* web3swift_infura_Tests.swift in Sources */,
1070+
81909D1D2187BBAE007D2AE5 /* web3swift_ERC20_Tests.swift in Sources */,
1071+
81909D1C2187BB67007D2AE5 /* web3swift_RLP_Tests.swift in Sources */,
10701072
81909D1B2187B1FA007D2AE5 /* web3swift_User_cases.swift in Sources */,
1073+
81909D1F2187BD20007D2AE5 /* web3swift_numberFormattingUtil_Tests.swift in Sources */,
1074+
81909D1E2187BC8B007D2AE5 /* web3swift_transactions_Tests.swift in Sources */,
10711075
);
10721076
runOnlyForDeploymentPostprocessing = 0;
10731077
};

web3swift/Web3/Classes/Web3+Utils.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,11 @@ extension Web3.Utils {
713713
} else {
714714
remainingDigits = String(fullPaddedRemainder[firstDigit+1 ..< fullPaddedRemainder.count])
715715
}
716-
fullRemainder = firstDecimalUnit + decimalSeparator + remainingDigits
716+
if remainingDigits != "" {
717+
fullRemainder = firstDecimalUnit + decimalSeparator + remainingDigits
718+
} else {
719+
fullRemainder = firstDecimalUnit
720+
}
717721
firstDigit = firstDigit + 1;
718722
break
719723
}

web3swiftTests/scrypt_Tests.swift

Lines changed: 0 additions & 68 deletions
This file was deleted.

web3swiftTests/web3swift_AdvancedABIv2_Tests.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1+
// web3swift
12
//
2-
// web3swift_AdvancedABIv2_Tests.swift
3-
// web3swift-iOS_Tests
4-
//
5-
// Created by Anton Grigoriev on 02.07.2018.
6-
// Copyright © 2018 Bankex Foundation. All rights reserved.
3+
// Created by Alex Vlasov.
4+
// Copyright © 2018 Alex Vlasov. All rights reserved.
75
//
86

97
import XCTest
108
import CryptoSwift
119
import BigInt
12-
import Result
1310

1411
@testable import web3swift_iOS
1512

web3swiftTests/web3swift_EIP67_Tests.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1+
// web3swift
12
//
2-
// web3swift_EIP67_Tests.swift
3-
// web3swift-iOS_Tests
4-
//
5-
// Created by Anton Grigoriev on 02.07.2018.
6-
// Copyright © 2018 Bankex Foundation. All rights reserved.
3+
// Created by Alex Vlasov.
4+
// Copyright © 2018 Alex Vlasov. All rights reserved.
75
//
86

97
import XCTest
108
import CryptoSwift
119
import BigInt
12-
import Result
1310

1411
@testable import web3swift_iOS
1512

web3swiftTests/web3swift_EIP681_Tests.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1+
// web3swift
12
//
2-
// web3swift_EIP681_Tests.swift
3-
// web3swift-iOS_Tests
4-
//
5-
// Created by Alex Vlasov on 08.09.2018.
6-
// Copyright © 2018 Bankex Foundation. All rights reserved.
3+
// Created by Alex Vlasov.
4+
// Copyright © 2018 Alex Vlasov. All rights reserved.
75
//
86

97
import XCTest

web3swiftTests/web3swift_ENS_Tests.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1+
// web3swift
12
//
2-
// web3swift_ENS_Tests.swift
3-
// web3swift-iOS_Tests
4-
//
5-
// Created by Alex Vlasov on 08.09.2018.
6-
// Copyright © 2018 Bankex Foundation. All rights reserved.
3+
// Created by Alex Vlasov.
4+
// Copyright © 2018 Alex Vlasov. All rights reserved.
75
//
86

97
import XCTest
8+
109
@testable import web3swift_iOS
10+
1111
class web3swift_ENS_Tests: XCTestCase {
1212

1313
func testDomainNormalization() {

web3swiftTests/web3swift_ERC20_Class_Tests.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1+
// web3swift
12
//
2-
// web3swift_ERC20_Class_Tests.swift
3-
// web3swift-iOS_Tests
4-
//
5-
// Created by Alex Vlasov on 28.08.2018.
6-
// Copyright © 2018 Bankex Foundation. All rights reserved.
3+
// Created by Alex Vlasov.
4+
// Copyright © 2018 Alex Vlasov. All rights reserved.
75
//
86

97
import XCTest
108
import BigInt
11-
import Result
129

1310
@testable import web3swift_iOS
1411

0 commit comments

Comments
 (0)