Skip to content

Commit a962315

Browse files
kcw-gruntvsima
andauthored
πŸš€[ Release v.2.7.1] Merge into Main (#100)
* πŸ’£πŸž[Hotbug fix] sharedprefs fb fix (#19) * Added notes * Bugfix - add missing pendingIntent flag for android 13 * Use firebase bom * subproject commit * version bump * Disabled FB send, Added Get Tasks * Patch to hard code fees - Static fees - Removed the dep - Turn crashlytics back on/off/on Co-authored-by: Victor Sima <[email protected]> * πŸš€[ Release v.2.6.0] Merge into Develop (#13) * version bump * Hotfix/crashes v2.6.0 (#17) * Added notes * Bugfix - add missing pendingIntent flag for android 13 * Use firebase bom Co-authored-by: kcw-grunt <[email protected]> Co-authored-by: Victor Sima <[email protected]> * πŸš€[Release] v2.6.1 (#21) * version code bump * πŸš€[ Release v.2.6.0] Merge into Main (#12) * Added ΡƒΠΊΡ€Π°Ρ—Π½ΡΡŒΠΊΠΈΠΉ language - add uk xml file - removed the nl, sv, da files - Escaped apostrphes in UK strings file - Updated language choices * πŸ₯³[Feature] Unstoppable ext update (#11) * WIP: DNC Dropped in the UD code prior to testing * Added study link * Fix unstoppable domains dependency * Updated the UD ext text WIP::::Need to refactor once UK and deletion on SV, NL, DA * added UK lang Co-authored-by: Victor Sima <[email protected]> * version bump * Hotfix/crashes v2.6.0 (#17) * Added notes * Bugfix - add missing pendingIntent flag for android 13 * Use firebase bom Co-authored-by: kcw-grunt <[email protected]> Co-authored-by: Victor Sima <[email protected]> Co-authored-by: Victor Sima <[email protected]> * Feature/add bitrefill (#28) * added bitrefill - added kotlin fix * Added localizations - added logo * Added Bitrefill Link * hides fiat scollview from Bitrefill * Adjusted the padding at the buy tab item view * fixe test in Bitrefill detail * fied logo and layout * bump version and version code * Feature/update branding (#29) * added new logo - reset the layout * version code * Create ISSUE_TEMPLATE * Delete ISSUE_TEMPLATE * Create test.md * Create bug_report.md * Delete bug_report.md * Create feature.md * Create feature_request.md * Create request.md * Create spike.md * Create techdebt.md * Delete feature.md * Delete feature_request.md * Delete request.md * Delete spike.md * Delete tech_debt.md * Delete test.md * πŸš€[ Release v.2.7.0] Merge into Develop (#32) * replaced coin logo * bump versioncode * fixed dep version * added Bitrefill web listener * [Techdebt/] pdate match firebase events 33 (#48) * Added the equivalenmt events - updated web link * WIP : Should compile * Fixed constants * Udpaded all Analytics constants * Added basic tests - This is WIP - Need to debug the Tests * version bump * fiexd compile bug * version bump * renmoved staging * moved backup rates * code bump * Updated test configs * Move api resources to central location - version code bump Co-authored-by: Victor Sima <[email protected]>
1 parent 97146a2 commit a962315

25 files changed

+274
-82
lines changed

β€Ž.github/bug_report.md β€Ž.github/ISSUE_TEMPLATE/bug_report.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ If applicable, add screenshots or GIFs to help explain your problem.
3131
- Litewallet Version [e.g. v1.19.3]
3232

3333
**Additional context**
34-
Add any other context about the problem here.
34+
Add any other context about the problem here.

β€Ž.github/feature.md β€Ž.github/ISSUE_TEMPLATE/feature.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ assignees: 'mosadialiou'
3333

3434
|**Before**|**After**|
3535
|----------|---------|
36-
|<!-- Insert _before_ screenshot or gif-->|<!-- Insert _after_ screenshot or gif if you can-->|
36+
|<!-- Insert _before_ screenshot or gif-->|<!-- Insert _after_ screenshot or gif if you can-->|
File renamed without changes.

β€Ž.github/request.md β€Ž.github/ISSUE_TEMPLATE/request.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ assignees: 'kcw-grunt'
2020
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
2121

2222
**Additional context**
23-
<!-- Add any other context or screenshots about the feature request here. -->
23+
<!-- Add any other context or screenshots about the feature request here. -->

β€Ž.github/spike.md β€Ž.github/ISSUE_TEMPLATE/spike.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ labels: 'spike'
66
assignees: 'mosadialiou'
77

88
---
9-
## Subject
9+
## Subject

β€Ž.github/tech_debt.md β€Ž.github/ISSUE_TEMPLATE/techdebt.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ assignees: 'mosadialiou'
1414
## Definition of Done
1515
- [ ] Action 1
1616
- [ ] Action 2
17-
- [ ] Action N
17+
- [ ] Action N

β€Ž.idea/androidTestResultsUserPreferences.xml

+51
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Ž.idea/inspectionProfiles/Project_Default.xml

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

β€Žapp/build.gradle

+10-10
Original file line numberDiff line numberDiff line change
@@ -57,15 +57,15 @@ android {
5757
jvmTarget = JavaVersion.VERSION_1_8.toString()
5858
}
5959

60-
compileSdkVersion 31
60+
compileSdkVersion 32
6161

6262
defaultConfig {
6363
testInstrumentationRunner = 'androidx.test.runner.AndroidJUnitRunner'
6464
applicationId = 'com.loafwallet'
65-
minSdkVersion 27
66-
targetSdkVersion 31
67-
versionCode 684
68-
versionName "v2.7.0"
65+
minSdkVersion 27
66+
targetSdkVersion 32
67+
versionCode 705
68+
versionName "v2.7.1"
6969
multiDexEnabled true
7070
archivesBaseName = "${versionName}(${versionCode})"
7171

@@ -264,10 +264,10 @@ repositories {
264264
dependencies {
265265

266266
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
267-
androidTestImplementation 'androidx.test:rules:1.2.0'
268267
androidTestImplementation 'junit:junit:4.12'
269-
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
270-
268+
androidTestImplementation('androidx.test.espresso:espresso-core:3.4.0')
269+
androidTestImplementation('androidx.test:runner:1.4.0')
270+
androidTestImplementation('androidx.test:rules:1.4.0')
271271
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9'
272272
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.6.20-RC'
273273

@@ -280,10 +280,10 @@ dependencies {
280280

281281
// androidx
282282
implementation 'androidx.core:core-ktx:1.7.0'
283-
implementation 'androidx.appcompat:appcompat:1.4.1'
283+
implementation 'androidx.appcompat:appcompat:1.5.1'
284284
implementation 'androidx.legacy:legacy-support-v13:1.0.0'
285285
implementation 'androidx.recyclerview:recyclerview:1.2.1'
286-
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
286+
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
287287
implementation 'androidx.gridlayout:gridlayout:1.0.0'
288288
implementation 'androidx.cardview:cardview:1.0.0'
289289
// preferences

β€Žapp/src/test/java/PaperKeyTests.java β€Žapp/src/androidTest/java/com/breadwallet/PaperKeyTests.java

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
1+
package com.breadwallet;
2+
13
import android.util.Log;
24

3-
import com.breadwallet.tools.security.SmartValidator;
4-
import com.breadwallet.tools.util.BRConstants;
55
import com.breadwallet.tools.util.Bip39Reader;
6-
import com.breadwallet.tools.util.Utils;
76
import com.breadwallet.wallet.BRWalletManager;
87

9-
import org.apache.commons.io.FileUtils;
108
import org.apache.commons.io.IOUtils;
119
import org.junit.Test;
1210

13-
import java.io.File;
1411
import java.io.IOException;
1512
import java.io.InputStream;
16-
import java.net.URI;
17-
import java.net.URL;
1813
import java.util.ArrayList;
1914
import java.util.Arrays;
2015
import java.util.List;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
package com.breadwallet.analytics;
2+
import androidx.test.rule.ActivityTestRule;
3+
import androidx.test.ext.junit.runners.AndroidJUnit4;
4+
import android.util.Log;
5+
6+
import com.breadwallet.presenter.activities.intro.IntroActivity;
7+
import com.breadwallet.tools.manager.AnalyticsManager;
8+
import com.breadwallet.tools.util.BRConstants;
9+
10+
import org.junit.After;
11+
import org.junit.Assert;
12+
import org.junit.Before;
13+
import org.junit.Rule;
14+
import org.junit.Test;
15+
import org.junit.runner.RunWith;
16+
17+
@RunWith(AndroidJUnit4.class)
18+
public class AnalyticsTests {
19+
public static final String TAG = AnalyticsTests.class.getName();
20+
@Rule
21+
public ActivityTestRule<IntroActivity> mActivityRule = new ActivityTestRule<>(IntroActivity.class);
22+
23+
@Before
24+
public void setUp() {
25+
Log.e(TAG, "setUp: ");
26+
}
27+
28+
@After
29+
public void tearDown() {
30+
}
31+
32+
/// This needs to be debugged. Some logs:
33+
/// Error: WARNING: The option setting is experimental and unsupported
34+
/// Manifest merger failed with multiple errors, see logs
35+
/// Execution failed for task ':app:processLoafDebugAndroidTestManifest'.
36+
37+
@Test
38+
public void testFirebaseAnalyticsConstants() {
39+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20191105_AL));
40+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20191105_VSC));
41+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20202116_VRC));
42+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20191105_DSL));
43+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20191105_DTBT));
44+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200111_RNI));
45+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200111_FNI));
46+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200111_TNI));
47+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200111_WNI));
48+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200111_PNI));
49+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200111_UTST));
50+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200112_ERR));
51+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200112_DSR));
52+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200125_DSRR));
53+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20201118_DTGS));
54+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200217_DUWP));
55+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200217_DUWB));
56+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200223_DD));
57+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200225_DCD));
58+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200301_DUDFPK));
59+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20201121_SIL));
60+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20201121_DRIA));
61+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20201121_FRIA));
62+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20200207_DTHB));
63+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20210405_TAWDF));
64+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20210804_TAA2FAC));
65+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20210804_TAWDS));
66+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20210804_TAULI));
67+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20210804_TAULO));
68+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20210427_HCIEEH));
69+
Assert.assertNotNull(AnalyticsManager.logCustomEvent(BRConstants._20220822_UTOU));
70+
}
71+
}

