Skip to content

Commit

Permalink
🚀[ Release v.2.7.0] Merge into Main (#30)
Browse files Browse the repository at this point in the history
* Added український language

- add uk xml file
-  removed the nl, sv, da files
- Escaped apostrphes in UK strings file
- Updated language choices

* 💣🐞[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 <vic.sima@gmail.com>

* 🚀[ 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 <mrkerrywashington@icloud.com>

Co-authored-by: Victor Sima <vic.sima@gmail.com>

* 🚀[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 <vic.sima@gmail.com>

* 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 <mrkerrywashington@icloud.com>

Co-authored-by: Victor Sima <vic.sima@gmail.com>

Co-authored-by: Victor Sima <vic.sima@gmail.com>

* 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

* replaced coin logo

* bump versioncode

* fixed dep version

* added Bitrefill web listener

Co-authored-by: Victor Sima <vic.sima@gmail.com>
  • Loading branch information
kcw-grunt and vsima authored Oct 29, 2022
1 parent 01ebc68 commit 3100e15
Show file tree
Hide file tree
Showing 30 changed files with 283 additions and 40 deletions.
202 changes: 201 additions & 1 deletion .idea/assetWizardSettings.xml

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

10 changes: 8 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 31
versionCode 674
versionName "v2.6.1"
versionCode 684
versionName "v2.7.0"
multiDexEnabled true
archivesBaseName = "${versionName}(${versionCode})"

Expand Down Expand Up @@ -244,6 +244,7 @@ android {
}

}
namespace 'com.breadwallet'
}

task copyResDirectoryToClasses(type: Copy) {
Expand Down Expand Up @@ -328,6 +329,11 @@ dependencies {

// Ktlint
ktlint 'com.pinterest:ktlint:0.44.0'

//kotlin https://stackoverflow.com/questions/69817925/problem-duplicate-class-androidx-lifecycle-viewmodel-found-in-modules
def lifecycle_version = "2.4.0"
implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
}

task ktlint(type: JavaExec, group: "verification") {
Expand Down
3 changes: 1 addition & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.breadwallet">
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.INTERNET"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ public void onBindViewHolder(@NonNull final PartnerViewHolder holder, int positi
holder.fiatOptionHScrollView.scrollTo((int) option.getX(), (int) option.getY());
});

if (partner.getCode() == FragmentBuy.Partner.BITREFILL) {
holder.fiatOptionHScrollView.setVisibility(View.INVISIBLE);
holder.fiatOptions.setVisibility(View.INVISIBLE);
}

holder.buyPartnerWrapper.setOnClickListener(v -> {
int currencyResId = getCurrencyResId(holder.fiatOptions.getCheckedRadioButtonId());
final Context context = v.getContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

private List<Partner> getPartners() {
List<Partner> partners = new ArrayList<>();
partners.add(new Partner(R.drawable.bitrefill_logo, R.string.BuyCenter_bitrefill_Title, R.string.BuyCenter_bitrefill_FinancialDetails, FragmentBuy.Partner.BITREFILL));
partners.add(new Partner(R.drawable.ic_moonpay_logo, R.string.BuyCenter_moonpay_Title, R.string.BuyCenter_moonpay_FinancialDetails, FragmentBuy.Partner.MOONPAY));
partners.add(new Partner(R.drawable.simplex_logo, R.string.BuyCenter_simplex_Title, R.string.BuyCenter_simplex_FinancialDetails, FragmentBuy.Partner.SIMPLEX));
return partners;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import android.widget.LinearLayout;
import android.widget.ProgressBar;

Expand All @@ -31,6 +32,7 @@
import com.breadwallet.R;
import com.breadwallet.tools.animation.BRAnimator;
import com.breadwallet.tools.manager.BRSharedPrefs;
import com.breadwallet.tools.util.BRConstants;
import com.breadwallet.tools.util.Utils;

import java.util.Date;
Expand Down Expand Up @@ -91,17 +93,37 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle sa
webSettings.setDomStorageEnabled(true);
webSettings.setJavaScriptEnabled(true);

// App (in Java)
WebMessageListener bitrefillListener = new WebMessageListener() {
@Override
public void onPostMessage(WebView view, WebMessageCompat message, Uri sourceOrigin,
boolean isMainFrame, JavaScriptReplyProxy replyProxy) {
// do something about view, message, sourceOrigin and isMainFrame.
replyProxy.postMessage("Got it!");
}
};
if (WebViewFeature.isFeatureSupported(WebViewFeature.WEB_MESSAGE_LISTENER)) {
WebViewCompat.addWebMessageListener(webView, "bitrefillPostObj", rules, bitrefillListener);
}


String currency = getArguments().getString(CURRENCY_KEY);
Partner partner = (Partner) getArguments().getSerializable(PARTNER_KEY);

String buyUrl = url(getContext(), partner, currency);
String bitrefillRef = "bAshL935";
String utmSource = "LitewalletAndroid";
String bitrefillUrl = String.format( BRConstants.BITREFILL_AFFILIATE_LINK + "/embed/?paymentMethod=litecoin&ref=%s&utm_source=%s", bitrefillRef,utmSource);

String buyUrl = partner == Partner.BITREFILL ? bitrefillUrl : url(getContext(), partner, currency);

Timber.d("URL %s", buyUrl);
webView.loadUrl(buyUrl);

return rootView;
}

public static String url(Context context, Partner partner, String currency) {

public static String url(Context context, Partner partner, String currency) {
String walletAddress = BRSharedPrefs.getReceiveAddress(context);
Long timestamp = new Date().getTime();
String uuid = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
Expand Down Expand Up @@ -230,6 +252,6 @@ public void onPause() {
}

public enum Partner {
SIMPLEX, MOONPAY
SIMPLEX, MOONPAY, BITREFILL
}
}
Loading

0 comments on commit 3100e15

Please sign in to comment.