Skip to content

Commit 0ec8c35

Browse files
authored
Merge pull request #86 from EbenezerGH/project-wide-refactor
address issues #82,#78,#84,#81,#80
2 parents abad8b8 + ef2d051 commit 0ec8c35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+425
-347
lines changed

app/src/main/java/jfyg/etherscan/helloetherescan/MainActivity.kt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ import android.support.v7.app.AppCompatActivity
55
import android.util.Log
66
import io.reactivex.android.schedulers.AndroidSchedulers
77
import io.reactivex.rxkotlin.subscribeBy
8-
import jfyg.data.account.Account
9-
import jfyg.data.block.BlocksMined
10-
import jfyg.data.contract.ContractABI
11-
import jfyg.data.stat.Stat
12-
import jfyg.data.transaction.TxStatus
8+
import jfyg.data.account.Accounts
9+
import jfyg.data.block.Blocks
10+
import jfyg.data.contract.Contracts
11+
import jfyg.data.stat.Stats
12+
import jfyg.data.transaction.Transactions
1313
import kotlinx.android.synthetic.main.activity_main.*
1414

1515

@@ -22,11 +22,11 @@ class MainActivity : AppCompatActivity() {
2222
setSupportActionBar(toolbar)
2323

2424
//************************************************ Used To Test Singles returned from etherscanapi Module
25-
val stat = Stat()
26-
val account = Account()
27-
val contract = ContractABI()
28-
val tx = TxStatus()
29-
val blocks = BlocksMined()
25+
val stat = Stats()
26+
val account = Accounts()
27+
val contract = Contracts()
28+
val tx = Transactions()
29+
val blocks = Blocks()
3030

3131

3232
fab.setOnClickListener {
@@ -69,7 +69,7 @@ class MainActivity : AppCompatActivity() {
6969
?.subscribeBy(
7070
onSuccess = {
7171
Log.d(TAG, "The block miner is: ${it.blockMiner} and " +
72-
"the first minor : ${it.uncles?.get(0)?.miner}")
72+
"the first miner : ${it.uncles[0].miner}")
7373
},
7474
onError = { Log.d(TAG, "error receiving blocks mined") })
7575
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package jfyg.data
2+
3+
data class Balance(var account: String? = null,
4+
5+
var balance: String? = null)

etherscanapi/src/main/java/jfyg/data/Balances.kt

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package jfyg.data
2+
3+
data class BlockAccount(var blockNumber: String? = null,
4+
5+
var timeStamp: String? = null,
6+
7+
var blockReward: String? = null)
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package jfyg.data
2+
3+
data class BlockMined(var blockNumber: String? = null,
4+
5+
var timeStamp: String? = null,
6+
7+
var blockMiner: String? = null,
8+
9+
var blockReward: String? = null,
10+
11+
var uncles: List<Uncle> = emptyList())

etherscanapi/src/main/java/jfyg/data/Blocks.kt

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

etherscanapi/src/main/java/jfyg/data/BlocksMined.kt

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
package jfyg.data
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
data class Tx(var blockNumber: String? = null,
6+
7+
var timeStamp: String? = null,
8+
9+
var hash: String? = null,
10+
11+
var nonce: String? = null,
12+
13+
var blockHash: String? = null,
14+
15+
var transactionIndex: String? = null,
16+
17+
@SerializedName("from")
18+
var transactionFrom: String? = null,
19+
20+
@SerializedName("to")
21+
var transactionTo: String? = null,
22+
23+
var value: String? = null,
24+
25+
var gas: String? = null,
26+
27+
var gasPrice: String? = null,
28+
29+
var isError: String? = null,
30+
31+
@SerializedName("txreceipt_status")
32+
var receiptStatus: String? = null,
33+
34+
var input: String? = null,
35+
36+
var contractAddress: String? = null,
37+
38+
var cumulativeGasUsed: String? = null,
39+
40+
var gasUsed: String? = null,
41+
42+
var confirmations: String? = null)

etherscanapi/src/main/java/jfyg/data/Txs.kt

Lines changed: 0 additions & 42 deletions
This file was deleted.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package jfyg.data
2+
3+
import com.google.gson.annotations.SerializedName
4+
5+
data class Uncle(var miner: String? = null,
6+
7+
var unclePosition: String? = null,
8+
9+
@SerializedName("blockreward")
10+
var blockReward: String? = null)

0 commit comments

Comments
 (0)