Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file removed .idea/caches/build_file_checksums.ser
Binary file not shown.
40 changes: 40 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 13 additions & 6 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'


repositories {
maven { url 'https://maven.fabric.io/public' }
// Add Google's Maven repository
google()
}
android {
compileSdkVersion = 28
Expand Down Expand Up @@ -166,10 +168,15 @@ dependencies {
implementation 'androidx.recyclerview:recyclerview:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation group: 'com.squareup.okhttp3', name: 'okhttp', version: '3.10.0'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
transitive = true
}

// Per https://firebase.google.com/support/release-notes/android#java
// The Firebase Android library firebase-core is no longer needed.
// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.3.0'

// Add the Google Analytics SDK.
implementation 'com.google.firebase:firebase-analytics:18.0.0'

implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation('androidx.work:work-runtime:2.0.1') {
exclude group: 'com.google.guava', module: 'listenablefuture'
Expand Down
5 changes: 2 additions & 3 deletions app/src/main/java/com/ravenwallet/RavenApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
import com.ravenwallet.tools.listeners.SyncReceiver;
import com.ravenwallet.tools.manager.InternetManager;
import com.ravenwallet.tools.util.Utils;
import com.crashlytics.android.Crashlytics;
import io.fabric.sdk.android.Fabric;
import com.google.firebase.crashlytics.FirebaseCrashlytics;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -52,7 +51,7 @@ public class RavenApp extends Application {
public void onCreate() {
super.onCreate();

Fabric.with(this, new Crashlytics());
FirebaseCrashlytics.getInstance();

mContext = this;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
import java.math.BigDecimal;
import java.util.Currency;

import io.fabric.sdk.android.services.common.SafeToast;

Comment on lines -34 to -35
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import did not appear used, so was removed

import static com.ravenwallet.tools.util.BRConstants.SATOSHIS;


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

import android.util.Log;

import com.crashlytics.android.Crashlytics;

//import com.google.firebase.crash.FirebaseCrash;

import com.google.firebase.crashlytics.FirebaseCrashlytics;

/**
* RavenWallet
Expand Down Expand Up @@ -38,8 +35,7 @@ public class BRReportsManager {
public static void reportBug(RuntimeException er, boolean crash) {
Log.e(TAG, "reportBug: ", er);
try {
// FirebaseCrash.report(er);
Crashlytics.logException(er);
FirebaseCrashlytics.getInstance().recordException(er);
} catch (Exception e) {
Log.e(TAG, "reportBug: failed to report to FireBase: ", e);
}
Expand All @@ -49,8 +45,7 @@ public static void reportBug(RuntimeException er, boolean crash) {
public static void reportBug(Exception er) {
Log.e(TAG, "reportBug: ", er);
try {
// FirebaseCrash.report(er);
Crashlytics.logException(er);
FirebaseCrashlytics.getInstance().recordException(er);
} catch (Exception e) {
Log.e(TAG, "reportBug: failed to report to FireBase: ", e);
}
Expand Down
12 changes: 4 additions & 8 deletions app/src/main/java/com/ravenwallet/tools/manager/SendManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
import com.ravenwallet.wallet.exceptions.InsufficientFundsException;
import com.ravenwallet.wallet.exceptions.SomethingWentWrong;
import com.ravenwallet.wallet.exceptions.SpendingNotAllowed;
import com.crashlytics.android.Crashlytics;
//import com.google.firebase.crash.FirebaseCrash;
import com.google.firebase.crashlytics.FirebaseCrashlytics;

import java.math.BigDecimal;
import java.util.Locale;
Expand Down Expand Up @@ -104,8 +103,7 @@ public void run() {
if (!timedOut)
tryPay(app, payment, walletManager);
else
// FirebaseCrash.report(new NullPointerException("did not send, timedOut!"));
Crashlytics.logException(new NullPointerException("did not send, timedOut!"));
FirebaseCrashlytics.getInstance().recordException(new NullPointerException("did not send, timedOut!"));
return; //return so no error is shown
} catch (InsufficientFundsException ignored) {
errTitle[0] = app.getString(R.string.Alerts_sendFailure);
Expand Down Expand Up @@ -135,8 +133,7 @@ public void onClick(BRDialogView brDialogView) {
return;
} catch (FeeOutOfDate ex) {
//Fee is out of date, show not connected error
// FirebaseCrash.report(ex);
Crashlytics.logException(ex);
FirebaseCrashlytics.getInstance().recordException(ex);
BRExecutor.getInstance().forMainThreadTasks().execute(new Runnable() {
@Override
public void run() {
Expand All @@ -151,8 +148,7 @@ public void onClick(BRDialogView brDialogView) {
return;
} catch (SomethingWentWrong somethingWentWrong) {
somethingWentWrong.printStackTrace();
// FirebaseCrash.report(somethingWentWrong);
Crashlytics.logException(somethingWentWrong);
FirebaseCrashlytics.getInstance().recordException(somethingWentWrong);
BRExecutor.getInstance().forMainThreadTasks().execute(new Runnable() {
@Override
public void run() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import com.ravenwallet.tools.listeners.SyncReceiver;
import com.ravenwallet.tools.threads.executor.BRExecutor;
import com.ravenwallet.wallet.abstracts.BaseWalletManager;
import com.crashlytics.android.Crashlytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;

import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -122,8 +122,9 @@ public void run() {
}
} catch (InterruptedException e) {
Log.e(TAG, "run: " + getName(), e);
Crashlytics.log("run: " + getName() + " " + e.getMessage());
Crashlytics.logException(e);
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
crashlytics.log("run: " + getName() + " " + e.getMessage());
crashlytics.recordException(e);
final double syncProgress = mCurrentWallet.getPeerManager().getSyncProgress(BRSharedPrefs.getStartHeight(mApp, mCurrentWallet.getIso(mApp)));
BRExecutor.getInstance().forMainThreadTasks().execute(new Runnable() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import android.util.Log;
import android.widget.Toast;

import com.crashlytics.android.Crashlytics;
import com.google.firebase.crashlytics.FirebaseCrashlytics;
import com.platform.addressBook.AddressBookRepository;
import com.platform.assets.Asset;
import com.platform.assets.AssetType;
Expand Down Expand Up @@ -222,17 +222,20 @@ public void updateFee(Context app) {
fee = obj.getLong("fee_per_kb");
economyFee = obj.getLong("fee_per_kb_economy");

FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();


if (fee != 0 && fee < getWallet().getMaxFeePerKb()) {
BRSharedPrefs.putFeePerKb(app, getIso(app), fee);
getWallet().setFeePerKb(BRSharedPrefs.getFavorStandardFee(app, getIso(app)) ? fee : economyFee);
BRSharedPrefs.putFeeTime(app, getIso(app), System.currentTimeMillis()); //store the time of the last successful fee fetch
} else {
Crashlytics.logException(new NullPointerException("Fee is weird:" + fee));
crashlytics.recordException(new NullPointerException("Fee is weird:" + fee));
}
if (economyFee != 0 && economyFee < getWallet().getMaxFeePerKb()) {
BRSharedPrefs.putEconomyFeePerKb(app, getIso(app), economyFee);
} else {
Crashlytics.logException(new NullPointerException("Economy fee is weird:" + economyFee));
crashlytics.recordException(new NullPointerException("Economy fee is weird:" + economyFee));
}
} catch (JSONException e) {
Log.e(TAG, "updateFeePerKb: FAILED: " + jsonString, e);
Expand Down
15 changes: 7 additions & 8 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,20 @@
buildscript {
repositories {
// You need to add the following repository to download the
// new plugin.
// new plugin. `google()` is Google's Maven repository
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.1'
classpath 'com.android.tools.build:gradle:4.1.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle filesSystem.loadLibrary
classpath 'com.google.gms:google-services:4.2.0'
// Add dependency
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:4.3.4'

// Add the Crashlytics Gradle plugin (use v2.0.0+ if you built
// your app with Android Studio 4.1).
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
}

}
Expand Down
4 changes: 2 additions & 2 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Thu Mar 12 09:02:29 MDT 2020
#Sat Nov 14 00:24:02 EST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip