@voyage_ai/v402-web-ts 0.1.3 → 0.1.4
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/react/index.d.mts
CHANGED
|
@@ -246,13 +246,13 @@ interface HeaderInfo {
|
|
|
246
246
|
tooltipText?: string;
|
|
247
247
|
}
|
|
248
248
|
interface V402CheckoutProps {
|
|
249
|
-
|
|
249
|
+
checkoutId: string;
|
|
250
250
|
headerInfo?: HeaderInfo;
|
|
251
251
|
isModal?: boolean;
|
|
252
252
|
onPaymentComplete?: (response: any) => void;
|
|
253
253
|
additionalParams?: Record<string, any>;
|
|
254
254
|
expectedNetwork?: NetworkType;
|
|
255
255
|
}
|
|
256
|
-
declare function V402Checkout({
|
|
256
|
+
declare function V402Checkout({ checkoutId, headerInfo, isModal, onPaymentComplete, additionalParams, expectedNetwork, }: V402CheckoutProps): React.JSX.Element;
|
|
257
257
|
|
|
258
258
|
export { type UsePageNetworkOptions, type UsePaymentInfoReturn, type UsePaymentReturn, type UseWalletReturn, V402Checkout, type V402CheckoutProps, WalletConnect, type WalletConnectProps, usePageNetwork, usePayment, usePaymentInfo, useWallet };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -246,13 +246,13 @@ interface HeaderInfo {
|
|
|
246
246
|
tooltipText?: string;
|
|
247
247
|
}
|
|
248
248
|
interface V402CheckoutProps {
|
|
249
|
-
|
|
249
|
+
checkoutId: string;
|
|
250
250
|
headerInfo?: HeaderInfo;
|
|
251
251
|
isModal?: boolean;
|
|
252
252
|
onPaymentComplete?: (response: any) => void;
|
|
253
253
|
additionalParams?: Record<string, any>;
|
|
254
254
|
expectedNetwork?: NetworkType;
|
|
255
255
|
}
|
|
256
|
-
declare function V402Checkout({
|
|
256
|
+
declare function V402Checkout({ checkoutId, headerInfo, isModal, onPaymentComplete, additionalParams, expectedNetwork, }: V402CheckoutProps): React.JSX.Element;
|
|
257
257
|
|
|
258
258
|
export { type UsePageNetworkOptions, type UsePaymentInfoReturn, type UsePaymentReturn, type UseWalletReturn, V402Checkout, type V402CheckoutProps, WalletConnect, type WalletConnectProps, usePageNetwork, usePayment, usePaymentInfo, useWallet };
|
package/dist/react/index.js
CHANGED
|
@@ -1756,7 +1756,7 @@ var notify = {
|
|
|
1756
1756
|
}
|
|
1757
1757
|
};
|
|
1758
1758
|
function V402Checkout({
|
|
1759
|
-
|
|
1759
|
+
checkoutId,
|
|
1760
1760
|
headerInfo = {},
|
|
1761
1761
|
isModal = false,
|
|
1762
1762
|
onPaymentComplete,
|
|
@@ -1773,7 +1773,7 @@ function V402Checkout({
|
|
|
1773
1773
|
supportedNetworks,
|
|
1774
1774
|
isLoading: fetchingPaymentInfo,
|
|
1775
1775
|
paymentInfo
|
|
1776
|
-
} = usePaymentInfo(
|
|
1776
|
+
} = usePaymentInfo(checkoutId, endpoint, additionalParams);
|
|
1777
1777
|
const targetNetwork = expectedNetwork || supportedNetworks[0];
|
|
1778
1778
|
const { address, networkType, disconnect, ensureNetwork } = usePageNetwork(
|
|
1779
1779
|
targetNetwork,
|
|
@@ -1818,7 +1818,7 @@ function V402Checkout({
|
|
|
1818
1818
|
setError(null);
|
|
1819
1819
|
setIsProcessing(true);
|
|
1820
1820
|
try {
|
|
1821
|
-
const response = await makePayment(networkType,
|
|
1821
|
+
const response = await makePayment(networkType, checkoutId, endpoint, additionalParams);
|
|
1822
1822
|
const data = await response.json();
|
|
1823
1823
|
setResult(data);
|
|
1824
1824
|
notify.success("Payment Successful!", "Your payment has been processed successfully.");
|