Skip to content

Commit 537ac69

Browse files
committed
fix(multisig): enhance dRepScript generation logic
- Updated the getDRepScript method to attempt building the script with a fallback to a different parameter if the initial attempt returns undefined. This improves the robustness of the script generation process.
1 parent 796a108 commit 537ac69

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/utils/multisigSDK.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,12 @@ export class MultisigWallet {
283283
}
284284

285285
getDRepScript(): string | undefined {
286-
const dRepScript = this.buildScript(3);
286+
let dRepScript = this.buildScript(3);
287+
288+
if(!dRepScript) {
289+
dRepScript = this.buildScript(0);
290+
}
291+
287292
if (!dRepScript) {
288293
console.warn("MultisigWallet keys:", this.keys);
289294
console.warn("buildScript(3) result:", dRepScript);

0 commit comments

Comments
 (0)