Skip to content

Commit 46bf168

Browse files
fix: make sign method send all chunks (#18)
Co-authored-by: Emmanuel <[email protected]>
1 parent 52e1ce2 commit 46bf168

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/index.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,11 @@ export default class IronfishApp extends GenericApp {
8989
async sign(path: string, blob: Buffer): Promise<ResponseSign> {
9090
try {
9191
const chunks = this.prepareChunks(path, blob)
92+
let result = await this.signSendChunk(this.INS.SIGN, 1, chunks.length, chunks[0])
9293

93-
let result: any
94-
for (let i = 0; i < chunks.length; i += 1) {
95-
result = await this.sendGenericChunk(this.INS.SIGN, P2_VALUES.DEFAULT, 1, chunks.length, chunks[0])
94+
for (let i = 1; i < chunks.length; i += 1) {
95+
result = await this.signSendChunk(this.INS.SIGN, 1 + i, chunks.length, chunks[i])
9696
}
97-
9897
return {
9998
signature: result.readBytes(result.length()),
10099
}

0 commit comments

Comments
 (0)