Skip to content

Commit

Permalink
fix: allow users to change data-sdk-integration-source (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
dtjones404 committed Aug 16, 2023
1 parent 92f87f4 commit 0feef3e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/PayPalScriptProvider.tsx
Expand Up @@ -25,10 +25,10 @@ export const PayPalScriptProvider: FC<ScriptProviderProps> = ({
}: ScriptProviderProps) => {
const [state, dispatch] = useReducer(scriptReducer, {
options: {
...options,
[SCRIPT_ID]: `${getScriptID(options)}`,
[SDK_SETTINGS.DATA_SDK_INTEGRATION_SOURCE]:
SDK_SETTINGS.DATA_SDK_INTEGRATION_SOURCE_VALUE,
...options,
[SCRIPT_ID]: `${getScriptID(options)}`,
},
loadingStatus: deferLoading
? SCRIPT_LOADING_STATE.INITIAL
Expand Down
4 changes: 2 additions & 2 deletions src/context/scriptProviderContext.ts
Expand Up @@ -71,10 +71,10 @@ export function scriptReducer(
...state,
loadingStatus: SCRIPT_LOADING_STATE.PENDING,
options: {
...action.value,
[SCRIPT_ID]: `${getScriptID(action.value)}`,
[SDK_SETTINGS.DATA_SDK_INTEGRATION_SOURCE]:
SDK_SETTINGS.DATA_SDK_INTEGRATION_SOURCE_VALUE,
...action.value,
[SCRIPT_ID]: `${getScriptID(action.value)}`,
},
};
case DISPATCH_ACTION.SET_BRAINTREE_INSTANCE:
Expand Down

0 comments on commit 0feef3e

Please sign in to comment.