@tender-cash/agent-sdk-react 0.2.2 → 0.3.1-beta.3

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.
@@ -19,5 +19,6 @@ declare const fetchPaymentDetailAction: ({ nextScreen, setPageLoading }: {
19
19
  } | undefined;
20
20
  confirmPayment: () => void | Promise<void>;
21
21
  cancelPayment: () => void | Promise<void>;
22
+ expirePayment: () => void | Promise<void>;
22
23
  };
23
24
  export default fetchPaymentDetailAction;
@@ -15,6 +15,7 @@ declare const useAgentSdkAction: () => {
15
15
  paymentData: IPaymentData & {
16
16
  cancelPayment: () => void;
17
17
  confirmPayment: () => void;
18
+ expirePayment: () => void;
18
19
  disabled: boolean;
19
20
  loading: boolean;
20
21
  };
@@ -1,4 +1,9 @@
1
+ import { ReactNode } from 'react';
1
2
  import { FormFooterProps, FormHeaderProps } from '../types';
2
- declare const FormFooter: ({ children }: FormFooterProps) => import("react/jsx-runtime").JSX.Element;
3
- declare const FormHeader: ({ title, description, icon }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
4
- export { FormFooter, FormHeader };
3
+ declare const FormFooter: ({ children, className }: FormFooterProps) => import("react/jsx-runtime").JSX.Element;
4
+ declare const FormHeader: ({ title, description, icon, className, }: FormHeaderProps) => import("react/jsx-runtime").JSX.Element;
5
+ declare const FormBody: ({ children, className, }: {
6
+ children: ReactNode;
7
+ className?: string;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export { FormFooter, FormHeader, FormBody };
@@ -1,3 +1,3 @@
1
1
  import { TenderAgentProps } from './types';
2
- declare const TenderAgentSdk: ({ referenceId, amount, accessId, accessSecret, env, fiatCurrency, onEventResponse }: TenderAgentProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const TenderAgentSdk: ({ referenceId, amount, accessId, accessSecret, env, fiatCurrency, paymentExpirySeconds, onEventResponse }: TenderAgentProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default TenderAgentSdk;
@@ -1,3 +1,3 @@
1
1
  import { paymentResponseProps, paymentDetailsProps } from '../types';
2
- declare const PaymentDetails: ({ address, amount, amountPaid, coin, loading, status, balance, excess, cancelPayment, confirmPayment, }: paymentResponseProps & paymentDetailsProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const PaymentDetails: ({ address, amount, amountPaid, coin, chain, loading, status, balance, excess, cancelPayment, confirmPayment, expirePayment, coinIcon, chainIcon, }: paymentResponseProps & paymentDetailsProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default PaymentDetails;
@@ -12,5 +12,5 @@ interface paymentFormProps {
12
12
  selectNetwork: (value: Option) => void;
13
13
  submitForm: () => void;
14
14
  }
15
- declare const PaymentForm: ({ amount, fiatCurrency, networks, selectedNetwork, selectedCoin, coins, formDisabled, formLoading, selectCoin, selectNetwork, submitForm }: paymentFormProps) => import("react/jsx-runtime").JSX.Element;
15
+ declare const PaymentForm: ({ amount, fiatCurrency, networks, selectedNetwork, selectedCoin, coins, formDisabled, formLoading, selectCoin, selectNetwork, submitForm, }: paymentFormProps) => import("react/jsx-runtime").JSX.Element;
16
16
  export default PaymentForm;
@@ -44,9 +44,11 @@ interface FormHeaderProps {
44
44
  title: string;
45
45
  description: string;
46
46
  icon?: string;
47
+ className?: string;
47
48
  }
48
49
  interface FormFooterProps {
49
50
  children: ReactNode;
51
+ className?: string;
50
52
  }
51
53
  interface IPaymentData {
52
54
  id?: string;
@@ -65,10 +67,13 @@ interface paymentResponseProps {
65
67
  amount: number;
66
68
  amountPaid: number;
67
69
  coin: string;
70
+ chain: string;
68
71
  loading: boolean;
69
72
  status?: PaymentStatusProps;
70
73
  balance?: string;
71
74
  excess?: string;
75
+ coinIcon?: string;
76
+ chainIcon?: string;
72
77
  }
73
78
  declare enum PAYMENT_RESPONSES {
74
79
  partial = "Please complete the remaining payment to finalize this transaction. If the full amount is not received within 24 hours, the transaction will be canceled. For a refund, please contact the Merchant.",
@@ -89,6 +94,7 @@ declare const PAYMENT_ICONS: {
89
94
  interface paymentDetailsProps {
90
95
  cancelPayment: () => void;
91
96
  confirmPayment: () => void;
97
+ expirePayment: () => void;
92
98
  }
93
99
  declare enum PAYMENT_STAGE {
94
100
  FORM = 1,
@@ -158,6 +164,7 @@ interface ConfigContextType {
158
164
  fiatCurrency: string;
159
165
  env: TenderEnvironments;
160
166
  confirmationInterval?: number;
167
+ paymentExpirySeconds?: number;
161
168
  theme?: "light" | "dark";
162
169
  onEventResponse?: (data: onFinishResponse) => void;
163
170
  }
@@ -168,6 +175,7 @@ interface TenderAgentProps {
168
175
  accessId: string;
169
176
  accessSecret: string;
170
177
  env: TenderEnvironments;
178
+ paymentExpirySeconds?: number;
171
179
  onEventResponse?: (data: onFinishResponse) => void;
172
180
  }
173
181
  interface PaymentChain {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tender-cash/agent-sdk-react",
3
3
  "license": "MIT",
4
- "version": "0.2.2",
4
+ "version": "0.3.1-beta.3",
5
5
  "repository": "git://github.com/tender-cash/agent-sdk-react.git",
6
6
  "description": "",
7
7
  "author": "Tender",