@ton-pay/ui-react 0.2.0-beta.2 → 0.2.0-beta.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/index.d.mts CHANGED
@@ -19,7 +19,7 @@ type PayInfo<T extends object = object> = {
19
19
  txResult: SendTransactionResponse;
20
20
  } & T;
21
21
  interface TonPayButtonProps {
22
- handlePay: () => Promise<void>;
22
+ handlePay: (onRequestSent?: (redirectToWallet: () => void) => void) => Promise<void>;
23
23
  isLoading?: boolean;
24
24
  variant?: TonPayVariant;
25
25
  preset?: TonPayPreset;
@@ -63,6 +63,7 @@ interface PaymentModalProps {
63
63
  fetchOnRampLink?: (providerId: string) => Promise<string>;
64
64
  onRampAvailable?: boolean;
65
65
  onPaymentSuccess?: () => void;
66
+ isLoading?: boolean;
66
67
  }
67
68
  type PaymentViewState = "main" | "card" | "success" | "error";
68
69
  interface BottomSheetProps {
@@ -105,7 +106,9 @@ interface ErrorTransactionNotificationProps {
105
106
  declare const ErrorTransactionNotification: React.FC<ErrorTransactionNotificationProps>;
106
107
 
107
108
  declare function useTonPay(): {
108
- pay: <T extends object = object>(getMessage: GetMessageFn<T>) => Promise<PayInfo<T>>;
109
+ pay: <T extends object = object>(getMessage: GetMessageFn<T>, options?: {
110
+ onRequestSent?: (redirectToWallet: () => void) => void;
111
+ }) => Promise<PayInfo<T>>;
109
112
  address: string;
110
113
  };
111
114
 
package/dist/index.d.ts CHANGED
@@ -19,7 +19,7 @@ type PayInfo<T extends object = object> = {
19
19
  txResult: SendTransactionResponse;
20
20
  } & T;
21
21
  interface TonPayButtonProps {
22
- handlePay: () => Promise<void>;
22
+ handlePay: (onRequestSent?: (redirectToWallet: () => void) => void) => Promise<void>;
23
23
  isLoading?: boolean;
24
24
  variant?: TonPayVariant;
25
25
  preset?: TonPayPreset;
@@ -63,6 +63,7 @@ interface PaymentModalProps {
63
63
  fetchOnRampLink?: (providerId: string) => Promise<string>;
64
64
  onRampAvailable?: boolean;
65
65
  onPaymentSuccess?: () => void;
66
+ isLoading?: boolean;
66
67
  }
67
68
  type PaymentViewState = "main" | "card" | "success" | "error";
68
69
  interface BottomSheetProps {
@@ -105,7 +106,9 @@ interface ErrorTransactionNotificationProps {
105
106
  declare const ErrorTransactionNotification: React.FC<ErrorTransactionNotificationProps>;
106
107
 
107
108
  declare function useTonPay(): {
108
- pay: <T extends object = object>(getMessage: GetMessageFn<T>) => Promise<PayInfo<T>>;
109
+ pay: <T extends object = object>(getMessage: GetMessageFn<T>, options?: {
110
+ onRequestSent?: (redirectToWallet: () => void) => void;
111
+ }) => Promise<PayInfo<T>>;
109
112
  address: string;
110
113
  };
111
114