@@ -90,28 +90,37 @@ function ErroredStatus(props: ErroredStatusType) {
9090}
9191
9292function AuthorizingStatus ( props : AuthorizingStatusType ) {
93- // const [t] = useTranslation(undefined, { i18n });
94- const { connector, externalWalletsConfig } = props ;
93+ const [ t ] = useTranslation ( undefined , { i18n } ) ;
94+ const { connector, externalWalletsConfig, walletRegistry } = props ;
9595
9696 // eslint-disable-next-line no-console
9797 console . log ( "externalWalletsConfig" , externalWalletsConfig ) ;
9898
99+ const registryItem = walletRegistry ?. default ?. [ connector ] || walletRegistry ?. others ?. [ connector ] ;
100+ const primaryColor = registryItem ?. primaryColor || "" ;
101+
102+ // eslint-disable-next-line no-console
103+ console . log ( "registryItem" , registryItem ) ;
104+
99105 return (
100106 < div className = "w3a--flex w3a--size-full w3a--flex-col w3a--items-center w3a--justify-between w3a--gap-y-6" >
101107 < p className = "w3a--p-2 w3a--text-center w3a--text-base w3a--font-semibold w3a--text-app-gray-900 dark:w3a--text-app-white" >
102- Verify on { externalWalletsConfig [ connector ] . label }
108+ { t ( "modal.loader.authorizing-header" , { connector : externalWalletsConfig [ connector ] . label } ) }
103109 </ p >
104110 < div className = "w3a--flex w3a--justify-center" >
105- < CircularLoader width = { 95 } height = { 95 } thickness = { 6 } arcSizeDeg = { 100 } >
111+ < CircularLoader width = { 95 } height = { 95 } thickness = { 6 } arcSizeDeg = { 100 } arcColors = { primaryColor ? [ primaryColor , primaryColor ] : undefined } >
106112 < Image imageId = { `login-${ connector } ` } hoverImageId = { `login-${ connector } ` } height = "45" width = "45" />
107113 </ CircularLoader >
108114 </ div >
109- < p className = "w3a--text-center w3a--text-sm w3a--text-app-gray-500 dark:w3a--text-app-gray-400" >
110- We’ve sent a request to your wallet. Verify on your wallet to confirm that you own this wallet.
111- </ p >
112- < button className = "w3a--w-full w3a--rounded-xl w3a--bg-app-gray-100 w3a--p-2 w3a--py-3 w3a--text-sm w3a--text-app-gray-900 dark:w3a--bg-app-gray-800 dark:w3a--text-app-white md:w3a--hidden" >
113- Click here to verify
114- </ button >
115+ < p className = "w3a--text-center w3a--text-sm w3a--text-app-gray-500 dark:w3a--text-app-gray-400" > { t ( "modal.loader.authorizing-message" ) } </ p >
116+ < a
117+ href = { "https://www.google.com" }
118+ target = "_blank"
119+ rel = "noopener noreferrer"
120+ className = "w3a--w-full w3a--rounded-xl w3a--bg-app-gray-100 w3a--p-2 w3a--py-3 w3a--text-center w3a--text-sm w3a--text-app-gray-900 dark:w3a--bg-app-gray-800 dark:w3a--text-app-white md:w3a--hidden"
121+ >
122+ { t ( "modal.loader.authorizing-verify-btn" ) }
123+ </ a >
115124 </ div >
116125 ) ;
117126}
@@ -122,7 +131,19 @@ function AuthorizingStatus(props: AuthorizingStatusType) {
122131 * @returns Loader component
123132 */
124133function Loader ( props : LoaderProps ) {
125- const { connector, connectorName, modalStatus, onClose, appLogo, message, isConnectAndSignAuthenticationMode, externalWalletsConfig } = props ;
134+ const {
135+ connector,
136+ connectorName,
137+ modalStatus,
138+ onClose,
139+ appLogo,
140+ message,
141+ isConnectAndSignAuthenticationMode,
142+ externalWalletsConfig,
143+ walletRegistry,
144+ walletConnectUri,
145+ metamaskConnectUri,
146+ } = props ;
126147
127148 // eslint-disable-next-line no-console
128149 console . log ( "connectorName" , connectorName ) ;
@@ -148,7 +169,9 @@ function Loader(props: LoaderProps) {
148169
149170 { modalStatus === MODAL_STATUS . ERRORED && < ErroredStatus message = { message } /> }
150171
151- { modalStatus === MODAL_STATUS . AUTHORIZING && < AuthorizingStatus connector = { connector } externalWalletsConfig = { externalWalletsConfig } /> }
172+ { modalStatus === MODAL_STATUS . AUTHORIZING && (
173+ < AuthorizingStatus connector = { connector } externalWalletsConfig = { externalWalletsConfig } walletRegistry = { walletRegistry } />
174+ ) }
152175 </ div >
153176 ) ;
154177}
0 commit comments