@@ -10,6 +10,8 @@ import {
1010import { openPopupCenter } from './popup' ;
1111import { IAuthConfiguration } from '@imtbl/auth' ;
1212import ConfirmationOverlay from '../overlay/confirmationOverlay' ;
13+ import { getEvmChainFromChainId } from '../network/chainRegistry' ;
14+ import { EvmChain } from '../types' ;
1315
1416const CONFIRMATION_WINDOW_TITLE = 'Confirm this transaction' ;
1517const CONFIRMATION_WINDOW_HEIGHT = 720 ;
@@ -105,7 +107,10 @@ export default class ConfirmationScreen {
105107 if ( chainType === GeneratedClients . mr . TransactionApprovalRequestChainTypeEnum . Starkex ) {
106108 href = this . getHref ( 'transaction' , { transactionId, etherAddress, chainType } ) ;
107109 } else {
108- href = this . getHref ( 'zkevm/transaction' , {
110+ // Get chain path from chainId (e.g., 'zkevm', 'arbitrum-one')
111+ const chain = chainId ? getEvmChainFromChainId ( chainId ) : EvmChain . ZKEVM ;
112+ const chainPath = chain . replace ( '_' , '-' ) ;
113+ href = this . getHref ( `${ chainPath } /transaction` , {
109114 transactionID : transactionId , etherAddress, chainType, chainID : chainId ,
110115 } ) ;
111116 }
@@ -117,7 +122,8 @@ export default class ConfirmationScreen {
117122 requestMessageConfirmation (
118123 messageID : string ,
119124 etherAddress : string ,
120- messageType ?: MessageType ,
125+ messageType : MessageType ,
126+ chainId : string ,
121127 ) : Promise < ConfirmationResult > {
122128 return new Promise ( ( resolve , reject ) => {
123129 const messageHandler = ( { data, origin } : MessageEvent ) => {
@@ -157,10 +163,14 @@ export default class ConfirmationScreen {
157163 } ;
158164
159165 window . addEventListener ( 'message' , messageHandler ) ;
160- const href = this . getHref ( 'zkevm/message' , {
166+ // Get chain path from chainId (e.g., 'zkevm', 'arbitrum-one')
167+ const chain = getEvmChainFromChainId ( chainId ) ;
168+ const chainPath = chain . replace ( '_' , '-' ) ;
169+ const href = this . getHref ( `${ chainPath } /message` , {
161170 messageID,
162171 etherAddress,
163- ...( messageType ? { messageType } : { } ) ,
172+ chainID : chainId ,
173+ messageType,
164174 } ) ;
165175 this . showConfirmationScreen ( href , messageHandler , resolve ) ;
166176 } ) ;
0 commit comments