useStreamQueries dynamic filter doesnt work (daml 1.17.1)

I’m working on a react project using generated code from daml(daml.js) and a feature that was working using daml 1.18.0 is not working using daml 1.17.1.

When I try to dynamically select a value and filter based on that, useStreamQueries doesn’t return any value.

The code is this:

const AssetData = (props) => {

    const filterOwner = () => [{account: {owner: props.ownerAsset}}];
    const assetDataArray = useStreamQueries(assetLib.DA.Finance.Asset.AssetDeposit, filterOwner,[props.ownerAsset]);
    return assetDataArray;
}

export default AssetData;

Any thoughts ?
Any help would be greatly appreciated!

Cheers
Fabio

1 Like

I went through the commit history to see whether I can find something that might be linked to your issue and so far the only relevant I found is this PR Multiplex multiple virtual query streams through a single web socket by stefanobaghino-da · Pull Request #10221 · digital-asset/daml · GitHub which made changes to the internals of useStreamQueries after 1.17.1 but before 1.18.0 was released (Beginning of October vs. beginning of December).

Maybe useStreamQueries was not working correctly with extended parameter usage before that PR, however I don’t know for sure yet as I did no testing yet.

I’m very curious on what made you go from 1.18.0 to 1.17.1. We usually expect people to move in the other direction, especially if they’re looking for bugs to be fixed.

I wasn’t able to reproduce what you experienced @Fabio_Costa with an adapted CreateDamlApp using daml 1.17.1.

Would it be possible for you to provide us an extended example with which we can easily reproduce the behavior you experience?