From 697115819e6bab02d0b0307d38bc9947c9e6d3b8 Mon Sep 17 00:00:00 2001 From: Jonatan Rhodin Date: Tue, 17 Oct 2023 14:40:54 +0200 Subject: [PATCH] Temp fix for parameter names !Remove! when api has been updated --- .../mullvadvpn/lib/billing/BillingPaymentRepository.kt | 2 +- .../kotlin/net/mullvad/mullvadvpn/model/PlayPurchase.kt | 2 +- mullvad-api/src/lib.rs | 6 +++--- mullvad-types/src/account.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt index d94678a9fe24..8d4b77cc90a9 100644 --- a/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt +++ b/android/lib/billing/src/main/kotlin/net/mullvad/mullvadvpn/lib/billing/BillingPaymentRepository.kt @@ -161,7 +161,7 @@ class BillingPaymentRepository( return playPurchaseRepository.purchaseVerification( PlayPurchase( productId = purchase.products.first(), - purchaseToken = purchase.purchaseToken, + token = purchase.purchaseToken, ) ) } diff --git a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/PlayPurchase.kt b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/PlayPurchase.kt index 8ae46a07a9b6..6c7757a0d6de 100644 --- a/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/PlayPurchase.kt +++ b/android/lib/model/src/main/kotlin/net/mullvad/mullvadvpn/model/PlayPurchase.kt @@ -3,4 +3,4 @@ package net.mullvad.mullvadvpn.model import android.os.Parcelable import kotlinx.parcelize.Parcelize -@Parcelize data class PlayPurchase(val productId: String, val purchaseToken: String) : Parcelable +@Parcelize data class PlayPurchase(val productId: String, val token: String) : Parcelable diff --git a/mullvad-api/src/lib.rs b/mullvad-api/src/lib.rs index 63f5c2ad5b46..d515eadd9c07 100644 --- a/mullvad-api/src/lib.rs +++ b/mullvad-api/src/lib.rs @@ -468,7 +468,7 @@ impl AccountsProxy { ) -> impl Future> { #[derive(serde::Deserialize)] struct PlayPurchaseInitResponse { - obfuscated_id: String, + obfuscated_external_account_id: String, } let service = self.handle.service.clone(); @@ -487,10 +487,10 @@ impl AccountsProxy { ) .await; - let PlayPurchaseInitResponse { obfuscated_id } = + let PlayPurchaseInitResponse { obfuscated_external_account_id } = rest::deserialize_body(response?).await?; - Ok(obfuscated_id) + Ok(obfuscated_external_account_id) } } diff --git a/mullvad-types/src/account.rs b/mullvad-types/src/account.rs index 7adb7fbffa80..9696b48ceca4 100644 --- a/mullvad-types/src/account.rs +++ b/mullvad-types/src/account.rs @@ -51,7 +51,7 @@ pub struct VoucherSubmission { #[cfg(target_os = "android")] pub struct PlayPurchase { pub product_id: String, - pub purchase_token: PlayPurchasePaymentToken, + pub token: PlayPurchasePaymentToken, } /// Token used for authentication in the API.