Skip to content

Commit a6a200c

Browse files
fix: use 0 for missing auto-renew period in getTokenInfo() result (#12576)
Signed-off-by: Michael Tinker <[email protected]>
1 parent a8bc1ae commit a6a200c

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
@@ -87,7 +87,7 @@ private ReturnTypes() {
8787
+ "(bool,address,bytes,bytes,address)" // inheritedAccountKey, contractId, ed25519, ECDSA_secp256k1, delegatableContractId
8888
+ ")[],"
8989
// Expiry
90-
+ "(uint32,address,uint32)" // second, autoRenewAccount, autoRenewPeriod
90+
+ "(int64,address,int64)" // second, autoRenewAccount, autoRenewPeriod
9191
+ ")"
9292

9393
+ ",int64,bool,bool,bool," // totalSupply, deleted, defaultKycStatus, pauseStatus

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)