File tree Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Expand file tree Collapse file tree 2 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -82,8 +82,6 @@ export default class IronfishApp extends GenericApp {
82
82
const returnCode = errorCodeData [ 0 ] * 256 + errorCodeData [ 1 ]
83
83
let errorMessage = errorCodeToString ( returnCode )
84
84
85
- let signatures : Buffer [ ] = [ ]
86
-
87
85
if (
88
86
returnCode === LedgerError . BadKeyHandle ||
89
87
returnCode === LedgerError . DataIsInvalid ||
@@ -92,15 +90,11 @@ export default class IronfishApp extends GenericApp {
92
90
errorMessage = `${ errorMessage } : ${ response . subarray ( 0 , response . length - 2 ) . toString ( 'ascii' ) } `
93
91
}
94
92
95
- if ( returnCode === LedgerError . NoErrors && response . length > 2 ) {
96
- const signaturesLen = ( response . length - 2 ) / REDJUBJUB_SIGNATURE_LEN
97
- for ( let i = 0 ; i < signaturesLen ; i ++ ) {
98
- const tmpSignature = response . subarray ( i * REDJUBJUB_SIGNATURE_LEN , i * REDJUBJUB_SIGNATURE_LEN + REDJUBJUB_SIGNATURE_LEN )
99
- signatures . push ( tmpSignature )
100
- }
93
+ if ( returnCode === LedgerError . NoErrors && response . length == ( 2 + REDJUBJUB_SIGNATURE_LEN ) ) {
94
+ const signature = response . subarray ( 0 , REDJUBJUB_SIGNATURE_LEN )
101
95
102
96
return {
103
- signatures ,
97
+ signature ,
104
98
returnCode,
105
99
errorMessage,
106
100
}
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export interface ResponseProofGenKey extends ResponseBase {
24
24
}
25
25
26
26
export interface ResponseSign extends ResponseBase {
27
- signatures ?: Buffer [ ]
27
+ signature ?: Buffer
28
28
}
29
29
30
30
export enum IronfishKeys {
You can’t perform that action at this time.
0 commit comments