Skip to content

Commit caacb84

Browse files
authored
Merge pull request #364 from superwall/develop
2.7.2
2 parents d84ca3d + 5a8e2a2 commit caacb84

5 files changed

Lines changed: 28 additions & 21 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
The changelog for `Superwall`. Also see the [releases](https://github.com/superwall/Superwall-Android/releases) on GitHub.
44

5+
## 2.7.2.
6+
7+
### Fixes
8+
- Fixes issue with `enableExperimentalDeviceVariables` option causing subscription status sync to fail
9+
510
## 2.7.1
611

712
### Enhancements

superwall/src/main/java/com/superwall/sdk/network/device/DeviceHelper.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -592,11 +592,13 @@ class DeviceHelper(
592592
enriched
593593
.plus(it)
594594
.let {
595-
if (factory.makeSuperwallOptions().enableExperimentalDeviceVariables) {
596-
it.plus(latestExperimentalDeviceProperties())
597-
} else {
598-
it
599-
}
595+
withErrorTracking {
596+
if (factory.makeSuperwallOptions().enableExperimentalDeviceVariables) {
597+
it.plus(latestExperimentalDeviceProperties())
598+
} else {
599+
it
600+
}
601+
}.getSuccess() ?: it
600602
}
601603
}.fold(
602604
onSuccess = { deviceTemplate ->

superwall/src/main/java/com/superwall/sdk/store/abstractions/product/receipt/ReceiptManager.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ class ReceiptManager(
298298
buildMap {
299299
determinePeriodType()?.let { put("latestSubscriptionPeriodType", it) }
300300
latestSubscriptionWillAutoRenew?.let { put("latestSubscriptionWillAutoRenew", it) }
301-
put("latestSubscriptionState", latestSubscriptionState.value)
301+
put("latestSubscriptionState", latestSubscriptionState.value.name)
302302
}
303303

304304
/**

superwall/src/main/java/com/superwall/sdk/store/abstractions/transactions/GoogleBillingPurchaseTransaction.kt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,20 @@ data class GoogleBillingPurchaseTransaction(
4949
) : StoreTransactionType {
5050
constructor(transaction: Purchase) : this(
5151
underlyingSK2Transaction = transaction,
52-
transactionDate = Date(transaction.purchaseTime), // Replace with correct mapping
53-
originalTransactionIdentifier = transaction.orderId, // Replace with correct mapping
54-
state = StoreTransactionState.Purchased, // Replace with correct mapping
55-
storeTransactionId = transaction.orderId, // Replace with correct mapping
56-
originalTransactionDate = Date(transaction.purchaseTime), // Replace with correct mapping
57-
webOrderLineItemID = null, // Replace with correct mapping
58-
appBundleId = null, // Replace with correct mapping
59-
subscriptionGroupId = null, // Replace with correct mapping
60-
isUpgraded = null, // Replace with correct mapping
61-
expirationDate = null, // Replace with correct mapping
62-
offerId = null, // Replace with correct mapping
63-
revocationDate = null, // Replace with correct mapping
64-
appAccountToken = null, // Replace with correct mapping
65-
payment = StorePayment(transaction), // Replace with correct mapping
52+
transactionDate = Date(transaction.purchaseTime),
53+
originalTransactionIdentifier = transaction.orderId,
54+
state = StoreTransactionState.Purchased,
55+
storeTransactionId = transaction.orderId,
56+
originalTransactionDate = Date(transaction.purchaseTime),
57+
webOrderLineItemID = null, // Not available in transaction, kept as iOS complement.
58+
appBundleId = null, // Not available in transaction, kept as iOS complement.
59+
subscriptionGroupId = null, // Not available in transaction, kept as iOS complement.
60+
isUpgraded = null, // Not available in transaction, kept as iOS complement.
61+
expirationDate = null, // Not available in transaction, kept as iOS complement. Available on `StoreProductType` object.
62+
offerId = null, // Not available in transaction, kept as iOS complement. Available on `StoreProductType` object
63+
revocationDate = null, // Not available in transaction, kept as iOS complement
64+
appAccountToken = null, // iOS property only, kept as complement
65+
payment = StorePayment(transaction),
6666
purchaseToken = transaction.purchaseToken,
6767
signature = transaction.signature,
6868
)

version.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SUPERWALL_VERSION=2.7.1
1+
SUPERWALL_VERSION=2.7.2

0 commit comments

Comments
 (0)