Closed rmtngh closed 6 months ago
I noticed this as well... As for now, I hardcoded the keys in the code, e.g. "FETCH", instead of using Cart.ActionType.FETCH (which translated to APP::CART::FETCH)
Closing as outdated as the POS APIs have been updated in the latest version of App Bridge: https://shopify.dev/docs/api/app-bridge-library/apis/pos. Please reopen if you're still having the issue!
Describe the bug
Following the documentation,
state.Cart
object is expected to have keys defined inapp-bridge/actions/Cart
, but they keys are different resulting in error and never successfully detecting the cart feature._ref is
undefined
, value of Cart.Action.FETCH from "@shopify/app-bridge": "2.0.5" is:APP::CART::FETCH
while in the returned value fromfeaturesAvailable
the object key is:FETCH
Actual result:
FETCH: { Subscribe: true, Dispatch: true }
Expected result:
"APP::CART::FETCH": { Subscribe: true, Dispatch: true }
To Reproduce
Steps to reproduce the behaviour:
@shopify/app-bridge
Expected behaviour
Cart feature needs to be returned as available when an app is launched from Home view on Shopify POS
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@2.0.5
@shopify/app-bridge-react
@2.0.5
@shopify/polaris
@6.0.1
Platform
Additional context