From 280c0442319ea3789c66382e7396bfe7c3846604 Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Sun, 8 Dec 2024 14:33:56 -0600 Subject: [PATCH] Comments --- src/state/purchases/hooks/useNativeUserState/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/state/purchases/hooks/useNativeUserState/index.ts b/src/state/purchases/hooks/useNativeUserState/index.ts index 95fc9ae63e..ed9a1ff980 100644 --- a/src/state/purchases/hooks/useNativeUserState/index.ts +++ b/src/state/purchases/hooks/useNativeUserState/index.ts @@ -24,8 +24,14 @@ export function useNativeUserState() { } try { - // MUST ensure we're the correct user first + /** + * MUST ensure we're the correct user first. + */ await Purchases.logIn(currentAccount.did) + /** + * Attempt to restore purchases for the identified user. + * @see https://www.revenuecat.com/docs/getting-started/restoring-purchases + */ await Purchases.restorePurchases() return {restricted: 'no'} } catch (e: any) {