Skip to content
Permalink
Browse files

Merge pull request #6 from v-almonacid/master

react-native upgrading WIP
  • Loading branch information...
v-almonacid committed Jul 11, 2019
2 parents 746c29c + 42a8d91 commit b58100cb33644869e8c0a2c84e7cebe90a233f9a
@@ -1,7 +1,7 @@
buildscript {
ext {
kotlin_version = '1.2.71'
gradle_version = '3.1.4'
kotlin_version = '1.3.0'
gradle_version = '3.3.1'
}

repositories {
@@ -22,12 +22,12 @@ apply plugin: 'kotlin-android'
apply plugin: 'org.mozilla.rust-android-gradle.rust-android'

android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
compileSdkVersion 28
buildToolsVersion "28.0.3"

defaultConfig {
minSdkVersion 21
targetSdkVersion 26
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
@@ -62,7 +62,7 @@ repositories {
}

dependencies {
implementation 'com.facebook.react:react-native:0.57.+'
implementation 'com.facebook.react:react-native:0.59.+'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

@@ -77,4 +77,3 @@ afterEvaluate {
tasks["generate${productFlavor}${buildType}Assets"].dependsOn(tasks["cargoBuild"])
}
}

@@ -56,8 +56,8 @@ object Convert {
val json = JSONArray()
for (i in 0 until array.size()) {
when (array.getType(i)) {
ReadableType.Array -> json.put(this.json(array.getArray(i)))
ReadableType.Map -> json.put(this.json(array.getMap(i)))
ReadableType.Array -> json.put(this.json(array.getArray(i)!!))
ReadableType.Map -> json.put(this.json(array.getMap(i)!!))
ReadableType.Boolean -> json.put(array.getBoolean(i))
ReadableType.Null, null -> json.put(JSONObject.NULL)
ReadableType.Number -> json.put(array.getDouble(i))
@@ -73,8 +73,8 @@ object Convert {
var key: String? = if (iterator.hasNextKey()) { iterator.nextKey() } else { null }
while (key != null) {
when (map.getType(key)) {
ReadableType.Array -> json.put(key, this.json(map.getArray(key)))
ReadableType.Map -> json.put(key, this.json(map.getMap(key)))
ReadableType.Array -> json.put(key, this.json(map.getArray(key)!!))
ReadableType.Map -> json.put(key, this.json(map.getMap(key)!!))
ReadableType.Boolean -> json.put(key, map.getBoolean(key))
ReadableType.Null, null -> json.put(key, JSONObject.NULL)
ReadableType.Number -> json.put(key, map.getDouble(key))
@@ -114,4 +114,4 @@ object Convert {
this.checkError(json)
return json.getBoolean("result")
}
}
}
@@ -89,7 +89,7 @@ class Wallet(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule
.map { obj ->
obj.putString(
"cbor_encoded_tx",
Convert.string(Convert.bytes(obj.getArray("cbor_encoded_tx")))
Convert.string(Convert.bytes(obj.getArray("cbor_encoded_tx")!!))
)
obj
}
@@ -114,7 +114,7 @@ class Wallet(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule
.map { obj ->
obj.putString(
"cbor_encoded_tx",
Convert.string(Convert.bytes(obj.getArray("cbor_encoded_tx")))
Convert.string(Convert.bytes(obj.getArray("cbor_encoded_tx")!!))
)
obj
}
@@ -123,4 +123,4 @@ class Wallet(reactContext: ReactApplicationContext) : ReactContextBaseJavaModule
promise.reject(err)
}
}
}
}
@@ -15,10 +15,10 @@
"author": "Crossroad Labs <info@crossroad.io>",
"license": "Apache-2.0",
"peerDependencies": {
"react-native": "^0.57.0"
"react-native": "^0.59.0"
},
"devDependencies": {
"react-native": "^0.57.0"
"react-native": "^0.59.0"
},
"rnpm": {
"ios": {

0 comments on commit b58100c

Please sign in to comment.
You can’t perform that action at this time.