β€Žapp/src/androidTest/java/com/breadwallet/platform/PlatformTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ public class PlatformTests {
3030
// proto is the transport protocol to use for talking to the API (either http or https)
3131
private static final String PROTO = "https";
3232
// host is the server(s) on which the API is hosted
33-
// private static final String HOST = "api.breadwallet.com";
3433
// convenience getter for the API endpoint
3534
private static final String BASE_URL = PROTO + "://" + BreadApp.HOST;
3635
//feePerKb url

β€Žapp/src/main/java/com/breadwallet/presenter/activities/LoginActivity.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ protected void onCreate(Bundle savedInstanceState) {
162162
@Override
163163
public void onComplete() {
164164
unlockWallet();
165-
AnalyticsManager.logCustomEvent(BRConstants._20200217_DLWB);
165+
AnalyticsManager.logCustomEvent(BRConstants._20200217_DUWB);
166166
}
167167

168168
@Override
@@ -298,7 +298,9 @@ private void updateDots() {
298298
if (AuthManager.getInstance().checkAuth(pin.toString(), LoginActivity.this)) {
299299
AuthManager.getInstance().authSuccess(LoginActivity.this);
300300
unlockWallet();
301-
AnalyticsManager.logCustomEvent(BRConstants._20200217_DLWP);
301+
AnalyticsManager.logCustomEvent(BRConstants._20200217_DUWB);
302+
AnalyticsManager.logCustomEvent(BRConstants._20200217_DUWB);
303+
302304
} else {
303305
AuthManager.getInstance().authFail(LoginActivity.this);
304306
showFailedToUnlock();
@@ -333,5 +335,6 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
333335

334336
@Override
335337
protected void onSaveInstanceState(Bundle outState) {
338+
super.onSaveInstanceState(outState);
336339
}
337340
}

β€Žapp/src/main/java/com/breadwallet/presenter/activities/settings/SyncBlockchainActivity.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import com.breadwallet.presenter.customviews.BRDialogView;
1414
import com.breadwallet.tools.animation.BRAnimator;
1515
import com.breadwallet.tools.animation.BRDialog;
16+
import com.breadwallet.tools.manager.AnalyticsManager;
1617
import com.breadwallet.tools.manager.BRSharedPrefs;
1718
import com.breadwallet.tools.threads.BRExecutor;
1819
import com.breadwallet.tools.util.BRConstants;
@@ -60,7 +61,7 @@ public void run() {
6061
BRSharedPrefs.putAllowSpend(SyncBlockchainActivity.this, false);
6162
BRPeerManager.getInstance().rescan();
6263
BRAnimator.startBreadActivity(SyncBlockchainActivity.this, false);
63-
64+
AnalyticsManager.logCustomEvent(BRConstants._20200112_DSR);
6465
}
6566
});
6667
}

