@@ -49,10 +49,11 @@ export const AcceptCredential: React.FC<Props> = ({ content, connectionId, crede
49
49
( x ) => x . state === 'credential-issued' || x . state === 'done'
50
50
)
51
51
52
+ let { protocolVersion } = useCredentials ( )
52
53
useEffect ( ( ) => {
53
54
if ( credentials . length === 0 ) {
54
55
currentCharacter . starterCredentials . forEach ( ( item ) => {
55
- dispatch ( issueCredential ( { connectionId : connectionId , cred : item } ) )
56
+ dispatch ( issueCredential ( { connectionId : connectionId , cred : item , protocolVersion } ) )
56
57
trackEvent ( 'credential-issued' )
57
58
} )
58
59
setCredentialsIssued ( true )
@@ -94,9 +95,11 @@ export const AcceptCredential: React.FC<Props> = ({ content, connectionId, crede
94
95
95
96
const routeError = ( ) => {
96
97
navigate ( '/demo' )
97
- dispatch ( { type : 'demo/RESET ' } )
98
+ dispatch ( { type : 'demo/resetState ' } )
98
99
}
99
100
101
+ protocolVersion = useCredentials ( ) . protocolVersion
102
+
100
103
const sendNewCredentials = ( ) => {
101
104
credentials . forEach ( ( cred ) => {
102
105
if ( cred . state !== 'credential-issued' && cred . state !== 'done' ) {
@@ -110,7 +113,8 @@ export const AcceptCredential: React.FC<Props> = ({ content, connectionId, crede
110
113
)
111
114
} )
112
115
113
- if ( newCredential ) dispatch ( issueCredential ( { connectionId : connectionId , cred : newCredential } ) )
116
+ if ( newCredential )
117
+ dispatch ( issueCredential ( { connectionId : connectionId , cred : newCredential , protocolVersion } ) )
114
118
}
115
119
} )
116
120
closeFailedRequestModal ( )
0 commit comments