Skip to content

Commit bd2888c

Browse files
author
Alex Vlasov
committed
Merge block explorer and some cleanups
1 parent d2027d7 commit bd2888c

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

web3swift.xcodeproj/project.pbxproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@
406406
/* End PBXFrameworksBuildPhase section */
407407

408408
/* Begin PBXGroup section */
409-
0073F22320D949D7000791F1 /* BlockExporter */ = {
409+
0073F22320D949D7000791F1 /* BlockExplorer */ = {
410410
isa = PBXGroup;
411411
children = (
412412
0073F22420D949E8000791F1 /* Classes */,
413413
);
414-
path = BlockExporter;
414+
path = BlockExplorer;
415415
sourceTree = "<group>";
416416
};
417417
0073F22420D949E8000791F1 /* Classes */ = {
@@ -449,7 +449,7 @@
449449
1CD91AFE1FD76910007BFB45 /* web3swift */ = {
450450
isa = PBXGroup;
451451
children = (
452-
0073F22320D949D7000791F1 /* BlockExporter */,
452+
0073F22320D949D7000791F1 /* BlockExplorer */,
453453
81A1821220D5A2430016741F /* Promises */,
454454
81FB2204207BCFD9007F9A83 /* Resources */,
455455
8103BBB4207638F800499769 /* Concurrency */,

web3swift/BlockExporter/Classes/BlockExplorer+GetTransactionHistory.swift renamed to web3swift/BlockExplorer/Classes/BlockExplorer+GetTransactionHistory.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ import PromiseKit
1111
import BigInt
1212

1313
extension BlockExplorer {
14-
public func getTransactionHistory(address: EthereumAddress, tokenName name: String = "Ether", page: Int = 1, size: Int = 50) -> Promise<[TransactionHistorical]> {
14+
public func getTransactionHistory(address: EthereumAddress, tokenName name: String = "Ether", page: Int = 1, size: Int = 50) -> Promise<[TransactionHistoryRecord]> {
1515
let address = address.address
1616
return getTransactionsHistory(address: address, tokenName: name, page: page, size: size)
1717
}
1818

19-
public func getTransactionsHistory(address publicAddress: String, tokenName name: String = "Ether", page: Int = 1, size: Int = 50) -> Promise<[TransactionHistorical]> {
19+
public func getTransactionsHistory(address publicAddress: String, tokenName name: String = "Ether", page: Int = 1, size: Int = 50) -> Promise<[TransactionHistoryRecord]> {
2020

2121
//Configuring http request
2222
let listId: ListId = (name == "Ether") ? .listOfETH : .listOfTokens
@@ -26,7 +26,7 @@ extension BlockExplorer {
2626
let internalParams = InternalParam(entityId: publicAddress, page: page, size: size)
2727
let parameters = Body(listId: listId.rawValue, moduleId: "address", params: internalParams)
2828

29-
return Promise<[TransactionHistorical]> {seal in
29+
return Promise<[TransactionHistoryRecord]> {seal in
3030
do {
3131
request.httpBody = try JSONEncoder().encode(parameters)
3232
} catch {
@@ -57,11 +57,11 @@ extension BlockExplorer {
5757
//MARK: - Decodable structures
5858

5959
public struct Response: Decodable {
60-
let rows: [TransactionHistorical]
60+
let rows: [TransactionHistoryRecord]
6161
let head: Head
6262
}
6363

64-
public struct TransactionHistorical: Decodable {
64+
public struct TransactionHistoryRecord: Decodable {
6565

6666
let id: String
6767
let hash: Data

0 commit comments

Comments
 (0)