monorepo
monorepo copied to clipboard
[node] return type of RPC method`GetAppInstances` slightly inaccurate
The return type is encoded in GetAppInstancesResults
, an array of elements of type AppInstanceInfo
, whose timeout
field is of type BigNumber
; however manual examination of the return type at https://github.com/counterfactual/monorepo/blob/master/packages/node/test/integration/get-app-instances.spec.ts#L108 shows that it is of type { _hex: string }
. The array elements are also of type Object
. Note that expect()...toEqual
ignores these differences. This misalignment will allow e.g. RPC consumers to use bignumber methods on the timeout field without being caught by typescript.
This task will be to make the type system correctly express the differences, then.