coinley-pay 0.45.0 → 0.46.0
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/{CoinleyPayment-CmMOW8Fu.js → CoinleyPayment-BZZKQO96.js} +85 -77
- package/dist/{appKitEVM-Dxo1Z_69.js → appKitEVM-zLHXb4kV.js} +2 -2
- package/dist/{appKitSolana-BmONG1Sf.js → appKitSolana-CcEv9c6h.js} +2 -2
- package/dist/coinley-vanilla.min.js +576 -576
- package/dist/{index-CyqvsmiG.js → index-BFwilphb.js} +3 -3
- package/dist/{index-oXUT3-CW.js → index-Fh9oknzD.js} +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
|
|
|
5
5
|
import { useState, useRef, useEffect, useCallback, useMemo } from "react";
|
|
6
6
|
import { useConnect, useAccount, useSwitchChain, useSendTransaction, useWaitForTransactionReceipt, WagmiProvider, useDisconnect } from "wagmi";
|
|
7
7
|
import { QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
8
|
-
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-
|
|
8
|
+
import { s as sdkAnalytics, c as clarityAnalytics, d as dist, a as Buffer2, B as Buffer$1, g as getCurrencyInfo, p as prefetchRates, i as isSupportedCurrency, b as convertToUSD, f as formatCurrency } from "./index-BFwilphb.js";
|
|
9
9
|
import { createConfig, fallback, http, getAccount as getAccount$1, getWalletClient, simulateContract, writeContract, readContract, waitForTransactionReceipt, estimateFeesPerGas as estimateFeesPerGas$1 } from "@wagmi/core";
|
|
10
10
|
import { injected, metaMask, coinbaseWallet, walletConnect } from "@wagmi/connectors";
|
|
11
11
|
import { defineChain as defineChain$1, erc20Abi, http as http$1, createPublicClient, fallback as fallback$1 } from "viem";
|
|
@@ -21122,7 +21122,7 @@ const WalletSelector = ({
|
|
|
21122
21122
|
try {
|
|
21123
21123
|
setAppKitError(null);
|
|
21124
21124
|
setWalletConnectAddress(solanaAccountState.address);
|
|
21125
|
-
const { createWalletConnectAdapter } = await import("./appKitSolana-
|
|
21125
|
+
const { createWalletConnectAdapter } = await import("./appKitSolana-CcEv9c6h.js");
|
|
21126
21126
|
const adapter = createWalletConnectAdapter(solanaAccountState.address);
|
|
21127
21127
|
await solanaWallet.connectWalletConnect(adapter, solanaAccountState.address);
|
|
21128
21128
|
console.log("✅ WalletConnect synced with SDK");
|
|
@@ -21227,7 +21227,7 @@ const WalletSelector = ({
|
|
|
21227
21227
|
setAppKitLoading(true);
|
|
21228
21228
|
setAppKitError(null);
|
|
21229
21229
|
try {
|
|
21230
|
-
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-
|
|
21230
|
+
const { initializeAppKitEVM, openAppKitModal } = await import("./appKitEVM-zLHXb4kV.js");
|
|
21231
21231
|
await initializeAppKitEVM(wagmiConfig);
|
|
21232
21232
|
await openAppKitModal();
|
|
21233
21233
|
} catch (error) {
|
|
@@ -21247,7 +21247,7 @@ const WalletSelector = ({
|
|
|
21247
21247
|
setAppKitError(null);
|
|
21248
21248
|
try {
|
|
21249
21249
|
console.log("📦 Loading AppKit Solana module...");
|
|
21250
|
-
const { initializeAppKitSolana } = await import("./appKitSolana-
|
|
21250
|
+
const { initializeAppKitSolana } = await import("./appKitSolana-CcEv9c6h.js");
|
|
21251
21251
|
console.log("✅ Module loaded, initializing...");
|
|
21252
21252
|
const modal = await initializeAppKitSolana(solanaWallet);
|
|
21253
21253
|
console.log("✅ AppKit Solana initialized successfully");
|
|
@@ -23318,7 +23318,6 @@ const CoinleyPaymentInternal = ({
|
|
|
23318
23318
|
const [ccError, setCcError] = useState(null);
|
|
23319
23319
|
const [ccGenerating, setCcGenerating] = useState(false);
|
|
23320
23320
|
const [ccManualCheckStatus, setCcManualCheckStatus] = useState("idle");
|
|
23321
|
-
const [transferNoticeModal, setTransferNoticeModal] = useState(null);
|
|
23322
23321
|
const ccSucceeded = useRef(false);
|
|
23323
23322
|
const ccStatusPollInFlight = useRef(false);
|
|
23324
23323
|
const [networkSearch, setNetworkSearch] = useState("");
|
|
@@ -23353,6 +23352,7 @@ const CoinleyPaymentInternal = ({
|
|
|
23353
23352
|
const [offsetSuccessDetails, setOffsetSuccessDetails] = useState(null);
|
|
23354
23353
|
const [refundSuccessDetails, setRefundSuccessDetails] = useState(null);
|
|
23355
23354
|
const [recoveryLoadingAction, setRecoveryLoadingAction] = useState(null);
|
|
23355
|
+
const [recoveryLoadingStatus, setRecoveryLoadingStatus] = useState(null);
|
|
23356
23356
|
const manualCheckTimeout = useRef(null);
|
|
23357
23357
|
const recoveryLoadingStartedAt = useRef(0);
|
|
23358
23358
|
const recoveryLoadingTimeout = useRef(null);
|
|
@@ -23457,9 +23457,6 @@ const CoinleyPaymentInternal = ({
|
|
|
23457
23457
|
} = paymentFlow;
|
|
23458
23458
|
const activeTransferPaymentId = (paymentData == null ? void 0 : paymentData.id) || (ccResult == null ? void 0 : ccResult.id) || (ccResult == null ? void 0 : ccResult.paymentId);
|
|
23459
23459
|
const activeTransferDepositAddress = (paymentData == null ? void 0 : paymentData.depositAddress) || (ccResult == null ? void 0 : ccResult.relayDepositAddress) || (ccResult == null ? void 0 : ccResult.depositAddress);
|
|
23460
|
-
const showTransferNoticeModal = useCallback((message, title = "Transfer not detected yet") => {
|
|
23461
|
-
setTransferNoticeModal({ title, message });
|
|
23462
|
-
}, []);
|
|
23463
23460
|
const merchantReceiveNetworks = (merchantNetworks == null ? void 0 : merchantNetworks.length) ? merchantNetworks : networks;
|
|
23464
23461
|
const isMerchantReceiveNetwork = useCallback((network) => {
|
|
23465
23462
|
var _a2;
|
|
@@ -23720,12 +23717,14 @@ const CoinleyPaymentInternal = ({
|
|
|
23720
23717
|
setManualCheckStatus(null);
|
|
23721
23718
|
setCcManualCheckStatus(null);
|
|
23722
23719
|
setRecoveryLoadingAction(null);
|
|
23720
|
+
setRecoveryLoadingStatus(null);
|
|
23723
23721
|
clearUnderpaymentRecovery(paymentId || activeTransferPaymentId);
|
|
23724
23722
|
}, [activeTransferPaymentId, clearUnderpaymentRecovery]);
|
|
23725
23723
|
useEffect(() => {
|
|
23726
23724
|
setOffsetSuccessDetails(null);
|
|
23727
23725
|
setRefundSuccessDetails(null);
|
|
23728
23726
|
setRecoveryLoadingAction(null);
|
|
23727
|
+
setRecoveryLoadingStatus(null);
|
|
23729
23728
|
}, [paymentData == null ? void 0 : paymentData.id]);
|
|
23730
23729
|
const selectedNetworkIsSolana = (selectedNetwork == null ? void 0 : selectedNetwork.chainType) === "solana" || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) === "solana";
|
|
23731
23730
|
const sourceNeedsMerchantBridge = Boolean(
|
|
@@ -24352,6 +24351,7 @@ const CoinleyPaymentInternal = ({
|
|
|
24352
24351
|
setSelectedMobileWallet(null);
|
|
24353
24352
|
setMobileWalletRedirecting(null);
|
|
24354
24353
|
setRecoveryLoadingAction(null);
|
|
24354
|
+
setRecoveryLoadingStatus(null);
|
|
24355
24355
|
if (recoveryLoadingTimeout.current) {
|
|
24356
24356
|
clearTimeout(recoveryLoadingTimeout.current);
|
|
24357
24357
|
recoveryLoadingTimeout.current = null;
|
|
@@ -25179,8 +25179,9 @@ const CoinleyPaymentInternal = ({
|
|
|
25179
25179
|
}
|
|
25180
25180
|
recoveryLoadingStartedAt.current = Date.now();
|
|
25181
25181
|
setRecoveryLoadingAction(action);
|
|
25182
|
+
setRecoveryLoadingStatus(null);
|
|
25182
25183
|
}, []);
|
|
25183
|
-
const
|
|
25184
|
+
const runAfterRecoveryMinimum = useCallback((callback) => {
|
|
25184
25185
|
const elapsed = Date.now() - recoveryLoadingStartedAt.current;
|
|
25185
25186
|
const delay = Math.max(RECOVERY_LOADING_MIN_MS - elapsed, 0);
|
|
25186
25187
|
if (recoveryLoadingTimeout.current) {
|
|
@@ -25188,12 +25189,41 @@ const CoinleyPaymentInternal = ({
|
|
|
25188
25189
|
}
|
|
25189
25190
|
recoveryLoadingTimeout.current = setTimeout(() => {
|
|
25190
25191
|
recoveryLoadingTimeout.current = null;
|
|
25191
|
-
setRecoveryLoadingAction(null);
|
|
25192
25192
|
if (typeof callback === "function") {
|
|
25193
25193
|
callback();
|
|
25194
25194
|
}
|
|
25195
25195
|
}, delay);
|
|
25196
25196
|
}, []);
|
|
25197
|
+
const finishRecoveryLoading = useCallback((callback) => {
|
|
25198
|
+
runAfterRecoveryMinimum(() => {
|
|
25199
|
+
setRecoveryLoadingAction(null);
|
|
25200
|
+
setRecoveryLoadingStatus(null);
|
|
25201
|
+
if (typeof callback === "function") {
|
|
25202
|
+
callback();
|
|
25203
|
+
}
|
|
25204
|
+
});
|
|
25205
|
+
}, [runAfterRecoveryMinimum]);
|
|
25206
|
+
const holdRecoveryLoading = useCallback((action, status) => {
|
|
25207
|
+
runAfterRecoveryMinimum(() => {
|
|
25208
|
+
setRecoveryLoadingAction(action);
|
|
25209
|
+
setRecoveryLoadingStatus({ action, ...status });
|
|
25210
|
+
});
|
|
25211
|
+
}, [runAfterRecoveryMinimum]);
|
|
25212
|
+
const getOffsetWaitingStatus = useCallback((overrides = {}) => {
|
|
25213
|
+
const shortfallLabel = underpaymentInfo ? `${formatAmount(underpaymentInfo.shortfallAmount || underpaymentInfo.amountRemaining || 0)} ${underpaymentInfo.tokenSymbol || (selectedToken == null ? void 0 : selectedToken.symbol) || ""}`.trim() : "the remaining amount";
|
|
25214
|
+
const networkLabel = (underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel) || (selectedNetwork == null ? void 0 : selectedNetwork.name) || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) || "the selected network";
|
|
25215
|
+
return {
|
|
25216
|
+
title: "Still checking your offset",
|
|
25217
|
+
description: "We have not detected your offset yet. Keep this screen open; we will keep checking automatically.",
|
|
25218
|
+
detail: `Waiting for ${shortfallLabel} on ${networkLabel}.`,
|
|
25219
|
+
...overrides
|
|
25220
|
+
};
|
|
25221
|
+
}, [selectedNetwork == null ? void 0 : selectedNetwork.name, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, underpaymentInfo]);
|
|
25222
|
+
const getRefundPendingStatus = useCallback(() => ({
|
|
25223
|
+
title: "Refund request received",
|
|
25224
|
+
description: "We will process it automatically.",
|
|
25225
|
+
detail: `Refunding the received ${(underpaymentInfo == null ? void 0 : underpaymentInfo.tokenSymbol) || (selectedToken == null ? void 0 : selectedToken.symbol) || "tokens"} on ${(underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel) || (selectedNetwork == null ? void 0 : selectedNetwork.name) || (selectedNetwork == null ? void 0 : selectedNetwork.shortName) || "the selected network"}.`
|
|
25226
|
+
}), [selectedNetwork == null ? void 0 : selectedNetwork.name, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, underpaymentInfo == null ? void 0 : underpaymentInfo.refundNetworkLabel, underpaymentInfo == null ? void 0 : underpaymentInfo.tokenSymbol]);
|
|
25197
25227
|
useEffect(() => () => {
|
|
25198
25228
|
if (recoveryLoadingTimeout.current) {
|
|
25199
25229
|
clearTimeout(recoveryLoadingTimeout.current);
|
|
@@ -25209,18 +25239,24 @@ const CoinleyPaymentInternal = ({
|
|
|
25209
25239
|
setCcPhase(status.phase);
|
|
25210
25240
|
if (activateUnderpaymentFromCrossChainStatus(status)) {
|
|
25211
25241
|
if (isOffsetRecovery) {
|
|
25212
|
-
|
|
25213
|
-
|
|
25214
|
-
showTransferNoticeModal("We have not detected your offset yet. It can take a few moments to appear on-chain, and we will keep checking automatically.");
|
|
25215
|
-
});
|
|
25242
|
+
setCcManualCheckStatus("not_found");
|
|
25243
|
+
holdRecoveryLoading("offset", getOffsetWaitingStatus());
|
|
25216
25244
|
} else {
|
|
25217
25245
|
setCcManualCheckStatus(null);
|
|
25218
25246
|
}
|
|
25219
25247
|
} else if (status.phase === "bridging") {
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
|
|
25223
|
-
|
|
25248
|
+
if (isOffsetRecovery) {
|
|
25249
|
+
holdRecoveryLoading("offset", getOffsetWaitingStatus({
|
|
25250
|
+
title: "Transfer detected",
|
|
25251
|
+
description: "We have detected your offset and are waiting for processing to complete.",
|
|
25252
|
+
detail: "We will keep checking automatically."
|
|
25253
|
+
}));
|
|
25254
|
+
} else {
|
|
25255
|
+
finishRecoveryLoading(() => {
|
|
25256
|
+
clearUnderpaymentUiState(status.paymentId || ccResult.id);
|
|
25257
|
+
setCcManualCheckStatus("idle");
|
|
25258
|
+
});
|
|
25259
|
+
}
|
|
25224
25260
|
} else if ((status.phase === "received" || status.phase === "settled") && !ccSucceeded.current) {
|
|
25225
25261
|
finishRecoveryLoading(() => {
|
|
25226
25262
|
ccSucceeded.current = true;
|
|
@@ -25231,12 +25267,10 @@ const CoinleyPaymentInternal = ({
|
|
|
25231
25267
|
setCcManualCheckStatus("failed");
|
|
25232
25268
|
});
|
|
25233
25269
|
} else {
|
|
25234
|
-
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
|
|
25238
|
-
);
|
|
25239
|
-
});
|
|
25270
|
+
setCcManualCheckStatus("not_found");
|
|
25271
|
+
if (isOffsetRecovery) {
|
|
25272
|
+
holdRecoveryLoading("offset", getOffsetWaitingStatus());
|
|
25273
|
+
}
|
|
25240
25274
|
}
|
|
25241
25275
|
} catch (error2) {
|
|
25242
25276
|
finishRecoveryLoading(() => {
|
|
@@ -26151,11 +26185,8 @@ const CoinleyPaymentInternal = ({
|
|
|
26151
26185
|
setCurrentStep(PAYMENT_STEPS.SUCCESS);
|
|
26152
26186
|
});
|
|
26153
26187
|
} else {
|
|
26154
|
-
|
|
26155
|
-
|
|
26156
|
-
setRefundRequestMessage("");
|
|
26157
|
-
showTransferNoticeModal(refundMessage, "Refund request received");
|
|
26158
|
-
});
|
|
26188
|
+
setRefundRequestMessage("");
|
|
26189
|
+
holdRecoveryLoading("refund", getRefundPendingStatus());
|
|
26159
26190
|
}
|
|
26160
26191
|
} catch (error2) {
|
|
26161
26192
|
console.warn("[RefundRequest] Error:", error2.message);
|
|
@@ -26165,7 +26196,7 @@ const CoinleyPaymentInternal = ({
|
|
|
26165
26196
|
setRefundRequestMessage(error2.message || "Failed to submit refund request. Please try again.");
|
|
26166
26197
|
});
|
|
26167
26198
|
}
|
|
26168
|
-
}, [activeTransferPaymentId, captureRefundSuccessDetails, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, clearUnderpaymentRecovery, config, finishRecoveryLoading, refundAddress, refundRequestStatus, paymentFlow.api, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol,
|
|
26199
|
+
}, [activeTransferPaymentId, captureRefundSuccessDetails, ccOriginChainId, ccOriginToken == null ? void 0 : ccOriginToken.symbol, clearUnderpaymentRecovery, config, finishRecoveryLoading, getRefundPendingStatus, holdRecoveryLoading, refundAddress, refundRequestStatus, paymentFlow.api, selectedNetwork == null ? void 0 : selectedNetwork.shortName, selectedToken == null ? void 0 : selectedToken.symbol, startRecoveryLoading, underpaymentInfo]);
|
|
26169
26200
|
const handleDepositManualCheck = useCallback(async () => {
|
|
26170
26201
|
if (manualCheckStatus === "checking" || !(paymentData == null ? void 0 : paymentData.id)) return;
|
|
26171
26202
|
const isOffsetRecovery = Boolean(underpaymentInfo && underpaymentView === "offset");
|
|
@@ -26199,13 +26230,8 @@ const CoinleyPaymentInternal = ({
|
|
|
26199
26230
|
}
|
|
26200
26231
|
if (activateUnderpaymentFlow(statusResult.payment)) {
|
|
26201
26232
|
if (isOffsetRecovery) {
|
|
26202
|
-
|
|
26203
|
-
|
|
26204
|
-
showTransferNoticeModal("We have not detected your offset yet. It can take a few moments to appear on-chain, and we will keep checking automatically.");
|
|
26205
|
-
manualCheckTimeout.current = setTimeout(() => {
|
|
26206
|
-
setManualCheckStatus(null);
|
|
26207
|
-
}, 1e4);
|
|
26208
|
-
});
|
|
26233
|
+
setManualCheckStatus("not_found");
|
|
26234
|
+
holdRecoveryLoading("offset", getOffsetWaitingStatus());
|
|
26209
26235
|
}
|
|
26210
26236
|
return;
|
|
26211
26237
|
}
|
|
@@ -26222,22 +26248,19 @@ const CoinleyPaymentInternal = ({
|
|
|
26222
26248
|
const balanceResult = await paymentFlow.api.getDepositBalance(paymentData.id);
|
|
26223
26249
|
if ((balanceResult == null ? void 0 : balanceResult.success) && activateUnderpaymentFromDepositBalance(balanceResult)) {
|
|
26224
26250
|
if (isOffsetRecovery) {
|
|
26225
|
-
|
|
26226
|
-
|
|
26227
|
-
showTransferNoticeModal("We have not detected your offset yet. It can take a few moments to appear on-chain, and we will keep checking automatically.");
|
|
26228
|
-
manualCheckTimeout.current = setTimeout(() => {
|
|
26229
|
-
setManualCheckStatus(null);
|
|
26230
|
-
}, 1e4);
|
|
26231
|
-
});
|
|
26251
|
+
setManualCheckStatus("not_found");
|
|
26252
|
+
holdRecoveryLoading("offset", getOffsetWaitingStatus());
|
|
26232
26253
|
}
|
|
26233
26254
|
return;
|
|
26234
26255
|
}
|
|
26235
26256
|
}
|
|
26236
26257
|
finishRecoveryLoading(() => {
|
|
26237
26258
|
setManualCheckStatus("not_found");
|
|
26238
|
-
|
|
26239
|
-
|
|
26240
|
-
|
|
26259
|
+
if (isOffsetRecovery) {
|
|
26260
|
+
setRecoveryLoadingAction("offset");
|
|
26261
|
+
setRecoveryLoadingStatus({ action: "offset", ...getOffsetWaitingStatus() });
|
|
26262
|
+
return;
|
|
26263
|
+
}
|
|
26241
26264
|
manualCheckTimeout.current = setTimeout(() => {
|
|
26242
26265
|
setManualCheckStatus(null);
|
|
26243
26266
|
}, 1e4);
|
|
@@ -26246,15 +26269,17 @@ const CoinleyPaymentInternal = ({
|
|
|
26246
26269
|
console.warn("[ManualCheck] Error:", error2.message);
|
|
26247
26270
|
finishRecoveryLoading(() => {
|
|
26248
26271
|
setManualCheckStatus("not_found");
|
|
26249
|
-
|
|
26250
|
-
|
|
26251
|
-
|
|
26272
|
+
if (isOffsetRecovery) {
|
|
26273
|
+
setRecoveryLoadingAction("offset");
|
|
26274
|
+
setRecoveryLoadingStatus({ action: "offset", ...getOffsetWaitingStatus() });
|
|
26275
|
+
return;
|
|
26276
|
+
}
|
|
26252
26277
|
manualCheckTimeout.current = setTimeout(() => {
|
|
26253
26278
|
setManualCheckStatus(null);
|
|
26254
26279
|
}, 1e4);
|
|
26255
26280
|
});
|
|
26256
26281
|
}
|
|
26257
|
-
}, [manualCheckStatus, paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, paymentFlow.api, config == null ? void 0 : config.amount, selectedNetwork, selectedToken, onSuccess, underpaymentInfo, underpaymentView, activateUnderpaymentFlow, activateUnderpaymentFromDepositBalance, captureOffsetSuccessDetails, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash, finishRecoveryLoading,
|
|
26282
|
+
}, [manualCheckStatus, paymentData == null ? void 0 : paymentData.id, paymentData == null ? void 0 : paymentData.depositAddress, paymentFlow.api, config == null ? void 0 : config.amount, selectedNetwork, selectedToken, onSuccess, underpaymentInfo, underpaymentView, activateUnderpaymentFlow, activateUnderpaymentFromDepositBalance, captureOffsetSuccessDetails, clearUnderpaymentRecovery, resolvePaymentTransactionHash, persistSuccessfulPaymentHash, finishRecoveryLoading, getOffsetWaitingStatus, holdRecoveryLoading]);
|
|
26258
26283
|
const truncateAddress = (addr) => {
|
|
26259
26284
|
if (!addr) return "";
|
|
26260
26285
|
return `${addr.slice(0, 4)}......${addr.slice(-4)}`;
|
|
@@ -26633,9 +26658,9 @@ const CoinleyPaymentInternal = ({
|
|
|
26633
26658
|
] })
|
|
26634
26659
|
] });
|
|
26635
26660
|
const renderUnderpaymentOffsetPanel = () => recoveryLoadingAction === "offset" ? renderRecoveryLoadingPanel({
|
|
26636
|
-
title: "Checking your offset",
|
|
26637
|
-
description: "We are checking the blockchain for your offset payment. This usually takes a few seconds.",
|
|
26638
|
-
detail: `Waiting for the remaining ${underpaymentOffsetAmountLabel} on ${underpaymentInfo.refundNetworkLabel || getOffsetSuccessNetworkName(selectedNetwork)}.`
|
|
26661
|
+
title: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.title : "Checking your offset",
|
|
26662
|
+
description: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.description : "We are checking the blockchain for your offset payment. This usually takes a few seconds.",
|
|
26663
|
+
detail: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "offset" ? recoveryLoadingStatus.detail : `Waiting for the remaining ${underpaymentOffsetAmountLabel} on ${underpaymentInfo.refundNetworkLabel || getOffsetSuccessNetworkName(selectedNetwork)}.`
|
|
26639
26664
|
}) : /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26640
26665
|
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-start gap-3", children: [
|
|
26641
26666
|
/* @__PURE__ */ jsx("div", { className: "h-[92px] w-[92px] flex-shrink-0 bg-white", children: (ccResult ? ccQrCode : depositQrCode) ? /* @__PURE__ */ jsx("img", { src: ccResult ? ccQrCode : depositQrCode, alt: "Deposit Address QR Code", className: "h-full w-full" }) : /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center rounded-lg bg-gray-100", children: /* @__PURE__ */ jsx("img", { src: stablezactLoading, alt: "Loading QR code", className: "h-14 w-16 object-contain" }) }) }),
|
|
@@ -26661,9 +26686,9 @@ const CoinleyPaymentInternal = ({
|
|
|
26661
26686
|
)
|
|
26662
26687
|
] });
|
|
26663
26688
|
const renderUnderpaymentRefundPanel = () => recoveryLoadingAction === "refund" ? renderRecoveryLoadingPanel({
|
|
26664
|
-
title: "Preparing your refund",
|
|
26665
|
-
description: "We are submitting your refund request and checking whether it can be sent immediately.",
|
|
26666
|
-
detail: `Refunding the received ${underpaymentInfo.tokenSymbol} on ${underpaymentInfo.refundNetworkLabel}.`
|
|
26689
|
+
title: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "refund" ? recoveryLoadingStatus.title : "Preparing your refund",
|
|
26690
|
+
description: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "refund" ? recoveryLoadingStatus.description : "We are submitting your refund request and checking whether it can be sent immediately.",
|
|
26691
|
+
detail: (recoveryLoadingStatus == null ? void 0 : recoveryLoadingStatus.action) === "refund" ? recoveryLoadingStatus.detail : `Refunding the received ${underpaymentInfo.tokenSymbol} on ${underpaymentInfo.refundNetworkLabel}.`
|
|
26667
26692
|
}) : /* @__PURE__ */ jsxs("div", { className: "pt-1", children: [
|
|
26668
26693
|
renderUnderpaymentWarning(
|
|
26669
26694
|
`Refund of $${formatAmount(underpaymentInfo.receivedAmount || 0)} ${underpaymentInfo.tokenSymbol}`,
|
|
@@ -27374,23 +27399,6 @@ const CoinleyPaymentInternal = ({
|
|
|
27374
27399
|
/* @__PURE__ */ jsx("p", { className: `${isTightWalletView ? "mt-1" : isCompactCheckoutView ? "mt-2" : "mt-3"} text-xs text-[#A9ABB2]`, children: "Powered by Stablezact" })
|
|
27375
27400
|
] });
|
|
27376
27401
|
};
|
|
27377
|
-
const renderTransferNoticeModal = () => {
|
|
27378
|
-
if (!transferNoticeModal) return null;
|
|
27379
|
-
return /* @__PURE__ */ jsx("div", { className: "fixed inset-0 z-[70] flex items-center justify-center bg-black/45 px-4", children: /* @__PURE__ */ jsxs("div", { className: "w-full max-w-[340px] rounded-2xl bg-white p-5 text-center shadow-2xl", children: [
|
|
27380
|
-
/* @__PURE__ */ jsx("div", { className: "mx-auto mb-3 flex h-11 w-11 items-center justify-center rounded-full bg-amber-50 text-amber-600", children: /* @__PURE__ */ jsx("svg", { className: "h-6 w-6", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 9v4m0 4h.01M12 3a9 9 0 110 18 9 9 0 010-18z" }) }) }),
|
|
27381
|
-
/* @__PURE__ */ jsx("h3", { className: "mb-2 text-base font-semibold text-[#111827]", children: transferNoticeModal.title }),
|
|
27382
|
-
/* @__PURE__ */ jsx("p", { className: "mb-5 text-sm leading-5 text-[#6B7280]", children: transferNoticeModal.message }),
|
|
27383
|
-
/* @__PURE__ */ jsx(
|
|
27384
|
-
"button",
|
|
27385
|
-
{
|
|
27386
|
-
type: "button",
|
|
27387
|
-
onClick: () => setTransferNoticeModal(null),
|
|
27388
|
-
className: "h-11 w-full rounded-xl bg-[#7042D2] px-4 text-sm font-semibold text-white transition-colors hover:bg-[#5b34b1]",
|
|
27389
|
-
children: "Got it"
|
|
27390
|
-
}
|
|
27391
|
-
)
|
|
27392
|
-
] }) });
|
|
27393
|
-
};
|
|
27394
27402
|
const renderTabContent = () => {
|
|
27395
27403
|
var _a2, _b, _c, _d;
|
|
27396
27404
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
@@ -27804,6 +27812,7 @@ const CoinleyPaymentInternal = ({
|
|
|
27804
27812
|
const isQrPaymentActiveView = activeTab === PAYMENT_TABS.QR && qrWalletChoiceConfirmed;
|
|
27805
27813
|
const handleTransferAddressBack = async () => {
|
|
27806
27814
|
setRecoveryLoadingAction(null);
|
|
27815
|
+
setRecoveryLoadingStatus(null);
|
|
27807
27816
|
if (underpaymentInfo && underpaymentView !== "choice") {
|
|
27808
27817
|
setUnderpaymentView("choice");
|
|
27809
27818
|
return;
|
|
@@ -27897,8 +27906,7 @@ const CoinleyPaymentInternal = ({
|
|
|
27897
27906
|
/* @__PURE__ */ jsx("div", { className: `min-h-0 flex-1 ${isCheckoutDropdownOpen ? "overflow-visible" : "overflow-y-auto coinley-scroll"} pb-1`, children: renderTabContent() }),
|
|
27898
27907
|
renderCheckoutFooter()
|
|
27899
27908
|
] })
|
|
27900
|
-
] }) })
|
|
27901
|
-
renderTransferNoticeModal()
|
|
27909
|
+
] }) })
|
|
27902
27910
|
] });
|
|
27903
27911
|
};
|
|
27904
27912
|
const CoinleyPayment = (props) => {
|
|
@@ -27934,4 +27942,4 @@ export {
|
|
|
27934
27942
|
chainTransports as c,
|
|
27935
27943
|
isFeatureEnabled as i
|
|
27936
27944
|
};
|
|
27937
|
-
//# sourceMappingURL=CoinleyPayment-
|
|
27945
|
+
//# sourceMappingURL=CoinleyPayment-BZZKQO96.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { i as isFeatureEnabled, F as FEATURES, c as chainTransports, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BZZKQO96.js";
|
|
2
2
|
const logo = "https://coinley.io/logo.png";
|
|
3
3
|
let appKitInstance = null;
|
|
4
4
|
let isInitializing = false;
|
|
@@ -113,4 +113,4 @@ export {
|
|
|
113
113
|
initializeAppKitEVM,
|
|
114
114
|
openAppKitModal
|
|
115
115
|
};
|
|
116
|
-
//# sourceMappingURL=appKitEVM-
|
|
116
|
+
//# sourceMappingURL=appKitEVM-zLHXb4kV.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-
|
|
1
|
+
import { F as FEATURES, W as WALLETCONNECT_PROJECT_ID } from "./CoinleyPayment-BZZKQO96.js";
|
|
2
2
|
const logo = "https://coinley.io/logo.png";
|
|
3
3
|
let appKitInstance = null;
|
|
4
4
|
let isInitializing = false;
|
|
@@ -243,4 +243,4 @@ export {
|
|
|
243
243
|
disconnectWalletConnect,
|
|
244
244
|
initializeAppKitSolana
|
|
245
245
|
};
|
|
246
|
-
//# sourceMappingURL=appKitSolana-
|
|
246
|
+
//# sourceMappingURL=appKitSolana-CcEv9c6h.js.map
|