Skip to content

Commit

Permalink
Updates for RestoreAsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmontemagno committed Aug 9, 2024
1 parent 633c1fb commit 1bd5ea0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/Plugin.InAppBilling/InAppBilling.ios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public async override Task<IEnumerable<InAppBillingPurchase>> GetPurchasesAsync(



Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
async Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
{
var tcsTransaction = new TaskCompletionSource<SKPaymentTransaction[]>();

Expand Down Expand Up @@ -283,7 +283,8 @@ Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
// Start receiving restored transactions
SKPaymentQueue.DefaultQueue.RestoreCompletedTransactions();

return tcsTransaction.Task;
var result = await tcsTransaction.Task;
return result;
}
finally
{
Expand Down
5 changes: 3 additions & 2 deletions src/Plugin.InAppBilling/InAppBilling.maccatalyst.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public async override Task<IEnumerable<InAppBillingPurchase>> GetPurchasesAsync(



Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
async Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
{
var tcsTransaction = new TaskCompletionSource<SKPaymentTransaction[]>();

Expand Down Expand Up @@ -283,7 +283,8 @@ Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
// Start receiving restored transactions
SKPaymentQueue.DefaultQueue.RestoreCompletedTransactions();

return tcsTransaction.Task;
var result = await tcsTransaction.Task;
return result;
}
finally
{
Expand Down
5 changes: 3 additions & 2 deletions src/Plugin.InAppBilling/InAppBilling.macos.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public async override Task<IEnumerable<InAppBillingPurchase>> GetPurchasesAsync(



Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
async Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
{
var tcsTransaction = new TaskCompletionSource<SKPaymentTransaction[]>();

Expand Down Expand Up @@ -283,7 +283,8 @@ Task<SKPaymentTransaction[]> RestoreAsync(CancellationToken cancellationToken)
// Start receiving restored transactions
SKPaymentQueue.DefaultQueue.RestoreCompletedTransactions();

return tcsTransaction.Task;
var result = await tcsTransaction.Task;
return result;
}
finally
{
Expand Down

0 comments on commit 1bd5ea0

Please sign in to comment.