Problem
Two user-data schemas drifted (upstream nktkas#181, nktkas#183):
userFees (src/api/info/_methods/userFees.ts):
nextTrialAvailableTimestamp is unknown | null; should be number | null.
stakingLink shape is stale: upstream discriminates by type — the stakingUser key is present for "requested" / "tradingUser" variants, but the tradingUser key for the "stakingUser" variant. The current single shape (lines 175-189) mis-types the third case.
UserFill (src/api/info/_methods/userFills.ts):
- Missing optional
feeTrialEscrow.
liquidatedUser (line 42) is required in the SDK but is now optional upstream.
Fix
Discriminate stakingLink by type, type the timestamp, add feeTrialEscrow, make liquidatedUser optional. Add tests.
Problem
Two user-data schemas drifted (upstream nktkas#181, nktkas#183):
userFees(src/api/info/_methods/userFees.ts):nextTrialAvailableTimestampisunknown | null; should benumber | null.stakingLinkshape is stale: upstream discriminates bytype— thestakingUserkey is present for"requested"/"tradingUser"variants, but thetradingUserkey for the"stakingUser"variant. The current single shape (lines 175-189) mis-types the third case.UserFill(src/api/info/_methods/userFills.ts):feeTrialEscrow.liquidatedUser(line 42) is required in the SDK but is now optional upstream.Fix
Discriminate
stakingLinkbytype, type the timestamp, addfeeTrialEscrow, makeliquidatedUseroptional. Add tests.