@volr/react 0.1.106 → 0.1.107

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.cts CHANGED
@@ -809,8 +809,10 @@ interface PaymentItem {
809
809
  image?: string;
810
810
  }
811
811
  interface PayOptions {
812
- /** Amount in token units (before decimals applied) */
812
+ /** Amount in token units (before decimals applied) - same amount applies to all tokens */
813
813
  amount: number;
814
+ /** Token ID to use for payment (if not provided, user selects in modal) */
815
+ tokenId?: string;
814
816
  /** Item information to display in payment modal */
815
817
  item?: PaymentItem;
816
818
  /** Client-side order/reference ID */
@@ -846,6 +848,8 @@ interface PaymentToken {
846
848
  symbol: string;
847
849
  chainId: number;
848
850
  decimals: number;
851
+ address: string;
852
+ iconUrl?: string | null;
849
853
  }
850
854
  interface PaymentResult {
851
855
  id: string;
@@ -916,8 +920,11 @@ interface PaymentContext {
916
920
  interface UseVolrPaymentApiReturn {
917
921
  /**
918
922
  * Create a payment via API
923
+ * @param options Payment options including required tokenId
919
924
  */
920
- createPayment: (options: PayOptions) => Promise<PaymentResult>;
925
+ createPayment: (options: PayOptions & {
926
+ tokenId: string;
927
+ }) => Promise<PaymentResult>;
921
928
  /**
922
929
  * Check payment status by ID
923
930
  */
package/dist/index.d.ts CHANGED
@@ -809,8 +809,10 @@ interface PaymentItem {
809
809
  image?: string;
810
810
  }
811
811
  interface PayOptions {
812
- /** Amount in token units (before decimals applied) */
812
+ /** Amount in token units (before decimals applied) - same amount applies to all tokens */
813
813
  amount: number;
814
+ /** Token ID to use for payment (if not provided, user selects in modal) */
815
+ tokenId?: string;
814
816
  /** Item information to display in payment modal */
815
817
  item?: PaymentItem;
816
818
  /** Client-side order/reference ID */
@@ -846,6 +848,8 @@ interface PaymentToken {
846
848
  symbol: string;
847
849
  chainId: number;
848
850
  decimals: number;
851
+ address: string;
852
+ iconUrl?: string | null;
849
853
  }
850
854
  interface PaymentResult {
851
855
  id: string;
@@ -916,8 +920,11 @@ interface PaymentContext {
916
920
  interface UseVolrPaymentApiReturn {
917
921
  /**
918
922
  * Create a payment via API
923
+ * @param options Payment options including required tokenId
919
924
  */
920
- createPayment: (options: PayOptions) => Promise<PaymentResult>;
925
+ createPayment: (options: PayOptions & {
926
+ tokenId: string;
927
+ }) => Promise<PaymentResult>;
921
928
  /**
922
929
  * Check payment status by ID
923
930
  */
package/dist/index.js CHANGED
@@ -19639,6 +19639,7 @@ function useVolrPaymentApi() {
19639
19639
  setIsLoading(true);
19640
19640
  try {
19641
19641
  const response = await client.post("/payments", {
19642
+ tokenId: options.tokenId,
19642
19643
  amount: options.amount,
19643
19644
  item: options.item,
19644
19645
  referenceId: options.referenceId,