β€Žapp/src/main/java/com/breadwallet/presenter/fragments/BuyTabFragment.java

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515

1616
import com.breadwallet.R;
1717
import com.breadwallet.presenter.entities.Partner;
18+
import com.breadwallet.tools.manager.AnalyticsManager;
19+
import com.breadwallet.tools.util.BRConstants;
1820

1921
import java.util.ArrayList;
2022
import java.util.List;
@@ -47,6 +49,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
4749
mRecyclerView.addItemDecoration(itemDecor);
4850

4951
mRecyclerView.setAdapter(new BuyPartnersAdapter(getContext(), getPartners()));
52+
AnalyticsManager.logCustomEvent(BRConstants._20191105_DTBT);
5053
}
5154

5255
private List<Partner> getPartners() {

β€Žapp/src/main/java/com/breadwallet/presenter/fragments/FragmentBuy.java

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package com.breadwallet.presenter.fragments;
22

3+
import static com.breadwallet.tools.util.BRConstants.LW_API_HOST;
4+
35
import android.annotation.TargetApi;
46
import android.app.Activity;
57
import android.content.ClipData;
@@ -45,7 +47,6 @@ public class FragmentBuy extends Fragment {
4547
private ProgressBar progress;
4648
private WebView webView;
4749
private String onCloseUrl;
48-
private static final String URL_BUY_LTC = BuildConfig.DEBUG ? "https://api-stage.lite-wallet.org" : "https://api-prod.lite-wallet.org";
4950
private static final String CURRENCY_KEY = "currency_code_key";
5051
private static final String PARTNER_KEY = "partner_key";
5152
private ValueCallback<Uri> uploadMessage;
@@ -92,19 +93,19 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
9293
}
9394
webSettings.setDomStorageEnabled(true);
9495
webSettings.setJavaScriptEnabled(true);
95-
96-
// App (in Java)
97-
WebMessageListener bitrefillListener = new WebMessageListener() {
98-
@Override
99-
public void onPostMessage(WebView view, WebMessageCompat message, Uri sourceOrigin,
100-
boolean isMainFrame, JavaScriptReplyProxy replyProxy) {
101-
// do something about view, message, sourceOrigin and isMainFrame.
102-
replyProxy.postMessage("Got it!");
103-
}
104-
};
105-
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_MESSAGE_LISTENER)) {
106-
WebViewCompat.addWebMessageListener(webView, "bitrefillPostObj", rules, bitrefillListener);
107-
}
96+
//
97+
// // App (in Java)
98+
// WebMessageListener bitrefillListener = new WebMessageListener() {
99+
// @Override
100+
// public void onPostMessage(WebView view, WebMessageCompat message, Uri sourceOrigin,
101+
// boolean isMainFrame, JavaScriptReplyProxy replyProxy) {
102+
// // do something about view, message, sourceOrigin and isMainFrame.
103+
// replyProxy.postMessage("Got it!");
104+
// }
105+
// };
106+
// if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_MESSAGE_LISTENER)) {
107+
// WebViewCompat.addWebMessageListener(webView, "bitrefillPostObj", rules, bitrefillListener);
108+
// }
108109

