支付域名识别更新:Vercel → polyweather.top
payment-host.ts 新增 polyweather.top。site-url.ts/wallet.ts/usePaymentFlow/AccountCenter 硬编码域名替换。PRODUCTION_SITE_URL 改为 https://polyweather.top。
This commit is contained in:
@@ -885,7 +885,7 @@ export function AccountCenter() {
|
|||||||
{copy.paymentHostBlocked.replace(
|
{copy.paymentHostBlocked.replace(
|
||||||
"{host}",
|
"{host}",
|
||||||
allowedPaymentHosts[0] ||
|
allowedPaymentHosts[0] ||
|
||||||
"polyweather-pro.vercel.app",
|
"polyweather.top",
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -293,7 +293,7 @@ export function usePaymentFlow(params: UsePaymentFlowParams) {
|
|||||||
clearPaymentState();
|
clearPaymentState();
|
||||||
clearStoredPaymentRecovery();
|
clearStoredPaymentRecovery();
|
||||||
if (!paymentHostAllowed) {
|
if (!paymentHostAllowed) {
|
||||||
setPaymentError(copy.paymentHostBlocked.replace("{host}", allowedPaymentHosts[0] || "polyweather-pro.vercel.app"));
|
setPaymentError(copy.paymentHostBlocked.replace("{host}", allowedPaymentHosts[0] || "polyweather.top"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!authIsAuthenticated) {
|
if (!authIsAuthenticated) {
|
||||||
@@ -516,7 +516,7 @@ export function usePaymentFlow(params: UsePaymentFlowParams) {
|
|||||||
setLastIntentId("");
|
setLastIntentId("");
|
||||||
setLastTxHash("");
|
setLastTxHash("");
|
||||||
if (!paymentHostAllowed) {
|
if (!paymentHostAllowed) {
|
||||||
setPaymentError(copy.paymentHostBlocked.replace("{host}", allowedPaymentHosts[0] || "polyweather-pro.vercel.app"));
|
setPaymentError(copy.paymentHostBlocked.replace("{host}", allowedPaymentHosts[0] || "polyweather.top"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!authIsAuthenticated) {
|
if (!authIsAuthenticated) {
|
||||||
@@ -670,7 +670,7 @@ export function usePaymentFlow(params: UsePaymentFlowParams) {
|
|||||||
// ── handleOverlayCheckout ──────────────────────────────
|
// ── handleOverlayCheckout ──────────────────────────────
|
||||||
const handleOverlayCheckout = async () => {
|
const handleOverlayCheckout = async () => {
|
||||||
if (!paymentHostAllowed) {
|
if (!paymentHostAllowed) {
|
||||||
setPaymentError(copy.paymentHostBlocked.replace("{host}", allowedPaymentHosts[0] || "polyweather-pro.vercel.app"));
|
setPaymentError(copy.paymentHostBlocked.replace("{host}", allowedPaymentHosts[0] || "polyweather.top"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!authIsAuthenticated) {
|
if (!authIsAuthenticated) {
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ export async function getWalletConnectProvider(
|
|||||||
const origin =
|
const origin =
|
||||||
typeof window !== "undefined"
|
typeof window !== "undefined"
|
||||||
? window.location.origin
|
? window.location.origin
|
||||||
: "https://polyweather-pro.vercel.app";
|
: "https://polyweather.top";
|
||||||
const provider = (await EthereumProvider.init({
|
const provider = (await EthereumProvider.init({
|
||||||
projectId: WALLETCONNECT_PROJECT_ID,
|
projectId: WALLETCONNECT_PROJECT_ID,
|
||||||
chains: [chainId],
|
chains: [chainId],
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
import fs from "node:fs";
|
|
||||||
import path from "node:path";
|
|
||||||
|
|
||||||
function assert(condition: unknown, message: string) {
|
|
||||||
if (!condition) throw new Error(message);
|
|
||||||
}
|
|
||||||
|
|
||||||
export function runTests() {
|
|
||||||
const projectRoot = process.cwd();
|
|
||||||
const hookPath = path.join(projectRoot, "hooks", "useLeafletMap.ts");
|
|
||||||
const source = fs.readFileSync(hookPath, "utf8");
|
|
||||||
|
|
||||||
assert(
|
|
||||||
source.includes("bindMarkerTouchSelect") &&
|
|
||||||
source.includes('"touchend"') &&
|
|
||||||
source.includes('"pointerup"'),
|
|
||||||
"Leaflet city markers must bind touch/pointer selection events for mobile taps",
|
|
||||||
);
|
|
||||||
assert(
|
|
||||||
source.includes("L.DomEvent.stopPropagation") &&
|
|
||||||
source.includes("L.DomEvent.preventDefault"),
|
|
||||||
"mobile marker tap handling must stop map click propagation and prevent browser touch defaults",
|
|
||||||
);
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,6 @@
|
|||||||
const DEFAULT_ALLOWED_PAYMENT_HOSTS = [
|
const DEFAULT_ALLOWED_PAYMENT_HOSTS = [
|
||||||
"polyweather-pro.vercel.app",
|
"polyweather-pro.vercel.app",
|
||||||
|
"polyweather.top",
|
||||||
"localhost",
|
"localhost",
|
||||||
"127.0.0.1",
|
"127.0.0.1",
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
export const PRODUCTION_SITE_URL = "https://polyweather-pro.vercel.app";
|
export const PRODUCTION_SITE_URL = "https://polyweather.top";
|
||||||
|
|
||||||
export function getConfiguredSiteUrl() {
|
export function getConfiguredSiteUrl() {
|
||||||
const configured = process.env.NEXT_PUBLIC_SITE_URL?.trim();
|
const configured = process.env.NEXT_PUBLIC_SITE_URL?.trim();
|
||||||
|
|||||||
Reference in New Issue
Block a user