@@ -14,7 +14,9 @@ import {ActiveTransaction} from "@core/models/ActiveTransaction";
1414import { SessionStorageService } from './session-storage.service' ;
1515
1616const SAME_DEVICE_UI_RE_ENTRY_URL = '/get-wallet-code?response_code={RESPONSE_CODE}' ;
17- const PRESENTATIONS_ENDPOINT = 'ui/presentations/v2' ;
17+ const INIT_TRANSACTION_ENDPOINT = 'ui/presentations/v2' ;
18+ const WALLET_RESPONSE_ENDPOINT = 'ui/presentations/${transactionId}' ;
19+ const EVENTS_ENDPOINT = 'ui/presentations/${transactionId}/events' ;
1820const VALIDATE_SD_JWT_VC_PRESENTATION_ENDPOINT = 'utilities/validations/sdJwtVc' ;
1921
2022@Injectable ( )
@@ -34,7 +36,7 @@ export class VerifierEndpointService {
3436 if ( ! this . deviceDetectorService . isDesktop ( ) ) {
3537 payload [ 'wallet_response_redirect_uri_template' ] = location . origin + SAME_DEVICE_UI_RE_ENTRY_URL ;
3638 }
37- this . httpService . post < InitializedTransaction , string > ( PRESENTATIONS_ENDPOINT , payload )
39+ this . httpService . post < InitializedTransaction , string > ( INIT_TRANSACTION_ENDPOINT , payload )
3840 . pipe (
3941 tap ( ( res ) => {
4042 let activeTransaction : ActiveTransaction = {
@@ -49,14 +51,14 @@ export class VerifierEndpointService {
4951
5052 getWalletResponse ( transaction_id : string , code ?: string ) : Observable < WalletResponse > {
5153 if ( typeof code == 'undefined' ) {
52- return this . httpService . get ( PRESENTATIONS_ENDPOINT + `/ ${ transaction_id } ` ) ;
54+ return this . httpService . get ( WALLET_RESPONSE_ENDPOINT . replace ( '${transactionId}' , transaction_id ) ) ;
5355 } else {
54- return this . httpService . get ( PRESENTATIONS_ENDPOINT + `/ ${ transaction_id } ?response_code=${ code } `) ;
56+ return this . httpService . get ( WALLET_RESPONSE_ENDPOINT . replace ( '${transactionId}' , transaction_id ) + ` ?response_code=${ code } `) ;
5557 }
5658 }
5759
5860 getsTransactionEventsLogs ( transactionId : string ) : Observable < EventLog [ ] > {
59- return this . httpService . get ( PRESENTATIONS_ENDPOINT + `/ ${ transactionId } /events` )
61+ return this . httpService . get ( EVENTS_ENDPOINT . replace ( ' ${transactionId}' , transactionId ) )
6062 . pipe (
6163 map ( ( data : any ) => {
6264 return data . events . map ( ( event : EventLog ) => {
0 commit comments