Skip to content

Commit

Permalink
fix: Sync typescript unlock condition types (#2215)
Browse files Browse the repository at this point in the history
* fix: Sync TS unlock condition types

* changelog

* Update bindings/nodejs/CHANGELOG.md

Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>

---------

Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
  • Loading branch information
marc2332 and Thoralf-M authored Apr 4, 2024
1 parent b14ca85 commit 478db55
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
6 changes: 6 additions & 0 deletions bindings/nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Security -->

## 2.0.0-alpha.4 - 2024-04-DD

### Changed

- Renamed `{TimelockUnlockCondition, ExpirationUnlockCondition}::slotIndex to slot`;

## 2.0.0-alpha.3 - 2024-04-03

### Fixed
Expand Down
14 changes: 7 additions & 7 deletions bindings/nodejs/lib/types/block/output/unlock-condition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ class TimelockUnlockCondition extends UnlockCondition {
/**
* Slot index starting from which the output can be consumed.
*/
readonly slotIndex: SlotIndex;
readonly slot: SlotIndex;

constructor(slotIndex: SlotIndex) {
constructor(slot: SlotIndex) {
super(UnlockConditionType.Timelock);
this.slotIndex = slotIndex;
this.slot = slot;
}
}

Expand All @@ -172,16 +172,16 @@ class ExpirationUnlockCondition extends UnlockCondition {
/**
* Before this slot index, the Address Unlock Condition is allowed to unlock the output, after that only the address defined in Return Address can.
*/
readonly slotIndex: SlotIndex;
readonly slot: SlotIndex;

/**
* @param returnAddress The address that can unlock the expired output.
* @param slotIndex The slot index timestamp marking the end of the claim period.
* @param slot The slot index timestamp marking the end of the claim period.
*/
constructor(returnAddress: Address, slotIndex: SlotIndex) {
constructor(returnAddress: Address, slot: SlotIndex) {
super(UnlockConditionType.Expiration);
this.returnAddress = returnAddress;
this.slotIndex = slotIndex;
this.slot = slot;
}
}

Expand Down

0 comments on commit 478db55

Please sign in to comment.