Skip to content

Commit

Permalink
Set BscScan explorer api key, delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
omurovch committed Feb 17, 2021
1 parent 9480ee4 commit 0a98560
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class MainViewModel : ViewModel() {
private val infuraProjectId = "2a1306f1d12f4c109a4d4fb9be46b02e"
private val infuraSecret = "fc479a9290b64a84a15fa6544a130218"
private val etherscanKey = "GKNHXT22ED7PRVCKZATFZQD1YI7FK9AAYE"
private val bscScanKey = "GKNHXT22ED7PRVCKZATFZQD1YI7FK9AAYE" //TODO set actual key
private val bscScanKey = "5ZGSHWYHZVA8XZHB8PF6UUTRNNB4KT43ZZ"
private val walletId = "walletId"
private val networkType: NetworkType = NetworkType.BscMainNet
private val webSocket = false
Expand Down Expand Up @@ -153,21 +153,6 @@ class MainViewModel : ViewModel() {

ethereumAdapter.start()
erc20Adapter.start()

/*
Handler().postDelayed({
Log.e("AAA", "************STOPPING*************************************")
ethereumAdapter.stop()
erc20Adapter.stop()
// ethereumKit = EthereumKit.getInstance(App.instance, privateKey, EthereumKit.SyncMode.ApiSyncMode(), networkType, syncSource, etherscanKey, walletId)
// ethereumAdapter = EthereumAdapter(ethereumKit)
//
// erc20Adapter = Erc20Adapter(App.instance, fromToken ?: toToken
// ?: tokens.first(), ethereumKit)
}, 5000)
*/
}

private fun createKit(): EthereumKit {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.horizontalsystems.ethereumkit.api.core

import android.util.Log
import com.google.gson.Gson
import io.horizontalsystems.ethereumkit.api.jsonrpc.*
import io.horizontalsystems.ethereumkit.api.jsonrpcsubscription.NewHeadsRpcSubscription
Expand Down Expand Up @@ -209,7 +208,6 @@ class WebSocketRpcSyncer(
isSubscribedToNewHeads = true
},
onSubscribeError = { error ->
error.printStackTrace()
isSubscribedToNewHeads = false
onFailSync(error)
},
Expand All @@ -219,7 +217,6 @@ class WebSocketRpcSyncer(
fetchAccountState()
},
errorHandler = { error ->
error.printStackTrace()
logger.warning("NewHeads Handle Failed: ${error.javaClass.simpleName}")
}
)
Expand Down

0 comments on commit 0a98560

Please sign in to comment.