Skip to content

Commit bb2d17e

Browse files
chore: update logic
1 parent ad02020 commit bb2d17e

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/vms/common/unsignedTx.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,13 @@ export class UnsignedTx {
173173

174174
private addSignatureForPubKey(sig: Uint8Array, publicKey: Uint8Array) {
175175
const coordinates = this.getSigIndicesForPubKey(publicKey);
176-
for (let i = 0; i < this.credentials.length; i++) {
177-
if (coordinates) {
178-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
179-
coordinates.forEach(([_, subIndex]) => {
180-
this.addSignatureAt(sig, i, subIndex);
176+
for (let i = 0; i < this.getCredentials().length; i++) {
177+
if (coordinates[i]) {
178+
coordinates.forEach(([index, subIndex]) => {
179+
this.addSignatureAt(sig, index, subIndex);
181180
});
181+
} else {
182+
this.addSignatureAt(sig, i, 0);
182183
}
183184
}
184185
}

0 commit comments

Comments
 (0)