The values are small enough to fit in an int, so the cast is at best redundant. However, UniValue can handle any integer type, so having to think about the cast here is also confusing.
finalizepsbt
merkleblock