Skip to content

Commit a2a4c92

Browse files
fix: use 0 for unset auto-renew period (#12577)
Signed-off-by: Michael Tinker <[email protected]>
1 parent c945e72 commit a2a4c92

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/systemcontracts/hts/ReturnTypes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ private ReturnTypes() {
6666
public static final String UINT256 = "(uint256)";
6767
public static final String RESPONSE_CODE_EXPIRY = "(int32,"
6868
// Expiry
69-
+ "(uint32,address,uint32)" // second, autoRenewAccount, autoRenewPeriod
69+
+ "(int64,address,int64)" // second, autoRenewAccount, autoRenewPeriod
7070
+ ")";
7171
public static final String RESPONSE_CODE_TOKEN_KEY = "(int32,"
7272
// KeyValue

hedera-node/hedera-smart-contract-service-impl/src/main/java/com/hedera/node/app/service/contract/impl/exec/systemcontracts/hts/TokenTupleUtils.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public static Tuple expiryTupleFor(@NonNull final Token token) {
6565
return Tuple.of(
6666
token.expirationSecond(),
6767
headlongAddressOf(token.autoRenewAccountIdOrElse(ZERO_ACCOUNT_ID)),
68-
token.autoRenewSeconds());
68+
Math.max(0, token.autoRenewSeconds()));
6969
}
7070

7171
/**

0 commit comments

Comments
 (0)