Skip to content

Commit

Permalink
Temp fix for parameter names !Remove! when api has been updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Oct 18, 2023
1 parent b86c307 commit ec0cc18
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class BillingPaymentRepository(
return playPurchaseRepository.purchaseVerification(
PlayPurchase(
productId = purchase.products.first(),
purchaseToken = purchase.purchaseToken,
token = purchase.purchaseToken,
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 3 additions & 3 deletions mullvad-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ impl AccountsProxy {
) -> impl Future<Output = Result<PlayPurchasePaymentToken, rest::Error>> {
#[derive(serde::Deserialize)]
struct PlayPurchaseInitResponse {
obfuscated_id: String,
obfuscated_external_account_id: String,
}

let service = self.handle.service.clone();
Expand All @@ -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)
}
}

Expand Down
2 changes: 1 addition & 1 deletion mullvad-types/src/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ec0cc18

Please sign in to comment.