diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenAccountWipeHandler.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenAccountWipeHandler.java index b80c5e76de10..157d1cfd6fc3 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenAccountWipeHandler.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenAccountWipeHandler.java @@ -194,9 +194,15 @@ public void handle(@NonNull final HandleContext context) throws HandleException @Override public Fees calculateFees(@NonNull final FeeContext feeContext) { final var op = feeContext.body(); + final var readableTokenStore = feeContext.readableStore(ReadableTokenStore.class); + final var tokenType = + readableTokenStore.get(op.tokenWipeOrThrow().tokenOrThrow()).tokenType(); final var meta = TOKEN_OPS_USAGE_UTILS.tokenWipeUsageFrom(fromPbj(op)); return feeContext - .feeCalculator(SubType.DEFAULT) + .feeCalculator( + tokenType.equals(TokenType.FUNGIBLE_COMMON) + ? SubType.TOKEN_FUNGIBLE_COMMON + : SubType.TOKEN_NON_FUNGIBLE_UNIQUE) .addBytesPerTransaction(meta.getBpt()) .addNetworkRamByteSeconds(meta.getTransferRecordDb() * USAGE_PROPERTIES.legacyReceiptStorageSecs()) .calculate(); diff --git a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenBurnHandler.java b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenBurnHandler.java index 46388412dcf9..2d8d9513eb21 100644 --- a/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenBurnHandler.java +++ b/hedera-node/hedera-token-service-impl/src/main/java/com/hedera/node/app/service/token/impl/handlers/TokenBurnHandler.java @@ -158,9 +158,15 @@ public void handle(@NonNull final HandleContext context) throws HandleException @Override public Fees calculateFees(@NonNull final FeeContext feeContext) { final var op = feeContext.body(); + final var readableTokenStore = feeContext.readableStore(ReadableTokenStore.class); + final var tokenType = + readableTokenStore.get(op.tokenBurnOrThrow().tokenOrThrow()).tokenType(); final var meta = TOKEN_OPS_USAGE_UTILS.tokenBurnUsageFrom(fromPbj(op)); return feeContext - .feeCalculator(SubType.DEFAULT) + .feeCalculator( + tokenType.equals(TokenType.FUNGIBLE_COMMON) + ? SubType.TOKEN_FUNGIBLE_COMMON + : SubType.TOKEN_NON_FUNGIBLE_UNIQUE) .addBytesPerTransaction(meta.getBpt()) .addNetworkRamByteSeconds(meta.getTransferRecordDb() * USAGE_PROPERTIES.legacyReceiptStorageSecs()) .calculate();