#ismailelric-terminal-rn

1 messages · Page 1 of 1 (latest)

limpid kindleBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

#

ismail-rn-terminal

tulip summit
#

How is isStangingEnv set?

bold yarrow
#

It's a global state, I logged its value above the stripeTerminalProvider and its value changes

tulip summit
#

As in right above this line?
<StripeTerminalProvider tokenProvider={() => fetchStripeTerminalToken(isStagingEnv ? "test" : "live")}>

bold yarrow
#

Within the same component

const myApp = () => {
     const { isStagingEnvironment  } = useIsStagingEnvironment();
  console.log({ isStagingEnvironment });
}

return (
   <StripeTerminalProvider tokenProvider={() => fetchStripeTerminalToken(isStagingEnv ? "test" : "live")}>
<AppNavigator />
<StripeTerminalProvider/>
)
}
tulip summit
#

Ok. Can you share the code for useIsStagingEnvironment as well?

bold yarrow
tulip summit
#

Hm that looks fine to me

#

Let me ask a colleague

limpid kindleBOT
#

ismailelric

bold yarrow
#

Thanks

tulip summit
limpid kindleBOT
#

ismailelric-terminal-rn

bold yarrow
#

Calling initialize works! Thank you

tulip summit
#

Sweet