Shopify Discount Function

Currently In our shopify app we are implemented Discount function extension.

I’ve implemented a stackable coupon discount feature in my Shopify app. My goal is to apply CouponOne to Product One and CouponTwo to Product Two.

I’m using the discountStrategy: "all" configuration, but currently only one coupon is being applied — specifically, the higher-value discount. The second coupon doesn’t get applied to its respective product.

What I want is for different coupons to apply to different cart line items, with only one discount per cart line. However, what’s happening is that only one coupon (the higher discount) gets applied to the entire cart.

Has anyone faced a similar issue or can point out what I might be missing?