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

🥳[Feature] Add bech32 to enable ltc1 addresses & false positive rate (Bloom Filter) interface #137

Merged
merged 12 commits into from
Apr 8, 2023
Merged
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ app/src/main/jni/transition/testingStuff.c
# Built application files
*.apk
*.ap_
*/release/*.aab

# Files for the Dalvik VM
*.dex
Expand Down
3 changes: 3 additions & 0 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ add_library( # Specifies the name of the library.
src/main/jni/loafwallet-core/BRTransaction.h
src/main/jni/loafwallet-core/BRWallet.c
src/main/jni/loafwallet-core/BRWallet.h
src/main/jni/loafwallet-core/BRChainParams.h
src/main/jni/loafwallet-core/BRBech32.c
src/main/jni/loafwallet-core/BRBech32.h

src/main/jni/transition/core.c
src/main/jni/transition/core.h
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ android {
applicationId = 'com.loafwallet'
minSdkVersion 27
targetSdkVersion 32
versionCode 725
versionName "v2.8.1"
versionCode 730
versionName "v2.8.4"
multiDexEnabled true
archivesBaseName = "${versionName}(${versionCode})"

Expand Down
Binary file removed app/loaf/release/v2.4.0(641)-loaf-release.aab
Binary file not shown.
Binary file removed app/loaf/release/v2.4.2(1)-loaf-release.aab
Binary file not shown.
4 changes: 2 additions & 2 deletions app/src/main/java/com/breadwallet/BreadApp.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onCreate() {
}

// setup Timber
Timber.plant(BuildConfig.DEBUG ? new Timber.DebugTree() : new CrashReportingTree());
Timber.plant(new Timber.DebugTree());

FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(enableCrashlytics);
AnalyticsManager.init(this);
Expand Down Expand Up @@ -98,7 +98,7 @@ public static void onStop(final BRActivity app) {
public void run() {
if (isAppInBackground(app)) {
backgroundedTime = System.currentTimeMillis();
Timber.d("App went in background!");
Timber.d("timber: App went in background!");
// APP in background, do something
isBackgroundChecker.cancel();
fireListeners();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ protected void onCreate(Bundle savedInstanceState) {
initializeViews();
setPriceTags(BRSharedPrefs.getPreferredLTC(BreadActivity.this), false);
setListeners();

setUpBarFlipper();
checkTransactionDatabase();

primaryPrice.setTextSize(PRIMARY_TEXT_SIZE);
secondaryPrice.setTextSize(SECONDARY_TEXT_SIZE);
Expand Down Expand Up @@ -138,7 +138,7 @@ private void showInAppReviewDialogIfNeeded() {
// The flow has finished. The API does not indicate whether the user
// reviewed or not, or even whether the review dialog was shown. Thus, no
// matter the result, we continue our app flow.
Timber.i("In-app LaunchReviewFlow completed successful (%s)", task1.isSuccessful());
Timber.i("timber: In-app LaunchReviewFlow completed successful (%s)", task1.isSuccessful());
if (task1.isSuccessful()) {
BRSharedPrefs.inAppReviewDone(BreadActivity.this);
}
Expand Down Expand Up @@ -281,6 +281,10 @@ private void setPriceTags(boolean ltcPreferred, boolean animate) {
mHandler.postDelayed(() -> updateUI(), toolBarConstraintLayout.getLayoutTransition().getDuration(LayoutTransition.CHANGING));
}

private void checkTransactionDatabase() {

}

private void setUpBarFlipper() {
barFlipper.setInAnimation(AnimationUtils.loadAnimation(this, R.anim.flipper_enter));
barFlipper.setOutAnimation(AnimationUtils.loadAnimation(this, R.anim.flipper_exit));
Expand Down Expand Up @@ -435,7 +439,7 @@ public void onConnectionChanged(boolean isConnected) {
}
BRExecutor.getInstance().forLightWeightBackgroundTasks().execute(() -> {
final double progress = BRPeerManager.syncProgress(BRSharedPrefs.getStartHeight(BreadActivity.this));
Timber.d("Sync Progress: %s", progress);
Timber.d("timber: Sync Progress: %s", progress);
if (progress < 1 && progress > 0) {
SyncManager.getInstance().startSyncingProgressThread();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,11 @@ protected void onPause() {

private void handleClick(String key) {
if (!inputAllowed) {
Timber.d("handleClick: input not allowed");
Timber.d("timber: handleClick: input not allowed");
return;
}
if (key == null) {
Timber.d("handleClick: key is null! ");
Timber.d("timber: handleClick: key is null! ");
return;
}

Expand All @@ -224,7 +224,7 @@ private void handleClick(String key) {
} else if (Character.isDigit(key.charAt(0))) {
handleDigitClick(Integer.parseInt(key.substring(0, 1)));
} else {
Timber.d("handleClick: oops: %s", key);
Timber.d("timber: handleClick: oops: %s", key);
}
}

Expand Down Expand Up @@ -313,7 +313,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
// permission was granted, yay! Do the
// contacts-related task you need to do.
} else {
Timber.i("onRequestPermissionsResult: permission isn't granted for: %s", requestCode);
Timber.i("timber: onRequestPermissionsResult: permission isn't granted for: %s", requestCode);
// permission denied, boo! Disable the
// functionality that depends on this permission.
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void onPause() {
private void handleClick(String key) {
if (!isPressAllowed) return;
if (key == null) {
Timber.d("handleClick: key is null! ");
Timber.d("timber: handleClick: key is null! ");
return;
}

Expand All @@ -104,7 +104,7 @@ private void handleClick(String key) {
} else if (Character.isDigit(key.charAt(0))) {
handleDigitClick(Integer.parseInt(key.substring(0, 1)));
} else {
Timber.d("handleClick: oops: %s", key);
Timber.d("timber: handleClick: oops: %s", key);
}
}

Expand Down Expand Up @@ -171,7 +171,7 @@ public void onComplete() {
}
} else {
AuthManager.getInstance().authFail(this);
Timber.d("verifyPin: FAIL: firs: %s, reEnter: %s ", firstPIN, pin);
Timber.d("timber: verifyPin: FAIL: firs: %s, reEnter: %s ", firstPIN, pin);
SpringAnimator.failShakeAnimation(this, pinLayout);
pin = new StringBuilder();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@ protected void onCreate(Bundle savedInstanceState) {
keyboard = (BRKeyboard) findViewById(R.id.brkeyboard);
title = (TextView) findViewById(R.id.title);


//TODO: all views are using the layout of this button. Views should be refactored without it
// Hiding until layouts are built.
faq = (ImageButton) findViewById(R.id.faq_button);

dot1 = findViewById(R.id.dot1);
dot2 = findViewById(R.id.dot2);
dot3 = findViewById(R.id.dot3);
Expand Down Expand Up @@ -82,7 +82,7 @@ protected void onPause() {

private void handleClick(String key) {
if (key == null) {
Timber.d("handleClick: key is null! ");
Timber.d("timber: handleClick: key is null! ");
return;
}

Expand All @@ -91,7 +91,7 @@ private void handleClick(String key) {
} else if (Character.isDigit(key.charAt(0))) {
handleDigitClick(Integer.parseInt(key.substring(0, 1)));
} else {
Timber.d("handleClick: oops: %s", key);
Timber.d("timber: handleClick: oops: %s", key);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ protected void onPause() {

private void handleClick(String key) {
if (key == null) {
Timber.d("handleClick: key is null! ");
Timber.d("timber: handleClick: key is null! ");
return;
}

Expand All @@ -104,7 +104,7 @@ private void handleClick(String key) {
} else if (Character.isDigit(key.charAt(0))) {
handleDigitClick(Integer.parseInt(key.substring(0, 1)));
} else {
Timber.d("handleClick: oops: %s", key);
Timber.d("timber: handleClick: oops: %s", key);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ private static Size chooseOptimalSize(Size[] choices, int textureViewWidth,
} else if (notBigEnough.size() > 0) {
return Collections.max(notBigEnough, new CompareSizesByArea());
} else {
Timber.d("Couldn't find any suitable preview size");
Timber.d("timber: Couldn't find any suitable preview size");
return choices[0];
}
}
Expand Down Expand Up @@ -473,7 +473,7 @@ private void setUpCameraOutputs(int width, int height) {
}
break;
default:
Timber.d("Display rotation is invalid: %s", displayRotation);
Timber.d("timber: Display rotation is invalid: %s", displayRotation);
}

Point displaySize = new Point();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ protected void onCreate(final Bundle savedInstanceState) {
== PackageManager.PERMISSION_GRANTED) {
initQRCodeReaderView();
} else {
Timber.d("onCreate: Permissions needed? HUH?");
Timber.d("timber: onCreate: Permissions needed? HUH?");
}

new Handler().postDelayed(new Runnable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public void run() {
final long startTime = System.currentTimeMillis();
APIClient apiClient = APIClient.getInstance(IntroActivity.this);
long endTime = System.currentTimeMillis();
Timber.d("updateBundle DONE in %sms",endTime - startTime);
Timber.d("timber: updateBundle DONE in %sms",endTime - startTime);
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@

public class AboutActivity extends BRActivity {
private static final String TAG = AboutActivity.class.getName();
// private TextView termsText;
private TextView policyText;
private TextView infoText;
private TextView versionText;

private ImageView instagramShare;
private ImageView twitterShare;
Expand All @@ -45,13 +44,13 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_about);

infoText = (TextView) findViewById(R.id.info_text);
versionText = (TextView) findViewById(R.id.version_text);
policyText = (TextView) findViewById(R.id.policy_text);
instagramShare = (ImageView) findViewById(R.id.instagram_share_button);
twitterShare = (ImageView) findViewById(R.id.twitter_share_button);
blogShare = (ImageView) findViewById(R.id.blog_share_button);

infoText.setText(BRConstants.APP_VERSION_NAME_CODE);
versionText.setText(BRConstants.APP_VERSION_NAME_CODE);

instagramShare.setOnClickListener(new View.OnClickListener() {
@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected void onCreate(Bundle savedInstanceState) {
public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
Activity app = FingerprintActivity.this;
if (isChecked && !Utils.isFingerprintEnrolled(app)) {
Timber.d("onCheckedChanged: fingerprint not setup");
Timber.d("timber: onCheckedChanged: fingerprint not setup");
BRDialog.showCustomDialog(app, getString(R.string.TouchIdSettings_disabledWarning_title_android), getString(R.string.TouchIdSettings_disabledWarning_body_android), getString(R.string.Button_ok), null, new BRDialogView.BROnClickListener() {
@Override
public void onClick(BRDialogView brDialogView) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import com.breadwallet.tools.manager.BRSharedPrefs;
import com.breadwallet.tools.security.AuthManager;
import com.platform.APIClient;
import com.breadwallet.tools.animation.BRAnimator;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -126,6 +127,11 @@ private void populateItems() {

}, false));

/*Show Seed Phrase*/
items.add(new BRSettingsItem(getString(R.string.settings_show_seed), "", v -> {
BRAnimator.showBalanceSeedFragment(this);
}, false));

/*Wipe Start_Recover Wallet*/
items.add(new BRSettingsItem(getString(R.string.Settings_wipe), "", v -> {
Intent intent = new Intent(SettingsActivity.this, WipeActivity.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ protected void onCreate(Bundle savedInstanceState) {
@Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
Timber.d("onItemClick: %s", position);
Timber.d("timber: onItemClick: %s", position);
int limit = adapter.getItem(position);
BRKeyStore.putSpendLimit(limit, app);

Expand Down
Loading