File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -50,9 +50,11 @@ export class QzTrayService {
5050 }
5151
5252 // Set certificate promise - return as a function that returns a promise
53- this . qz . security . setCertificatePromise ( ( ) => {
54- return Promise . resolve ( this . certificateCache || "" ) ;
55- } ) ;
53+ this . qz . security . setCertificatePromise (
54+ ( resolve : ( arg0 : string ) => any , reject : any ) => {
55+ return resolve ( this . certificateCache || "" ) ;
56+ }
57+ ) ;
5658
5759 // Override certificate check for self-signed certificates
5860 this . qz . security . setSignatureAlgorithm ( "SHA512" ) ;
@@ -65,8 +67,11 @@ export class QzTrayService {
6567
6668 // Set signing function using backend - this signs ALL data sent to QZ Tray
6769 this . qz . security . setSignaturePromise ( ( toSign : string ) => {
68- console . log ( "QZ Tray requesting signature for data..." ) ;
69- return new Promise < string > ( ( resolve , reject ) => {
70+ console . log ( "QZ Tray requesting signature for data..." , toSign ) ;
71+ return (
72+ resolve : ( arg0 : string ) => void ,
73+ reject : ( arg0 : Error ) => void
74+ ) => {
7075 this . http
7176 . post < {
7277 signature : string ;
@@ -91,7 +96,7 @@ export class QzTrayService {
9196 reject ( new Error ( errorMsg ) ) ;
9297 } ,
9398 } ) ;
94- } ) ;
99+ } ;
95100 } ) ;
96101
97102 this . qzInitialized = true ;
You can’t perform that action at this time.
0 commit comments