Skip to content

Commit 7c1bd29

Browse files
committed
Fixed incorrect token usage for invoice endpoint
1 parent fff494f commit 7c1bd29

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

feature-billing/src/wasmJsMain/kotlin/com/mooncloak/website/feature/billing/BillingViewModel.kt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ public class BillingViewModel public constructor(
125125
if (invoice == null) {
126126
invoice = getInvoice(
127127
productId = productId,
128-
token = currentState.token?.value,
129128
currencyCode = currentState.selectedCryptoCurrency.currencyCode,
130129
currentInvoices = currentState.invoices
131130
)
@@ -177,7 +176,6 @@ public class BillingViewModel public constructor(
177176
if (invoice == null && productId != null) {
178177
invoice = getInvoice(
179178
productId = productId,
180-
token = currentState.token?.value,
181179
currencyCode = currentState.selectedCryptoCurrency.currencyCode,
182180
currentInvoices = currentState.invoices
183181
)
@@ -299,7 +297,6 @@ public class BillingViewModel public constructor(
299297
private suspend fun getInvoice(
300298
currencyCode: Currency.Code,
301299
productId: String?,
302-
token: String?,
303300
currentInvoices: Map<CryptoCurrency, CryptoInvoice?>
304301
): CryptoInvoice? {
305302
CryptoCurrency[currencyCode]?.let { currentInvoices[it] }?.let { return it }
@@ -308,7 +305,6 @@ public class BillingViewModel public constructor(
308305

309306
return billingApi.getInvoice(
310307
productId = productId,
311-
token = token,
312308
currencyCode = currencyCode
313309
)
314310
}

feature-billing/src/wasmJsMain/kotlin/com/mooncloak/website/feature/billing/api/BillingApi.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public interface BillingApi {
1212

1313
public suspend fun getInvoice(
1414
productId: String,
15-
token: String?,
15+
token: String? = null,
1616
currencyCode: Currency.Code
1717
): CryptoInvoice
1818

0 commit comments

Comments
 (0)