I'm trying to add a simple time bounds with the Java SDK to settle a transaction happening at a certain time.
Code used :
Instant unlockDate = Instant.now().plusSeconds(60 * 2);
TimeBounds timeBounds = new TimeBounds(unlockDate.getEpochSecond(), 0);
Transaction transaction = new Transaction.Builder(sourceAccount)
.addOperation(new PaymentOperation.Builder(destination,
new AssetTypeCreditAlphaNum12("xxx", issuer), amount).build())
.addTimeBounds(timeBounds)
.addMemo(Memo.text("Memo")).build();
transaction.sign(distributor);
But I get this error :
Exception in thread "main" java.lang.IllegalArgumentException: minTime must be >= maxTime
It seems you can't set the maxTime to 0 anymore.
Is there a workaround?