Skip to content

Commit db97c57

Browse files
committed
Removed 24 hours check as it is only for testnet / mainnet
1 parent a2d3ef4 commit db97c57

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

src/model/transaction/Deadline.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ export class Deadline {
4040

4141
if (deadline <= 0) {
4242
throw new Error('deadline should be greater than 0');
43-
} else if (now.plus(24, ChronoUnit.HOURS).compareTo(deadlineDateTime) !== 1) {
44-
throw new Error('deadline should be less than 24 hours');
4543
}
46-
4744
return new Deadline(deadlineDateTime.minusMillis(epochAdjustment.toMillis()).toEpochMilli());
4845
}
4946

test/model/transaction/Deadline.spec.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ describe('Deadline', () => {
4141
}).to.throw(Error);
4242
});
4343

44-
it('should throw error deadline greater than 24h', () => {
45-
expect(() => {
46-
Deadline.create(epochAdjustment, 2, ChronoUnit.DAYS);
47-
}).to.throw(Error);
48-
});
49-
5044
it('should createComplete date with Deadline array', () => {
5145
const deadline = Deadline.createFromDTO('51110867862');
5246

0 commit comments

Comments
 (0)