@redotech/redo-hydrogen 1.0.0 → 1.0.1

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.
@@ -7,7 +7,7 @@ import {
7
7
  } from "@shopify/hydrogen";
8
8
  import { useRedoCoverageClient } from "../providers/redo-coverage-client";
9
9
  import { CartInfoToEnable, RedoCoverageClient } from "../types";
10
- import { REDO_PUBLIC_API_HOSTNAME_LOCAL } from "../utils/security";
10
+ import { REDO_PUBLIC_API_HOSTNAME } from "../utils/security";
11
11
 
12
12
  type CheckoutButtonUIResponse = {
13
13
  html: string;
@@ -25,7 +25,7 @@ const getButtonsToShow = ({
25
25
  }): Promise<CheckoutButtonUIResponse | null> => {
26
26
  return new Promise<CheckoutButtonUIResponse | null>((resolve, reject) => {
27
27
  fetch(
28
- `http://${REDO_PUBLIC_API_HOSTNAME_LOCAL}/v2.2/stores/${storeId}/checkout-buttons-ui`,
28
+ `https://${REDO_PUBLIC_API_HOSTNAME}/v2.2/stores/${storeId}/checkout-buttons-ui`,
29
29
  {
30
30
  method: "GET",
31
31
  headers: {
@@ -2,7 +2,7 @@ import { useFetcher } from "@remix-run/react";
2
2
  import { CartReturn } from "@shopify/hydrogen";
3
3
  import { createContext, ReactNode, useContext, useEffect, useState } from "react";
4
4
  import { CartProductVariantFragment, CartAttributeKey, CartInfoToEnable, RedoContextValue, RedoCoverageClient } from "../types";
5
- import { REDO_PUBLIC_API_HOSTNAME_LOCAL } from "../utils/security";
5
+ import { REDO_PUBLIC_API_HOSTNAME } from "../utils/security";
6
6
  import { addProductToCartIfNeeded, removeProductFromCartIfNeeded, setCartRedoEnabledAttribute, useFetcherWithPromise } from "../utils/cart";
7
7
 
8
8
  const DEFAULT_REDO_CONTEXT_VALUE: RedoContextValue = {
@@ -27,7 +27,7 @@ const RedoProvider = ({
27
27
  const [loading, setLoading] = useState<boolean>(true);
28
28
 
29
29
  useEffect(() => {
30
- fetch(`http://${REDO_PUBLIC_API_HOSTNAME_LOCAL}/v2.2/stores/${storeId}/coverage-products`, {
30
+ fetch(`https://${REDO_PUBLIC_API_HOSTNAME}/v2.2/stores/${storeId}/coverage-products`, {
31
31
  method: 'POST',
32
32
  headers: {
33
33
  "Content-Type": "application/json"
@@ -1,13 +1,10 @@
1
1
  const REDO_PUBLIC_API_HOSTNAME = 'api.getredo.com';
2
- const REDO_PUBLIC_API_HOSTNAME_LOCAL = 'localhost:8001';
3
2
 
4
3
  const REDO_REQUIRED_HOSTNAMES = [
5
- REDO_PUBLIC_API_HOSTNAME,
6
- REDO_PUBLIC_API_HOSTNAME_LOCAL
4
+ REDO_PUBLIC_API_HOSTNAME
7
5
  ];
8
6
 
9
7
  export {
10
8
  REDO_REQUIRED_HOSTNAMES,
11
- REDO_PUBLIC_API_HOSTNAME,
12
- REDO_PUBLIC_API_HOSTNAME_LOCAL,
9
+ REDO_PUBLIC_API_HOSTNAME
13
10
  };