Skip to content

Commit

Permalink
patch previous build
Browse files Browse the repository at this point in the history
  • Loading branch information
tea2x committed Aug 20, 2024
1 parent 3800e7f commit 3c205fb
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions dist/lumos-patcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,20 @@ const unlock = (txSkeleton, fromAddress, daoWithdrawalCell) => __awaiter(void 0,
});
}
// add dao unlock header deps
txSkeleton = txSkeleton.update("headerDeps", (headerDeps) => {
return headerDeps.push(daoDepositCell.blockHash, daoWithdrawalCell.blockHash);
});
let headerDeps = txSkeleton.get("headerDeps");
if (!headerDeps.contains(daoDepositCell.blockHash)) {
txSkeleton = txSkeleton.update("headerDeps", (headerDeps) => {
return headerDeps.push(daoDepositCell.blockHash);
});
}
if (!headerDeps.contains(daoWithdrawalCell.blockHash)) {
txSkeleton = txSkeleton.update("headerDeps", (headerDeps) => {
return headerDeps.push(daoWithdrawalCell.blockHash);
});
}
// add dao unlock witness
const depositHeaderDepIndex = txSkeleton.get("headerDeps").size - 2;
headerDeps = txSkeleton.get("headerDeps");
const depositHeaderDepIndex = headerDeps.indexOf(daoDepositCell.blockHash);
const defaultWitnessArgs = {
inputType: codec_1.bytes.hexify(codec_1.number.Uint64LE.pack(depositHeaderDepIndex)),
};
Expand Down

0 comments on commit 3c205fb

Please sign in to comment.