@@ -5,6 +5,12 @@ import { CSSProperties } from "styled-components";
55import * as yup from "yup" ;
66
77import { CONFIG , getMetaTxConfig } from "../../../config" ;
8+ import {
9+ createDeliveryInfoHandler ,
10+ createRedemptionConfirmedHandler ,
11+ createRedemptionSubmittedHandler ,
12+ parseDeliveryInfoData
13+ } from "../../../utils/redeem" ;
814import { GlobalStyle } from "../styles" ;
915
1016export const commitPath = "/commit" ;
@@ -60,12 +66,47 @@ export function Commit() {
6066 const account = getProp ( "account" ) as string ;
6167 const withExternalSigner = getProp ( "withExternalSigner" ) ;
6268 const bodyOverflow = getProp ( "bodyOverflow" ) ;
69+
70+ const {
71+ deliveryInfoDecoded,
72+ sendDeliveryInfoThroughXMTP,
73+ shouldWaitForResponse,
74+ postDeliveryInfoHeadersDecoded,
75+ postDeliveryInfoUrl,
76+ postRedemptionConfirmedHeadersDecoded,
77+ postRedemptionConfirmedUrl,
78+ postRedemptionSubmittedHeadersDecoded,
79+ postRedemptionSubmittedUrl,
80+ targetOrigin,
81+ eventTag
82+ } = parseDeliveryInfoData ( searchParams ) ;
6383 return (
6484 < >
6585 < GlobalStyle $bodyOverflow = { bodyOverflow } />
6686 < CommitWidget
87+ withGlobalStyle = { false }
88+ roundness = "min"
89+ sendDeliveryInfoThroughXMTP = { sendDeliveryInfoThroughXMTP }
90+ deliveryInfoHandler = { createDeliveryInfoHandler (
91+ targetOrigin ,
92+ shouldWaitForResponse ,
93+ eventTag
94+ ) }
95+ redemptionSubmittedHandler = { createRedemptionSubmittedHandler (
96+ targetOrigin
97+ ) }
98+ redemptionConfirmedHandler = { createRedemptionConfirmedHandler (
99+ targetOrigin
100+ ) }
101+ deliveryInfo = { deliveryInfoDecoded }
102+ postDeliveryInfoUrl = { postDeliveryInfoUrl }
103+ postDeliveryInfoHeaders = { postDeliveryInfoHeadersDecoded }
104+ postRedemptionSubmittedUrl = { postRedemptionSubmittedUrl }
105+ postRedemptionSubmittedHeaders = { postRedemptionSubmittedHeadersDecoded }
106+ postRedemptionConfirmedUrl = { postRedemptionConfirmedUrl }
107+ postRedemptionConfirmedHeaders = { postRedemptionConfirmedHeadersDecoded }
67108 withCustomReduxContext = { false }
68- withWeb3React = { false }
109+ withWeb3React = { true }
69110 withExternalSigner = { withExternalSigner === "true" }
70111 configId = { configId }
71112 forcedAccount = { account }
@@ -93,7 +134,6 @@ export function Commit() {
93134 ipfsGateway = { CONFIG . ipfsGateway as string }
94135 ipfsProjectId = { CONFIG . ipfsProjectId }
95136 ipfsProjectSecret = { CONFIG . ipfsProjectSecret }
96- children = { < > </ > }
97137 walletConnectProjectId = { CONFIG . walletConnectProjectId as string }
98138 fairExchangePolicyRules = { CONFIG . fairExchangePolicyRules as string }
99139 closeWidgetClick = { ( ) => {
0 commit comments