109110

110111
String currency = getArguments().getString(CURRENCY_KEY);
@@ -115,20 +116,19 @@ public void onPostMessage(WebView view, WebMessageCompat message, Uri sourceOrig
115116
String bitrefillUrl = String.format( BRConstants.BITREFILL_AFFILIATE_LINK + "/embed/?paymentMethod=litecoin&ref=%s&utm_source=%s", bitrefillRef,utmSource);
116117

117118
String buyUrl = partner == Partner.BITREFILL ? bitrefillUrl : url(getContext(), partner, currency);
118-
119+
119120
Timber.d("URL %s", buyUrl);
120121
webView.loadUrl(buyUrl);
121122

122123
return rootView;
123124
}
124125

125-
126126
public static String url(Context context, Partner partner, String currency) {
127127
String walletAddress = BRSharedPrefs.getReceiveAddress(context);
128128
Long timestamp = new Date().getTime();
129129
String uuid = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
130130
String prefix = partner == Partner.MOONPAY ? "/moonpay/buy" : "";
131-
return String.format(URL_BUY_LTC + prefix + "?address=%s&code=%s&idate=%s&uid=%s", walletAddress, currency, timestamp, uuid);
131+
return String.format(LW_API_HOST + prefix + "?address=%s&code=%s&idate=%s&uid=%s", walletAddress, currency, timestamp, uuid);
132132
}
133133

134134
private void closePayment() {

β€Žapp/src/main/java/com/breadwallet/presenter/fragments/FragmentMenu.java

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import com.breadwallet.presenter.entities.BRMenuItem;
2929
import com.breadwallet.tools.animation.BRAnimator;
3030
import com.breadwallet.tools.animation.SlideDetector;
31+
import com.breadwallet.tools.manager.AnalyticsManager;
3132
import com.breadwallet.tools.util.BRConstants;
3233
import com.platform.APIClient;
3334

@@ -67,6 +68,7 @@ public View onCreateView(LayoutInflater inflater,
6768
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
6869
CustomTabsIntent customTabsIntent = builder.build();
6970
customTabsIntent.launchUrl(getContext(), Uri.parse(BRConstants.CUSTOMER_SUPPORT_LINK));
71+
AnalyticsManager.logCustomEvent(BRConstants._20201118_DTGS);
7072
}));
7173

7274
/* Settings */

0 commit comments

Comments
Β (0)