Skip to content

Commit

Permalink
fix regular and timeout enum value for HashedTimeLockedContract.Proof…
Browse files Browse the repository at this point in the history
…Type
  • Loading branch information
Albermonte committed Nov 19, 2024
1 parent e56a6ce commit c5449b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/views/RefundSwapLedger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default class RefundSwapLedger extends RefundSwap {
if (refundTransaction.senderType === Nimiq.AccountType.HTLC) {
// create htlc timeout resolve transaction proof
const proof = new Nimiq.SerialBuffer(1 + refundTransaction.proof.length);
proof.writeUint8(3 /* Nimiq.HashedTimeLockedContract.ProofType.TIMEOUT_RESOLVE */);
proof.writeUint8(2 /* Nimiq.HashedTimeLockedContract.ProofType.TIMEOUT_RESOLVE */);
proof.write(refundTransaction.proof);
refundTransaction.proof = proof;
}
Expand Down
2 changes: 1 addition & 1 deletion src/views/RefundSwapSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class SignBtcTransactionSuccess extends Vue {
}));
const proof = new Nimiq.SerialBuffer(1 + tx.proof.length);
proof.writeUint8(3 /* Nimiq.HashedTimeLockedContract.ProofType.TIMEOUT_RESOLVE */);
proof.writeUint8(2 /* Nimiq.HashedTimeLockedContract.ProofType.TIMEOUT_RESOLVE */);
proof.write(new Nimiq.SerialBuffer(tx.proof)); // Current tx.proof is a regular SignatureProof
tx.proof = proof;
Expand Down
2 changes: 1 addition & 1 deletion src/views/SetupSwapSuccess.vue
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export default class SetupSwapSuccess extends BitcoinSyncBaseView {
const dummyHashRoot = '66687aadf862bd776c8fc18b8e9f8e20089714856ee233b3902a591d0d5f2925'; // sha256
const proof = new Nimiq.SerialBuffer(3 + 2 * 32 + nimiqTransaction.proof.length);
proof.writeUint8(1 /* Nimiq.HashedTimeLockedContract.ProofType.REGULAR_TRANSFER */);
proof.writeUint8(0 /* Nimiq.HashedTimeLockedContract.ProofType.REGULAR_TRANSFER */);
proof.writeUint8({
blake2b: 0,
sha256: 1,
Expand Down

0 comments on commit c5449b8

Please sign in to comment.