@bananapus/nana-sdk-react 16.0.0 → 18.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,6 +2,9 @@ import { JBChainId } from "@bananapus/nana-sdk-core";
2
2
  /**
3
3
  * Return sucker pairs for the project ID in context.
4
4
  *
5
+ * Reads Bendystraw, so the tree must be wrapped in `JBProjectProvider` with a
6
+ * `bendystraw={{ apiKey }}` prop; composing `JBChainProvider` /
7
+ * `JBContractProvider` directly is not enough.
5
8
  */
6
9
  export declare function useSuckers(args?: {
7
10
  enabled: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"useSuckers.d.ts","sourceRoot":"","sources":["../../../src/hooks/suckers/useSuckers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAgC5D;;;GAGG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqBf,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;EAa/C"}
1
+ {"version":3,"file":"useSuckers.d.ts","sourceRoot":"","sources":["../../../src/hooks/suckers/useSuckers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAgC5D;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,IAAI,CAAC,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAqBf,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAAT,SAAS;;;EAa/C"}
package/dist/index.js CHANGED
@@ -743,7 +743,12 @@ function getBendystrawUrl(chainId, config) {
743
743
  function useBendystrawQuery(document, ...[variables, options]) {
744
744
  const chainId = useJBChainId();
745
745
  const config = useBendystrawConfig();
746
- const url = chainId && config ? getBendystrawUrl(chainId, config) : void 0;
746
+ if (!config) {
747
+ throw new Error(
748
+ "Bendystraw config missing. Wrap the tree in JBProjectProvider with a `bendystraw={{ apiKey }}` prop."
749
+ );
750
+ }
751
+ const url = chainId ? getBendystrawUrl(chainId, config) : void 0;
747
752
  const { expression, operationName } = analyzeDocument(document);
748
753
  if (!operationName) {
749
754
  throw new Error("Bendystraw operations must have a name.");