@@ -129,14 +129,14 @@ private static byte[] convertStringToByte(@NonNull String data) {
129
129
}
130
130
131
131
@ ReactMethod
132
- public void init (String identityString , String storePath , String bloxAddr , Promise promise ) {
132
+ public void init (String identityString , String storePath , String bloxAddr , String exchange , Promise promise ) {
133
133
Log .d ("ReactNative" , "init started" );
134
134
ThreadUtils .runOnExecutor (() -> {
135
135
try {
136
136
Log .d ("ReactNative" , "init storePath= " + storePath );
137
137
byte [] identity = toByte (identityString );
138
138
Log .d ("ReactNative" , "init identity= " + identityString );
139
- String [] obj = initInternal (identity , storePath , bloxAddr );
139
+ String [] obj = initInternal (identity , storePath , bloxAddr , exchange );
140
140
Log .d ("ReactNative" , "init object created: [ " + obj [0 ] + ", " + obj [1 ] + ", " + obj [2 ] + " ]" );
141
141
promise .resolve (obj );
142
142
} catch (Exception e ) {
@@ -171,7 +171,7 @@ private byte[] createPeerIdentity(byte[] privateKey) throws Exception {
171
171
}
172
172
173
173
@ NonNull
174
- private String [] initInternal (byte [] identity , String storePath , String bloxAddr ) throws Exception {
174
+ private String [] initInternal (byte [] identity , String storePath , String bloxAddr , String exchange ) throws Exception {
175
175
try {
176
176
Config config_ext = new Config ();
177
177
if (storePath == null || storePath .trim ().isEmpty ()) {
@@ -186,6 +186,7 @@ private String[] initInternal(byte[] identity, String storePath, String bloxAddr
186
186
Log .d ("ReactNative" , "peerIdentity is set: " + toString (config_ext .getIdentity ()));
187
187
config_ext .setBloxAddr (bloxAddr );
188
188
Log .d ("ReactNative" , "bloxAddr is set: " + config_ext .getBloxAddr ());
189
+ config_ext .setExchange (exchange );
189
190
this .fula = Fulamobile .newClient (config_ext );
190
191
this .client = new Client (this .fula );
191
192
Log .d ("ReactNative" , "fula initialized: " + this .fula .id ());
0 commit comments