Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flipper integration #5941

Open
wants to merge 71 commits into
base: pawan/2.0.90_satcard_claim_flow
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
3a4697d
Added flipper debugger integration
PraneethGunas May 12, 2022
8ad84d9
Merge pull request #5915 from bithyve/feature/2.0.90
cakesoft-shashank Aug 3, 2022
97a697d
secondary share backup fix
Parsh Aug 4, 2022
6d3f66c
Merge pull request #5917 from bithyve/smShareFix
Parsh Aug 4, 2022
8201ea0
Flipper integration for Hexa
PraneethGunas Aug 11, 2022
67b0c2d
updated satsflow
PraneethGunas Aug 16, 2022
971302d
spend code + claim sats method applied
pawan86paliwa Aug 16, 2022
ef854b1
Manage navigation & set dynamic code & balance for Satscard Flow test
pawan86paliwa Aug 16, 2022
fd18b59
updated satsflow
PraneethGunas Aug 17, 2022
4205072
Add error message when satscard not detect
pawan86paliwa Aug 18, 2022
3c1b971
comment not imports
pawan86paliwa Aug 18, 2022
f1d3954
remove unused imports
pawan86paliwa Aug 18, 2022
d42c541
Merge pull request #5947 from bithyve/2.0.90_satcard_claim_flow_w_fli…
Pawan2792 Aug 18, 2022
22c5332
Version Update(2.0.90) 492
pawan86paliwa Aug 18, 2022
af09b75
Merge pull request #5948 from bithyve/2.0.90_satcard_claim_flow_w_fli…
Pawan2792 Aug 18, 2022
451f233
Merge pull request #5949 from bithyve/feature/2.0.90
cakesoft-shashank Aug 18, 2022
fd5ce44
Added .yarnrc file
pawan86paliwa Aug 18, 2022
14baceb
Merge pull request #5951 from bithyve/feature/2.0.90
cakesoft-shashank Aug 18, 2022
e8b45f4
Claim flow method is changed
pawan86paliwa Aug 18, 2022
d1beaf2
Android build issue (decrease compileSdkVersion = 30)
pawan86paliwa Aug 18, 2022
6435726
update compileSdkVersion = 31 again
pawan86paliwa Aug 18, 2022
b95b4ed
resolve 5940
aniketrochwani Aug 19, 2022
32a48fd
resolve 5935
aniketrochwani Aug 19, 2022
d700218
Changes claim Method & create separate Saga
pawan86paliwa Aug 19, 2022
b3dcc3b
Merge branch '2.0.90_pawan/SatCard_claim-Method' into 2.0.90_satcard_…
pawan86paliwa Aug 22, 2022
9c0769a
Merge pull request #5958 from bithyve/aniket/2.0.90_issue_5940
cakesoft-shashank Aug 22, 2022
889735c
Merge pull request #5959 from bithyve/aniket/2.0.90_issue_5935
cakesoft-shashank Aug 22, 2022
b694518
fetchBalanceTx: address based
Parsh Aug 23, 2022
8b7d220
Sweep private key: mech
Parsh Aug 23, 2022
540449e
Merge branch 'feature/2.0.90' into satscard
Parsh Aug 23, 2022
5dd0798
Merge pull request #5967 from bithyve/satscard
Parsh Aug 23, 2022
ab12b83
Merge branch 'feature/2.0.90' into 2.0.90_satcard_claim_flow_w_flipper
pawan86paliwa Aug 23, 2022
6f93f11
transaction code applied
pawan86paliwa Aug 24, 2022
386919b
resolve 5960
aniketrochwani Aug 24, 2022
bce12f6
Merge pull request #5970 from bithyve/aniket/2.0.90_issue_5960
cakesoft-shashank Aug 24, 2022
f8bf799
updated satscard flow
PraneethGunas Aug 24, 2022
6aec155
Merge branch 'feature/2.0.90' into 2.0.90_satcard_claim_flow_w_flipper
pawan86paliwa Aug 24, 2022
96ba3fe
Merge pull request #5972 from bithyve/2.0.90_satcard_claim_flow_w_fli…
Pawan2792 Aug 24, 2022
0c761c4
Fixed Issues #5934 #5907 #5932 #5887 #5386
Vatsal032 Aug 24, 2022
6e8f70f
Resolved #5963 issue
pawan86paliwa Aug 24, 2022
a55e0b2
Apply null check for a condition
pawan86paliwa Aug 24, 2022
7ea63c5
Merge pull request #5976 from bithyve/2.0.90_satcard_claim_flow_w_fli…
cakesoft-shashank Aug 25, 2022
3d2d1e8
update version 493
pawan86paliwa Aug 25, 2022
ef69edd
Merge pull request #5977 from bithyve/2.0.90_satcard_claim_flow_w_fli…
Pawan2792 Aug 25, 2022
e98693a
Fixed Issues #5981
Vatsal032 Aug 26, 2022
6f3c5ac
Merge branch 'feature/2.0.90' into 2.0.90_satcard_claim_flow_w_flipper
pawan86paliwa Aug 29, 2022
eafd228
Merge pull request #5990 from bithyve/2.0.90_satcard_claim_flow_w_fli…
cakesoft-shashank Aug 29, 2022
21fd9d1
Version update 2.0.90(494)
pawan86paliwa Aug 29, 2022
142c095
Merge branch 'feature/2.0.90' of https://github.com/bithyve/hexa into…
Vatsal032 Aug 29, 2022
4ca77c9
Fixed Issues #5386
Vatsal032 Aug 29, 2022
07cb564
Merge pull request #5975 from bithyve/vatsal/2.0.90
Pawan2792 Aug 29, 2022
0ba9de5
update version 2.0.90 (495)
pawan86paliwa Aug 29, 2022
4a518c2
resolve issue 5997
aniketrochwani Aug 31, 2022
35f1407
Merge pull request #6008 from bithyve/aniket/2.0.90_issue_5997
cakesoft-shashank Sep 1, 2022
1363956
Minor fixes for change to seed
pawan86paliwa Sep 1, 2022
a87bbe8
Archive Functionality is completed & Sweep fund functionality commented
pawan86paliwa Sep 2, 2022
ac1216d
Resolve #5988 (Icon alignment of bottom tab)
pawan86paliwa Sep 2, 2022
7bfb137
Merge branch 'feature/2.0.90' into 2.0.90_satcard_claim_flow_w_flipper
pawan86paliwa Sep 2, 2022
030daa8
Version update (496)
pawan86paliwa Sep 2, 2022
c36e400
Merge pull request #6012 from bithyve/2.0.90_satcard_claim_flow_w_fli…
Pawan2792 Sep 2, 2022
e412aee
resolve 5997
aniketrochwani Sep 4, 2022
25b8238
Fixed Issues #6009
Vatsal032 Sep 5, 2022
e380ead
Merge pull request #6019 from bithyve/aniket/2.0.90_issue_5997
Pawan2792 Sep 5, 2022
6d28292
Merge pull request #6020 from bithyve/vatsal/2.0.90
Pawan2792 Sep 5, 2022
4208ee6
resolve issue 5946
aniketrochwani Sep 5, 2022
3b34277
Resolved #5957 (External Seed words issue )
pawan86paliwa Sep 6, 2022
d46710b
Resolved #6003 & #6015
pawan86paliwa Sep 6, 2022
c6aafae
Resolved #5957 (External seed word issue part Saga)
pawan86paliwa Sep 6, 2022
cd1909e
Resolve #6021 & #5968 & #5979
pawan86paliwa Sep 6, 2022
2711b03
Merge pull request #6023 from bithyve/aniket/2.0.90_issue_5946
Pawan2792 Sep 6, 2022
542238a
Merge branch 'feature/2.0.90' into 2.0.90_satcard_claim_flow_w_flipper
pawan86paliwa Sep 6, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,15 @@ dependencies {
implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
exclude group: 'org.apache.httpcomponents'
}
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
}

// Run this once to be able to run the application with BUCK
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package io.hexawallet.hexa;

import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;

public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);

client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new ReactFlipperPlugin());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());

NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
NetworkingModule.setCustomClientBuilder(
new NetworkingModule.CustomClientBuilder() {
@Override
public void apply(OkHttpClient.Builder builder) {
builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
}
});
client.addPlugin(networkFlipperPlugin);
client.start();

// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceManager.ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}
32 changes: 32 additions & 0 deletions android/app/src/main/java/io/hexawallet/hexa/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,37 @@ public ReactNativeHost getReactNativeHost() {
public void onCreate() {
super.onCreate();
SoLoader.init(this, /* native exopackage */ false);
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}

/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("io.hexawallet.hexa.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
3 changes: 3 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ MYAPP_UPLOAD_KEY_PASSWORD=developer
firebaseMessagingVersion=21.1.0
org.gradle.daemon=true
org.gradle.jvmargs=-Xmx4096m

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.99.0
Loading