@indigo-labs/indigo-sdk 0.2.34 → 0.2.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
- package/src/contracts/gov/transactions.ts +8 -1
package/dist/index.js
CHANGED
|
@@ -3592,7 +3592,12 @@ async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, l
|
|
|
3592
3592
|
BigInt(validityFrom),
|
|
3593
3593
|
indyStakedAmt
|
|
3594
3594
|
);
|
|
3595
|
-
return lucid.newTx().validFrom(validityFrom).validTo(
|
|
3595
|
+
return lucid.newTx().validFrom(validityFrom).validTo(
|
|
3596
|
+
Math.min(
|
|
3597
|
+
Number(pollShardDatum.votingEndTime) - ONE_SECOND,
|
|
3598
|
+
Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND
|
|
3599
|
+
)
|
|
3600
|
+
).readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo]).collectFrom([stakingPosUtxo], serialiseStakingRedeemer("Lock")).collectFrom(
|
|
3596
3601
|
[pollShardUtxo],
|
|
3597
3602
|
serialisePollShardRedeemer({ Vote: { content: voteOption } })
|
|
3598
3603
|
).pay.ToContract(
|
package/dist/index.mjs
CHANGED
|
@@ -3386,7 +3386,12 @@ async function vote(voteOption, pollShardOref, stakingPositionOref, sysParams, l
|
|
|
3386
3386
|
BigInt(validityFrom),
|
|
3387
3387
|
indyStakedAmt
|
|
3388
3388
|
);
|
|
3389
|
-
return lucid.newTx().validFrom(validityFrom).validTo(
|
|
3389
|
+
return lucid.newTx().validFrom(validityFrom).validTo(
|
|
3390
|
+
Math.min(
|
|
3391
|
+
Number(pollShardDatum.votingEndTime) - ONE_SECOND,
|
|
3392
|
+
Number(currentTime) + Number(sysParams.govParams.gBiasTime) - ONE_SECOND
|
|
3393
|
+
)
|
|
3394
|
+
).readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo]).collectFrom([stakingPosUtxo], serialiseStakingRedeemer("Lock")).collectFrom(
|
|
3390
3395
|
[pollShardUtxo],
|
|
3391
3396
|
serialisePollShardRedeemer({ Vote: { content: voteOption } })
|
|
3392
3397
|
).pay.ToContract(
|
package/package.json
CHANGED
|
@@ -465,7 +465,14 @@ export async function vote(
|
|
|
465
465
|
return lucid
|
|
466
466
|
.newTx()
|
|
467
467
|
.validFrom(validityFrom)
|
|
468
|
-
.validTo(
|
|
468
|
+
.validTo(
|
|
469
|
+
Math.min(
|
|
470
|
+
Number(pollShardDatum.votingEndTime) - ONE_SECOND,
|
|
471
|
+
Number(currentTime) +
|
|
472
|
+
Number(sysParams.govParams.gBiasTime) -
|
|
473
|
+
ONE_SECOND,
|
|
474
|
+
),
|
|
475
|
+
)
|
|
469
476
|
.readFrom([stakingRefScriptUtxo, pollShardRefScriptUtxo])
|
|
470
477
|
.collectFrom([stakingPosUtxo], serialiseStakingRedeemer('Lock'))
|
|
471
478
|
.collectFrom(
|