@@ -45,6 +45,11 @@ const CheckoutScreen = (props) => {
4545 const contactInfoData = useSelector ( ( state : RootState ) => state . contactInfo ) ;
4646 const [ orderStatusUI , setOrderStatusUI ] = React . useState ( false ) ;
4747
48+ let se , customerType , email
49+ Sentry . withScope ( function ( scope ) {
50+ [ se , customerType ] = [ scope . _tags . se , scope . _tags . customerType ]
51+ email = scope . _user . email
52+ } ) ;
4853 const performCheckoutOnServer = async ( ) => {
4954 // ----------- Sentry Start Transaction ------------------------
5055 let transaction = Sentry . startTransaction ( { name : 'checkout' } ) ;
@@ -63,8 +68,12 @@ const CheckoutScreen = (props) => {
6368 } ;
6469
6570 const placeOrder = async (
71+
6672 uiToast : null | UIToast = null ,
6773 ) : Promise < Response > => {
74+
75+
76+
6877 setOrderStatusUI ( true ) ;
6978
7079 const cart = Object . values ( cartData )
@@ -87,7 +96,9 @@ const CheckoutScreen = (props) => {
8796 method : 'POST' ,
8897 headers : {
8998 'Content-Type' : 'application/json' ,
90- email : contactInfoData [ 'email' ] ,
99+ email,
100+ se,
101+ customerType
91102 } ,
92103 body : JSON . stringify ( data ) ,
93104 } ,
@@ -170,7 +181,7 @@ const CheckoutScreen = (props) => {
170181 value = { contactInfoData [ item . key ] || "" }
171182 placeholder = { item . placeholder }
172183 onPressIn = { ( ) => {
173- dispatch ( { type : 'FILL_FIELDS' , payload : 'dummydata' } ) }
184+ dispatch ( { type : 'FILL_FIELDS' , payload : 'dummydata' , onScope : email ? email : null } ) }
174185 }
175186 />
176187 </ SafeAreaView >
0 commit comments