@indigo-labs/indigo-sdk 0.2.8 → 0.2.9
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 +2 -2
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/contracts/staking/transactions.ts +3 -2
package/dist/index.js
CHANGED
|
@@ -4788,7 +4788,7 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
|
|
|
4788
4788
|
async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, stakingManagerRef) {
|
|
4789
4789
|
const network = lucid.config().network;
|
|
4790
4790
|
const currentSlot = lucid.currentSlot();
|
|
4791
|
-
const currentTime = (0, import_lucid35.slotToUnixTime)(network, currentSlot);
|
|
4791
|
+
const currentTime = (0, import_lucid35.slotToUnixTime)(network, currentSlot) - ONE_SECOND;
|
|
4792
4792
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
4793
4793
|
stakingPositionRef,
|
|
4794
4794
|
lucid
|
|
@@ -4850,7 +4850,7 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
|
|
|
4850
4850
|
async function closeStakingPosition(stakingPositionRef, params, lucid, stakingManagerRef) {
|
|
4851
4851
|
const network = lucid.config().network;
|
|
4852
4852
|
const currentSlot = lucid.currentSlot();
|
|
4853
|
-
const currentTime = (0, import_lucid35.slotToUnixTime)(network, currentSlot);
|
|
4853
|
+
const currentTime = (0, import_lucid35.slotToUnixTime)(network, currentSlot) - ONE_SECOND;
|
|
4854
4854
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
4855
4855
|
stakingPositionRef,
|
|
4856
4856
|
lucid
|
package/dist/index.mjs
CHANGED
|
@@ -4606,7 +4606,7 @@ async function openStakingPosition(amount, params, lucid, stakingManagerRef) {
|
|
|
4606
4606
|
async function adjustStakingPosition(stakingPositionRef, amount, params, lucid, stakingManagerRef) {
|
|
4607
4607
|
const network = lucid.config().network;
|
|
4608
4608
|
const currentSlot = lucid.currentSlot();
|
|
4609
|
-
const currentTime = slotToUnixTime5(network, currentSlot);
|
|
4609
|
+
const currentTime = slotToUnixTime5(network, currentSlot) - ONE_SECOND;
|
|
4610
4610
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
4611
4611
|
stakingPositionRef,
|
|
4612
4612
|
lucid
|
|
@@ -4668,7 +4668,7 @@ async function adjustStakingPosition(stakingPositionRef, amount, params, lucid,
|
|
|
4668
4668
|
async function closeStakingPosition(stakingPositionRef, params, lucid, stakingManagerRef) {
|
|
4669
4669
|
const network = lucid.config().network;
|
|
4670
4670
|
const currentSlot = lucid.currentSlot();
|
|
4671
|
-
const currentTime = slotToUnixTime5(network, currentSlot);
|
|
4671
|
+
const currentTime = slotToUnixTime5(network, currentSlot) - ONE_SECOND;
|
|
4672
4672
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
4673
4673
|
stakingPositionRef,
|
|
4674
4674
|
lucid
|
package/package.json
CHANGED
|
@@ -33,6 +33,7 @@ import { matchSingle } from '../../utils/utils';
|
|
|
33
33
|
import { serialiseStakingRedeemer } from './types';
|
|
34
34
|
import { serialiseCollectorRedeemer } from '../collector/types';
|
|
35
35
|
import { mkLovelacesOf } from '../../utils/value-helpers';
|
|
36
|
+
import { ONE_SECOND } from '../../utils/time-helpers';
|
|
36
37
|
|
|
37
38
|
export async function openStakingPosition(
|
|
38
39
|
amount: bigint,
|
|
@@ -125,7 +126,7 @@ export async function adjustStakingPosition(
|
|
|
125
126
|
|
|
126
127
|
const network = lucid.config().network!;
|
|
127
128
|
const currentSlot = lucid.currentSlot();
|
|
128
|
-
const currentTime = slotToUnixTime(network, currentSlot);
|
|
129
|
+
const currentTime = slotToUnixTime(network, currentSlot) - ONE_SECOND;
|
|
129
130
|
|
|
130
131
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
131
132
|
stakingPositionRef,
|
|
@@ -218,7 +219,7 @@ export async function closeStakingPosition(
|
|
|
218
219
|
): Promise<TxBuilder> {
|
|
219
220
|
const network = lucid.config().network!;
|
|
220
221
|
const currentSlot = lucid.currentSlot();
|
|
221
|
-
const currentTime = slotToUnixTime(network, currentSlot);
|
|
222
|
+
const currentTime = slotToUnixTime(network, currentSlot) - ONE_SECOND;
|
|
222
223
|
|
|
223
224
|
const stakingPositionOut = await findStakingPositionByOutRef(
|
|
224
225
|
stakingPositionRef,
|