@layerfi/components 0.1.19 → 0.1.20

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.
package/dist/index.d.ts CHANGED
@@ -2759,8 +2759,9 @@ declare module '@layerfi/components/providers/LayerProvider/LayerProvider' {
2759
2759
  businessAccessToken?: string;
2760
2760
  environment?: keyof typeof LayerEnvironment;
2761
2761
  theme?: LayerThemeConfig;
2762
+ usePlaidSandbox?: boolean;
2762
2763
  };
2763
- export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, }: PropsWithChildren<Props>) => React.JSX.Element;
2764
+ export const LayerProvider: ({ appId, appSecret, businessId, children, businessAccessToken, environment, theme, usePlaidSandbox, }: PropsWithChildren<Props>) => React.JSX.Element;
2764
2765
  export {};
2765
2766
 
2766
2767
  }
@@ -3071,6 +3072,7 @@ declare module '@layerfi/components/types/layer_context' {
3071
3072
  apiUrl: string;
3072
3073
  theme?: LayerThemeConfig;
3073
3074
  colors: ColorsPalette;
3075
+ usePlaidSandbox?: boolean;
3074
3076
  onboardingStep?: OnboardingStep;
3075
3077
  };
3076
3078
  export type LayerContextHelpers = {
package/dist/index.js CHANGED
@@ -412,6 +412,7 @@ var LayerContext = (0, import_react.createContext)({
412
412
  apiUrl: "",
413
413
  theme: void 0,
414
414
  colors: {},
415
+ usePlaidSandbox: true,
415
416
  setTheme: () => void 0,
416
417
  getColor: (_shade) => void 0,
417
418
  setLightColor: () => void 0,
@@ -4492,11 +4493,11 @@ var LINKED_ACCOUNTS_MOCK_DATA = [
4492
4493
  var import_swr4 = __toESM(require("swr"));
4493
4494
  var DEBUG = true;
4494
4495
  var USE_MOCK_RESPONSE_DATA = false;
4495
- var USE_PLAID_SANDBOX = true;
4496
4496
  var useLinkedAccounts = () => {
4497
- const { auth, businessId, apiUrl } = useLayerContext();
4497
+ const { auth, businessId, apiUrl, usePlaidSandbox } = useLayerContext();
4498
4498
  const [linkToken, setLinkToken] = (0, import_react49.useState)(null);
4499
4499
  const [loadingStatus, setLoadingStatus] = (0, import_react49.useState)("initial");
4500
+ const USE_PLAID_SANDBOX = usePlaidSandbox ?? true;
4500
4501
  const {
4501
4502
  data: responseData,
4502
4503
  isLoading,
@@ -9099,7 +9100,8 @@ var LayerProvider = ({
9099
9100
  children,
9100
9101
  businessAccessToken,
9101
9102
  environment = "production",
9102
- theme
9103
+ theme,
9104
+ usePlaidSandbox
9103
9105
  }) => {
9104
9106
  const defaultSWRConfig = {
9105
9107
  revalidateInterval: 0,
@@ -9121,6 +9123,7 @@ var LayerProvider = ({
9121
9123
  apiUrl,
9122
9124
  theme,
9123
9125
  colors,
9126
+ usePlaidSandbox,
9124
9127
  onboardingStep: void 0
9125
9128
  });
9126
9129
  const { data: auth } = appId !== void 0 && appSecret !== void 0 ? (0, import_swr8.default)(