diff --git a/docker/dev/.env.example b/docker/dev/.env.example index 137c1ac3..476f6a2a 100644 --- a/docker/dev/.env.example +++ b/docker/dev/.env.example @@ -3,6 +3,7 @@ API_URL=https://backend:5101/ SCRIPT_API_URL=https://localhost:5101/ SCRIPT_FRONTEND_URL=https://localhost:5100/ SCRIPT_ILPAY_URL=https://interledgerpay.com/extension/ +SCRIPT_EMBED_URL=https://localhost:5100/ # BACKEND AWS_ACCESS_KEY_ID= diff --git a/docker/dev/docker-compose.yml b/docker/dev/docker-compose.yml index 66c743b7..77483e4d 100644 --- a/docker/dev/docker-compose.yml +++ b/docker/dev/docker-compose.yml @@ -38,6 +38,7 @@ services: VITE_SCRIPT_API_URL: ${SCRIPT_API_URL} VITE_SCRIPT_FRONTEND_URL: ${SCRIPT_FRONTEND_URL} VITE_SCRIPT_ILPAY_URL: ${SCRIPT_ILPAY_URL} + VITE_INIT_SCRIPT_URL: ${SCRIPT_EMBED_URL} ports: - '5100:5100' expose: @@ -48,6 +49,7 @@ services: API_URL: ${API_URL} ILPAY_URL: ${SCRIPT_ILPAY_URL} FRONTEND_URL: ${SCRIPT_FRONTEND_URL} + INIT_SCRIPT_URL: ${SCRIPT_EMBED_URL} networks: - wm-tools command: pnpm run dev diff --git a/docker/prod/docker-compose.yml b/docker/prod/docker-compose.yml index 85a4ff3b..734298ec 100644 --- a/docker/prod/docker-compose.yml +++ b/docker/prod/docker-compose.yml @@ -30,6 +30,7 @@ services: VITE_SCRIPT_API_URL: ${SCRIPT_API_URL} VITE_SCRIPT_FRONTEND_URL: ${SCRIPT_FRONTEND_URL} VITE_SCRIPT_ILPAY_URL: ${SCRIPT_ILPAY_URL} + VITE_INIT_SCRIPT_URL: ${SCRIPT_EMBED_URL} ports: - '5100:5100' expose: @@ -40,6 +41,7 @@ services: API_URL: ${API_URL} ILPAY_URL: ${SCRIPT_ILPAY_URL} FRONTEND_URL: ${SCRIPT_FRONTEND_URL} + INIT_SCRIPT_URL: ${SCRIPT_EMBED_URL} networks: - wm-tools depends_on: diff --git a/frontend/app/lib/presets.ts b/frontend/app/lib/presets.ts index 7784d040..19b12dd3 100644 --- a/frontend/app/lib/presets.ts +++ b/frontend/app/lib/presets.ts @@ -116,7 +116,7 @@ export const availableTools = [ "The banner informs visitors who don't have the Web Monetization extension active, with a call-to-action linking to the extension or providing details about the options available. It also adds your wallet address for your site to be monetized." }, { - enabled: true, + enabled: false, title: 'Widget', image: 'widget_representation.svg', bgColor: 'from-wm-red to-wm-red-fade', diff --git a/frontend/app/routes/create.$type.tsx b/frontend/app/routes/create.$type.tsx index f8758af0..1313b0c2 100644 --- a/frontend/app/routes/create.$type.tsx +++ b/frontend/app/routes/create.$type.tsx @@ -57,21 +57,26 @@ export async function loader({ params, request }: LoaderFunctionArgs) { const defaultConfig: ElementConfigType = apiResponse?.payload?.default const ilpayUrl = process.env.ILPAY_URL || '' - const toolsUrl = process.env.FRONTEND_URL || '' + const scriptInitUrl = process.env.SCRIPT_EMBED_URL || '' return { elementType, defaultConfig, message, ilpayUrl, - toolsUrl, + scriptInitUrl, contentOnlyParam } } export default function Create() { - const { elementType, defaultConfig, ilpayUrl, toolsUrl, contentOnlyParam } = - useLoaderData() + const { + elementType, + defaultConfig, + ilpayUrl, + scriptInitUrl, + contentOnlyParam + } = useLoaderData() const response = useActionData() const { state } = useNavigation() const isSubmitting = state === 'submitting' @@ -94,7 +99,7 @@ export default function Create() { const wa = (toolConfig?.walletAddress || '') .replace('$', '') .replace('https://', '') - const scriptToDisplay = `` + const scriptToDisplay = `` const submitForm = useSubmit() const onConfirm = () => {