Skip to content

Commit

Permalink
替换IP地址
Browse files Browse the repository at this point in the history
  • Loading branch information
LAPTOP-RATHPHF2\lenovo committed Jul 17, 2020
1 parent 97b9ba4 commit c8a3289
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">47.244.129.130</domain>
<domain includeSubdomains="true">101.32.42.213</domain>
</domain-config>
</network-security-config>
6 changes: 2 additions & 4 deletions eoskit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,9 @@ dependencies {
// EOSIO
implementation 'one.block:eosiojava:0.1.0'
implementation 'one.block:eosiojavasoftkeysignatureprovider:0.1.1'
// implementation 'one.block:eosiojavaandroidabieosserializationprovider:0.1.0'
implementation 'com.github.liyan278922573:eosio-java-android-abieos-serialization-provider:0.1.3'
// implementation('com.github.liyan278922573:eos-kit-android:10e0297') {
// exclude group: 'com.google.protobuf'
// }
// implementation 'com.github.liyan278922573:eosio-java-android-abieos-serialization-provider:0.1.5'

implementation 'one.block:eosiojavarpcprovider:0.1.1'
// RxJava
implementation 'io.reactivex.rxjava2:rxjava:2.2.8'
Expand Down
6 changes: 3 additions & 3 deletions eoskit/src/main/java/io/horizontalsystems/eoskit/EosKit.kt
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,15 @@ class EosKit(
companion object {

private fun getRpcHost(networkType: NetworkType): String = when (networkType) {
NetworkType.MainNet -> "http://47.244.129.130:8001"
NetworkType.TestNet -> "http://47.244.129.130:8001"
NetworkType.MainNet -> "http://101.32.42.213:8001"
NetworkType.TestNet -> "http://101.32.42.213:8001"
}

fun instance(context: Context, account: String, privateKey: String, networkType: NetworkType = NetworkType.MainNet, walletId: String = "unique-id"): EosKit {
val database = KitDatabase.create(context, getDatabaseName(networkType, walletId))
val storage = Storage(database)

val rpcProvider = EosioJavaRpcProviderImpl("http://47.244.129.130:8001")
val rpcProvider = EosioJavaRpcProviderImpl("http://101.32.42.213:8001")
val serializationProvider = AbiEosSerializationProviderImpl()
val abiProvider = ABIProviderImpl(rpcProvider, serializationProvider)
val signatureProvider = SoftKeySignatureProviderImpl().apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class TransactionManager(
val session = TransactionSession(serializationProvider, rpcProvider, abiProvider, signatureProvider)
val processor = session.transactionProcessor
var vid:String = "vid" + name
val reqJson = "{\"creator\":\"liyan1234511\",\"name\":\""+name+"\",\"owner\":{\"threshold\":1,\"keys\": [{ \"key\": \"BACC51vvZ6cRxfdx8pQMAV56HFitzjqsHfB7VtnCb8vdX9BgMMRNsd\",\"weight\":1}],\"accounts\":[],\"waits\":[]},\"active\":{\"threshold\":1,\"keys\":[{\"key\":\"BACC51vvZ6cRxfdx8pQMAV56HFitzjqsHfB7VtnCb8vdX9BgMMRNsd\",\"weight\":1}],\"accounts\":[],\"waits\":[]},\"vid\":\""+vid+"\"}"
val reqJson = "{\"creator\":\"liyan1234511\",\"name\":\""+name+"\",\"owner\":{\"threshold\":1,\"keys\": [{ \"key\": \""+publicKey+"\",\"weight\":1}],\"accounts\":[],\"waits\":[]},\"active\":{\"threshold\":1,\"keys\":[{\"key\":\""+publicKey+"\",\"weight\":1}],\"accounts\":[],\"waits\":[]},\"vid\":\""+vid+"\"}"
val action = Action(token, "newaccount", listOf(Authorization("liyan1234511", "active")), reqJson.toString())

try {
Expand Down

0 comments on commit c8a3289

Please sign in to comment.