Skip to content

Commit

Permalink
Merge branch 'master' to shubham/wiring-up-endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
shubhamkmr04 committed Mar 28, 2024
2 parents 005837f + 2e578c4 commit 930d9a7
Show file tree
Hide file tree
Showing 73 changed files with 3,094 additions and 1,584 deletions.
5 changes: 5 additions & 0 deletions Navigation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ import RestoreChannelBackups from './views/Settings/EmbeddedNode/RestoreChannelB

import RawTxHex from './views/RawTxHex';

import CustodialWalletWarning from './views/Settings/CustodialWalletWarning';

const AppScenes = {
Wallet: {
screen: Wallet
Expand Down Expand Up @@ -445,6 +447,9 @@ const AppScenes = {
},
SetNodePicture: {
screen: SetNodePicture
},
CustodialWalletWarning: {
screen: CustodialWalletWarning
}
};

Expand Down
9 changes: 6 additions & 3 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

apply plugin: "com.google.protobuf"

apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"

// LN address notifications
apply plugin: "com.google.gms.google-services"
Expand Down Expand Up @@ -94,13 +94,14 @@ def enableSeparateBuildPerCPUArchitecture = true
def nativeArchitectures = project.getProperties().get("reactNativeDebugArchitectures")

android {
namespace "app.zeusln.zeus"
defaultConfig {
compileSdk rootProject.ext.compileSdkVersion
applicationId "app.zeusln.zeus"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 84
versionName "0.8.3-alpha"
versionName "0.8.3-beta1"
multiDexEnabled true
missingDimensionStrategy 'react-native-camera', 'general'
}
Expand Down Expand Up @@ -179,10 +180,12 @@ android {
}

dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.multidex:multidex:2.0.1'
implementation project(':react-native-randombytes')
implementation "com.facebook.react:react-native:0.70.6!!" // From node_modules
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public ListenableFuture<Result> startWork() {
writeLastScheduledSyncAttemptToDb();

// Hyperlog.i(TAG, "MainActivity.started = " + MainActivity.started);
if (persistentServicesEnabled || MainActivity.started) {
if (persistentServicesEnabled || MainActivity.Companion.getStarted()) {
// Hyperlog.i(TAG, "MainActivity is started or persistentServicesEnabled = " + persistentServicesEnabled + ", quitting job");
completer.set(Result.success());
return null;
Expand Down
12 changes: 6 additions & 6 deletions android/app/src/main/java/com/zeus/LndMobileTools.java
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ public void copyLndLog(String network, Promise promise) {
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TITLE, "lnd.log");
if (network == "testnet") {
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.INTENT_COPYLNDLOGTESTNET);
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.Companion.getINTENT_COPYLNDLOGTESTNET());
} else {
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.INTENT_COPYLNDLOG);
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.Companion.getINTENT_COPYLNDLOG());
}
promise.resolve(true);
}
Expand Down Expand Up @@ -268,14 +268,14 @@ private void readToEnd(BufferedReader buf, boolean emit) throws IOException {

@ReactMethod
public void saveChannelsBackup(String base64Backups, Promise promise) {
MainActivity.tmpChanBackup = Base64.decode(base64Backups, Base64.NO_WRAP);
MainActivity.Companion.setTmpChanBackup(Base64.decode(base64Backups, Base64.NO_WRAP));
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");

Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT);
intent.addCategory(Intent.CATEGORY_OPENABLE);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TITLE, "zeus-channels-backup-" + dateFormat.format(new Date()) + ".bin");
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.INTENT_EXPORTCHANBACKUP);
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.Companion.getINTENT_EXPORTCHANBACKUP());
promise.resolve(true);
}

Expand All @@ -288,9 +288,9 @@ public void saveChannelBackupFile(String network, Promise promise) {
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TITLE, "zeus-channels-backup-" + dateFormat.format(new Date()) + ".bin");
if (network == "testnet") {
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.INTENT_EXPORTCHANBACKUPFILETESTNET);
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.Companion.getINTENT_EXPORTCHANBACKUPFILETESTNET());
} else {
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.INTENT_EXPORTCHANBACKUPFILE);
getReactApplicationContext().getCurrentActivity().startActivityForResult(intent, MainActivity.Companion.getINTENT_EXPORTCHANBACKUPFILE());
}
promise.resolve(true);
}
Expand Down
159 changes: 0 additions & 159 deletions android/app/src/main/java/com/zeus/MainActivity.java

This file was deleted.

Loading

0 comments on commit 930d9a7

Please sign in to comment.