Skip to content

Commit 883ce13

Browse files
committed
fix crash on adding a second payment method
1 parent 1d957e3 commit 883ce13

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## [0.39.9]
5+
6+
### Fixed
7+
- Fixed crash on adding a second payment method on the same project
8+
49
## [0.39.8]
510

611
### Fixed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ allprojects {
3131
}
3232

3333
project.ext {
34-
sdkVersion='0.39.8'
34+
sdkVersion='0.39.9'
3535
versionCode=1
3636

3737
compileSdkVersion=30

ui/src/main/java/io/snabble/sdk/ui/payment/PaymentCredentialsListView.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@
2323
import java.util.Arrays;
2424
import java.util.List;
2525

26-
import ch.datatrans.payment.paymentmethods.PaymentMethodType;
2726
import io.snabble.sdk.PaymentMethod;
2827
import io.snabble.sdk.Project;
2928
import io.snabble.sdk.Snabble;
3029
import io.snabble.sdk.payment.PaymentCredentials;
3130
import io.snabble.sdk.payment.PaymentCredentialsStore;
3231
import io.snabble.sdk.ui.R;
33-
import io.snabble.sdk.ui.SnabbleUI;
3432
import io.snabble.sdk.ui.telemetry.Telemetry;
3533
import io.snabble.sdk.ui.utils.KeyguardUtils;
3634
import io.snabble.sdk.ui.utils.OneShotClickListener;
@@ -86,7 +84,7 @@ public void click() {
8684
if (activity instanceof FragmentActivity) {
8785
SelectPaymentMethodFragment dialogFragment = new SelectPaymentMethodFragment();
8886
Bundle bundle = new Bundle();
89-
bundle.putString(SelectPaymentMethodFragment.ARG_PROJECT_ID, SnabbleUI.getProject().getId());
87+
bundle.putString(SelectPaymentMethodFragment.ARG_PROJECT_ID, project.getId());
9088
ArrayList<PaymentMethod> types;
9189
if (PaymentCredentialsListView.this.types == null) {
9290
types = new ArrayList<>(Arrays.asList(PaymentMethod.values()));

0 commit comments

Comments
 (0)