@rozoai/intent-pay 0.1.38-beta.1 → 0.1.38-beta.11
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/build/components/Common/TokenChainLogo/index.d.ts +1 -7
- package/build/components/Spinners/TokenLogoSpinner/index.d.ts +1 -6
- package/build/hooks/useDepositAddressOptions.d.ts +2 -3
- package/build/hooks/usePaymentState.d.ts +5 -11
- package/build/hooks/useRozoPay.d.ts +4 -4
- package/build/hooks/useSolanaPaymentOptions.d.ts +1 -1
- package/build/hooks/useStellarPaymentOptions.d.ts +1 -1
- package/build/hooks/useWalletPaymentOptions.d.ts +7 -12
- package/build/package.json.js +2 -2
- package/build/payment/createPaymentPayload.d.ts +3 -3
- package/build/payment/paymentFsm.d.ts +2 -25
- package/build/provider/PayContext.d.ts +5 -3
- package/build/provider/RozoPayProvider.d.ts +91 -12
- package/build/provider/StellarContextProvider.d.ts +8 -0
- package/build/src/components/Common/AmountInput/index.js +2 -2
- package/build/src/components/Common/AmountInput/index.js.map +1 -1
- package/build/src/components/Common/ConnectorList/index.js +4 -2
- package/build/src/components/Common/ConnectorList/index.js.map +1 -1
- package/build/src/components/Common/OptionsList/styles.js +5 -5
- package/build/src/components/Common/OptionsList/styles.js.map +1 -1
- package/build/src/components/Common/OrderHeader/index.js +32 -16
- package/build/src/components/Common/OrderHeader/index.js.map +1 -1
- package/build/src/components/Common/TokenChainLogo/index.js +3 -26
- package/build/src/components/Common/TokenChainLogo/index.js.map +1 -1
- package/build/src/components/Pages/MobileConnectors/index.js +10 -4
- package/build/src/components/Pages/MobileConnectors/index.js.map +1 -1
- package/build/src/components/Pages/PayWithToken/index.js +4 -15
- package/build/src/components/Pages/PayWithToken/index.js.map +1 -1
- package/build/src/components/Pages/SelectDepositAddressChain/index.js +17 -6
- package/build/src/components/Pages/SelectDepositAddressChain/index.js.map +1 -1
- package/build/src/components/Pages/SelectMethod/index.js +6 -2
- package/build/src/components/Pages/SelectMethod/index.js.map +1 -1
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js +26 -64
- package/build/src/components/Pages/Solana/PayWithSolanaToken/index.js.map +1 -1
- package/build/src/components/Pages/Stellar/ConnectStellar/index.js +114 -67
- package/build/src/components/Pages/Stellar/ConnectStellar/index.js.map +1 -1
- package/build/src/components/Pages/Stellar/ConnectorStellar/index.js +6 -1
- package/build/src/components/Pages/Stellar/ConnectorStellar/index.js.map +1 -1
- package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js +46 -40
- package/build/src/components/Pages/Stellar/PayWithStellarToken/index.js.map +1 -1
- package/build/src/components/Pages/WaitingDepositAddress/index.js +33 -110
- package/build/src/components/Pages/WaitingDepositAddress/index.js.map +1 -1
- package/build/src/components/RozoPayButton/index.js +45 -18
- package/build/src/components/RozoPayButton/index.js.map +1 -1
- package/build/src/components/RozoPayModal/index.js +67 -11
- package/build/src/components/RozoPayModal/index.js.map +1 -1
- package/build/src/components/Spinners/TokenLogoSpinner/index.js +2 -5
- package/build/src/components/Spinners/TokenLogoSpinner/index.js.map +1 -1
- package/build/src/defaultConnectors.js +5 -2
- package/build/src/defaultConnectors.js.map +1 -1
- package/build/src/hooks/useAutoConnectGate.js +7 -3
- package/build/src/hooks/useAutoConnectGate.js.map +1 -1
- package/build/src/hooks/useDepositAddressOptions.js +9 -19
- package/build/src/hooks/useDepositAddressOptions.js.map +1 -1
- package/build/src/hooks/useExternalPaymentOptions.js +1 -1
- package/build/src/hooks/usePaymentState.js +72 -193
- package/build/src/hooks/usePaymentState.js.map +1 -1
- package/build/src/hooks/useRozoPay.js +2 -4
- package/build/src/hooks/useRozoPay.js.map +1 -1
- package/build/src/hooks/useSolanaPaymentOptions.js +13 -45
- package/build/src/hooks/useSolanaPaymentOptions.js.map +1 -1
- package/build/src/hooks/useStellarPaymentOptions.js +11 -40
- package/build/src/hooks/useStellarPaymentOptions.js.map +1 -1
- package/build/src/hooks/useTokenOptions.js +3 -4
- package/build/src/hooks/useTokenOptions.js.map +1 -1
- package/build/src/hooks/useWalletPaymentOptions.js +22 -54
- package/build/src/hooks/useWalletPaymentOptions.js.map +1 -1
- package/build/src/payment/createPaymentPayload.js +72 -42
- package/build/src/payment/createPaymentPayload.js.map +1 -1
- package/build/src/payment/paymentEffects.js +8 -120
- package/build/src/payment/paymentEffects.js.map +1 -1
- package/build/src/payment/paymentFsm.js.map +1 -1
- package/build/src/provider/AnalyticsProvider.js +16 -3
- package/build/src/provider/AnalyticsProvider.js.map +1 -1
- package/build/src/provider/RozoPayProvider.js +6 -0
- package/build/src/provider/RozoPayProvider.js.map +1 -1
- package/build/src/provider/StellarContextProvider.js +44 -2
- package/build/src/provider/StellarContextProvider.js.map +1 -1
- package/build/src/types/chainAddress.js +11 -3
- package/build/src/types/chainAddress.js.map +1 -1
- package/build/src/utils/format.js +41 -84
- package/build/src/utils/format.js.map +1 -1
- package/build/src/utils/localstorage.js +14 -1
- package/build/src/utils/localstorage.js.map +1 -1
- package/build/src/utils/stellar/walletconnect.module.js +115 -17
- package/build/src/utils/stellar/walletconnect.module.js.map +1 -1
- package/build/src/utils/token.js +5 -21
- package/build/src/utils/token.js.map +1 -1
- package/build/src/wallets/walletConfigs.js +1 -1
- package/build/src/wallets/walletConfigs.js.map +1 -1
- package/build/utils/format.d.ts +19 -45
- package/build/utils/localstorage.d.ts +1 -1
- package/build/utils/stellar/walletconnect.module.d.ts +12 -0
- package/build/utils/token.d.ts +2 -6
- package/package.json +2 -2
- package/build/src/utils/wallets.js +0 -12
- package/build/src/utils/wallets.js.map +0 -1
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { Token } from "@rozoai/intent-common";
|
|
2
|
-
declare const TokenChainLogo: ({ token, size, offset,
|
|
2
|
+
declare const TokenChainLogo: ({ token, size, offset, }: {
|
|
3
3
|
token: Token;
|
|
4
4
|
size?: number;
|
|
5
5
|
offset?: number;
|
|
6
|
-
/**
|
|
7
|
-
* When true, render the chain icon as the main logo for native tokens
|
|
8
|
-
* (ETH/BNB/POL/SOL/XLM) instead of the token's logoURI. The native asset
|
|
9
|
-
* *is* the chain, so this avoids a redundant token+chain badge pairing.
|
|
10
|
-
*/
|
|
11
|
-
nativeAsChainIcon?: boolean;
|
|
12
6
|
}) => import("react").JSX.Element;
|
|
13
7
|
export default TokenChainLogo;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { RozoPayToken } from "@rozoai/intent-common";
|
|
2
|
-
declare const TokenLogoSpinner: ({ token, loading
|
|
2
|
+
declare const TokenLogoSpinner: ({ token, loading }: {
|
|
3
3
|
token: RozoPayToken;
|
|
4
4
|
loading?: boolean;
|
|
5
|
-
/**
|
|
6
|
-
* When true, use the chain icon as the main logo for native tokens
|
|
7
|
-
* (ETH/BNB/POL/SOL/XLM) instead of the token's logoURI.
|
|
8
|
-
*/
|
|
9
|
-
nativeAsChainIcon?: boolean;
|
|
10
5
|
}) => import("react").JSX.Element;
|
|
11
6
|
export default TokenLogoSpinner;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { DepositAddressPaymentOptionMetadata
|
|
1
|
+
import { DepositAddressPaymentOptionMetadata } from "@rozoai/intent-common";
|
|
2
2
|
import { PayParams } from "../payment/paymentFsm";
|
|
3
3
|
import { TrpcClient } from "../utils/trpc";
|
|
4
4
|
export interface UseDepositAddressOptionsParams {
|
|
5
5
|
trpc: TrpcClient;
|
|
6
6
|
usdRequired: number | undefined;
|
|
7
|
-
mode: RozoPayOrderMode | undefined;
|
|
8
7
|
payParams: PayParams | undefined;
|
|
9
8
|
}
|
|
10
9
|
export interface UseDepositAddressOptionsReturn {
|
|
@@ -25,4 +24,4 @@ export interface UseDepositAddressOptionsReturn {
|
|
|
25
24
|
* - Ethereum (Chain ID: 1) - Ethereum mainnet
|
|
26
25
|
* - BSC (Chain ID: 56) - Conditional support for MP app IDs
|
|
27
26
|
*/
|
|
28
|
-
export declare function useDepositAddressOptions({ trpc, usdRequired,
|
|
27
|
+
export declare function useDepositAddressOptions({ trpc, usdRequired, payParams, }: UseDepositAddressOptionsParams): UseDepositAddressOptionsReturn;
|
|
@@ -4,6 +4,7 @@ import { ApiVersion } from "@rozoai/intent-common/dist/api/base";
|
|
|
4
4
|
import { PayButtonPaymentProps } from "../components/RozoPayButton/types";
|
|
5
5
|
import { ROUTES } from "../constants/routes";
|
|
6
6
|
import { PaymentEvent, PayParams } from "../payment/paymentFsm";
|
|
7
|
+
import { Store } from "../stateStore";
|
|
7
8
|
import { TrpcClient } from "../utils/trpc";
|
|
8
9
|
import { WalletConfigProps } from "../wallets/walletConfigs";
|
|
9
10
|
import { useDepositAddressOptions } from "./useDepositAddressOptions";
|
|
@@ -54,26 +55,21 @@ export interface PaymentState {
|
|
|
54
55
|
setSelectedStellarTokenOption: (option: WalletPaymentOption | undefined) => void;
|
|
55
56
|
setSelectedDepositAddressOption: (option: DepositAddressPaymentOptionMetadata | undefined) => void;
|
|
56
57
|
setChosenUsd: (usd: number) => void;
|
|
57
|
-
payWithToken: (walletOption: WalletPaymentOption, store: {
|
|
58
|
-
dispatch: (e: PaymentEvent) => void;
|
|
59
|
-
}) => Promise<{
|
|
58
|
+
payWithToken: (walletOption: WalletPaymentOption, store: Store<PaymentState, PaymentEvent>) => Promise<{
|
|
60
59
|
txHash: Hex;
|
|
61
60
|
success: boolean;
|
|
62
61
|
}>;
|
|
63
62
|
payWithExternal: (option: ExternalPaymentOptions) => Promise<string>;
|
|
64
|
-
payWithDepositAddress: (option: DepositAddressPaymentOptionMetadata, store: {
|
|
65
|
-
dispatch: (e: PaymentEvent) => void;
|
|
66
|
-
}, fees: FeeResponseData | null, log?: (message: string) => void) => Promise<(DepositAddressPaymentOptionData & {
|
|
63
|
+
payWithDepositAddress: (option: DepositAddressPaymentOptionMetadata, store: Store<PaymentState, PaymentEvent>, fees: FeeResponseData | null, log?: (message: string) => void) => Promise<(DepositAddressPaymentOptionData & {
|
|
67
64
|
externalId: string;
|
|
68
65
|
memo: string;
|
|
69
|
-
}) | null
|
|
66
|
+
}) | null>;
|
|
70
67
|
payWithSolanaToken: (walletPaymentOption: WalletPaymentOption) => Promise<{
|
|
71
68
|
txHash: string;
|
|
72
69
|
success: boolean;
|
|
73
70
|
}>;
|
|
74
71
|
payWithSolanaTokenRozo: (walletPaymentOption: WalletPaymentOption, rozoPayment: {
|
|
75
72
|
destAddress: string;
|
|
76
|
-
sourceAmount?: string;
|
|
77
73
|
memo?: string;
|
|
78
74
|
}) => Promise<{
|
|
79
75
|
txHash: string;
|
|
@@ -102,9 +98,7 @@ export interface PaymentState {
|
|
|
102
98
|
solanaPubKey: string | undefined;
|
|
103
99
|
stellarPubKey: string | undefined;
|
|
104
100
|
orderUsdAmount: number | undefined;
|
|
105
|
-
createPayment: (option: WalletPaymentOption, store:
|
|
106
|
-
dispatch: (e: PaymentEvent) => void;
|
|
107
|
-
}) => Promise<PaymentResponse | undefined>;
|
|
101
|
+
createPayment: (option: WalletPaymentOption, store: Store<PaymentState, PaymentEvent>) => Promise<PaymentResponse | undefined>;
|
|
108
102
|
}
|
|
109
103
|
export declare function usePaymentState({ trpc, lockPayParams, setRoute, log, redirectReturnUrl, apiVersion, }: {
|
|
110
104
|
trpc: TrpcClient;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { RozoPayHydratedOrderWithOrg, RozoPayOrderID, RozoPayOrderWithOrg, SolanaPublicKey, StellarPublicKey, WalletPaymentOption } from "@rozoai/intent-common";
|
|
2
2
|
import { Address, Hex } from "viem";
|
|
3
|
-
import {
|
|
3
|
+
import { PaymentEvent, PaymentState, PayParams } from "../payment/paymentFsm";
|
|
4
4
|
import { Store } from "../stateStore";
|
|
5
5
|
type RozoPayFunctions = {
|
|
6
6
|
/**
|
|
@@ -25,14 +25,14 @@ type RozoPayFunctions = {
|
|
|
25
25
|
* Hydrate the current order, locking in the payment intent details and
|
|
26
26
|
* token swap prices.
|
|
27
27
|
*/
|
|
28
|
-
hydrateOrder: (refundAddress?: string, walletPaymentOption?: WalletPaymentOption
|
|
28
|
+
hydrateOrder: (refundAddress?: string, walletPaymentOption?: WalletPaymentOption) => Promise<Extract<PaymentState, {
|
|
29
29
|
type: "payment_unpaid";
|
|
30
30
|
}>>;
|
|
31
31
|
/**
|
|
32
32
|
* Hydrate the current order, bypassing the normal hydration process.
|
|
33
33
|
* This is used for Rozo payments.
|
|
34
34
|
*/
|
|
35
|
-
hydrateOrderRozo: (refundAddress?: string, walletPaymentOption?: WalletPaymentOption
|
|
35
|
+
hydrateOrderRozo: (refundAddress?: string, walletPaymentOption?: WalletPaymentOption) => Promise<Extract<PaymentState, {
|
|
36
36
|
type: "payment_unpaid";
|
|
37
37
|
}>>;
|
|
38
38
|
/** Trigger search for payment on the current order. */
|
|
@@ -11,5 +11,5 @@ export declare function useSolanaPaymentOptions({ trpc, address, usdRequired, is
|
|
|
11
11
|
}): {
|
|
12
12
|
options: WalletPaymentOption[];
|
|
13
13
|
isLoading: boolean;
|
|
14
|
-
refreshOptions: () => Promise<
|
|
14
|
+
refreshOptions: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<NoInfer<WalletPaymentOption[] | null>, Error>>;
|
|
15
15
|
};
|
|
@@ -11,5 +11,5 @@ export declare function useStellarPaymentOptions({ trpc, address, usdRequired, i
|
|
|
11
11
|
}): {
|
|
12
12
|
options: WalletPaymentOption[];
|
|
13
13
|
isLoading: boolean;
|
|
14
|
-
refreshOptions: () => Promise<
|
|
14
|
+
refreshOptions: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<NoInfer<WalletPaymentOption[] | null>, Error>>;
|
|
15
15
|
};
|
|
@@ -9,17 +9,12 @@ import { TrpcClient } from "../utils/trpc";
|
|
|
9
9
|
* 2. Filtering to only show currently supported chains and tokens
|
|
10
10
|
*
|
|
11
11
|
* CURRENTLY SUPPORTED CHAINS & TOKENS IN WALLET PAYMENT OPTIONS:
|
|
12
|
-
* - Base (Chain ID: 8453) -
|
|
13
|
-
* - Polygon (Chain ID: 137) -
|
|
14
|
-
* - Ethereum (Chain ID: 1) -
|
|
15
|
-
* -
|
|
16
|
-
* -
|
|
17
|
-
* -
|
|
18
|
-
* - Stellar / Rozo Stellar - XLM, USDC (native Stellar tokens)
|
|
19
|
-
*
|
|
20
|
-
* Source of truth: this list is derived from `supportedTokens` in
|
|
21
|
-
* pay-common/src/token.ts via `useSupportedChains()` — update that map,
|
|
22
|
-
* not this comment, to change what's actually shown.
|
|
12
|
+
* - Base (Chain ID: 8453) - USDC
|
|
13
|
+
* - Polygon (Chain ID: 137) - USDC
|
|
14
|
+
* - Ethereum (Chain ID: 1) - USDC
|
|
15
|
+
* - BSC (Chain ID: 56) - USDT (when MugglePay app, BSC preferred, or user has BSC USDT balance, even if disabled)
|
|
16
|
+
* - Rozo Solana - USDC (native Solana USDC)
|
|
17
|
+
* - Rozo Stellar - USDC/XLM (native Stellar tokens)
|
|
23
18
|
*
|
|
24
19
|
* Note: The SDK supports many more chains/tokens (see pay-common/src/chain.ts and token.ts)
|
|
25
20
|
* but wallet payment options are currently filtered to the above for optimal user experience.
|
|
@@ -35,5 +30,5 @@ export declare function useWalletPaymentOptions({ trpc, address, usdRequired, de
|
|
|
35
30
|
}): {
|
|
36
31
|
options: WalletPaymentOption[];
|
|
37
32
|
isLoading: boolean;
|
|
38
|
-
refreshOptions: () => Promise<
|
|
33
|
+
refreshOptions: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<NoInfer<WalletPaymentOption[] | null>, Error>>;
|
|
39
34
|
};
|
package/build/package.json.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var name = "@rozoai/intent-pay";
|
|
2
|
-
var version = "0.1.38-beta.
|
|
2
|
+
var version = "0.1.38-beta.11";
|
|
3
3
|
var description = "Seamless crypto payments. Onboard users from any chain, any coin into your app with one click.";
|
|
4
4
|
var keywords = [
|
|
5
5
|
"blockchain",
|
|
@@ -46,7 +46,7 @@ var dependencies = {
|
|
|
46
46
|
"@reown/appkit": "^1.7.0",
|
|
47
47
|
"@rollup/plugin-image": "^3.0.3",
|
|
48
48
|
"@rollup/plugin-typescript": "^12.1.2",
|
|
49
|
-
"@rozoai/intent-common": "
|
|
49
|
+
"@rozoai/intent-common": "0.1.26-beta.4",
|
|
50
50
|
"@solana/spl-memo": "^0.2.5",
|
|
51
51
|
"@solana/spl-token": "^0.4.14",
|
|
52
52
|
"@solana/wallet-adapter-base": "^0.9.27",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ApiVersion, CreateNewPaymentParams, FeeType, RozoPayHydratedOrderWithOrg, RozoPayOrderWithOrg } from "@rozoai/intent-common";
|
|
2
|
-
import {
|
|
1
|
+
import { ApiVersion, CreateNewPaymentParams, FeeType, RozoPayHydratedOrderWithOrg, RozoPayOrderWithOrg, WalletPaymentOption } from "@rozoai/intent-common";
|
|
2
|
+
import { PayParams } from "./paymentFsm";
|
|
3
3
|
type OrderLike = RozoPayHydratedOrderWithOrg | RozoPayOrderWithOrg;
|
|
4
4
|
export type CreatePaymentContext = {
|
|
5
5
|
/** Original pay params from the button. */
|
|
@@ -7,7 +7,7 @@ export type CreatePaymentContext = {
|
|
|
7
7
|
/** Existing order, if any (used to derive amount/metadata in hydrate flows). */
|
|
8
8
|
order?: OrderLike;
|
|
9
9
|
/** Wallet option the user selected (required for wallet payments). */
|
|
10
|
-
walletOption?:
|
|
10
|
+
walletOption?: WalletPaymentOption;
|
|
11
11
|
/** Explicit API version (defaults to v2). */
|
|
12
12
|
apiVersion?: ApiVersion;
|
|
13
13
|
/** Override for fee type – falls back to payParams.feeType or ExactIn. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExternalPaymentOptionsString, FeeType, RozoPayHydratedOrderWithOrg, RozoPayOrder, RozoPayOrderID, RozoPayOrderWithOrg, RozoPayUserMetadata, SolanaPublicKey, StellarPublicKey, Token, TokenSymbol } from "@rozoai/intent-common";
|
|
1
|
+
import { ExternalPaymentOptionsString, FeeType, RozoPayHydratedOrderWithOrg, RozoPayOrder, RozoPayOrderID, RozoPayOrderWithOrg, RozoPayUserMetadata, SolanaPublicKey, StellarPublicKey, Token, TokenSymbol, WalletPaymentOption } from "@rozoai/intent-common";
|
|
2
2
|
import { Address, Hex } from "viem";
|
|
3
3
|
/** Payment parameters. The payment is created only after user taps pay. */
|
|
4
4
|
export interface PayParams {
|
|
@@ -76,28 +76,6 @@ export type PaymentState = {
|
|
|
76
76
|
order: RozoPayHydratedOrderWithOrg;
|
|
77
77
|
};
|
|
78
78
|
export type PaymentStateType = PaymentState["type"];
|
|
79
|
-
/**
|
|
80
|
-
* Minimal shape needed to hydrate an order.
|
|
81
|
-
*
|
|
82
|
-
* Real callers pass a full {@link WalletPaymentOption}; the deposit-address
|
|
83
|
-
* flow constructs a minimal literal from the fee response instead. We only
|
|
84
|
-
* read `required.token.*`, `required.amount`, and `fees.usd` downstream in
|
|
85
|
-
* {@link buildCreatePaymentPayload}, so this narrow shape avoids `as any`
|
|
86
|
-
* casts while staying structurally compatible with `WalletPaymentOption`.
|
|
87
|
-
*
|
|
88
|
-
* `required.amount` is relaxed to `string` (not `BigIntStr`) because the
|
|
89
|
-
* runtime tolerates decimal-formatted amounts (e.g. `"0.016885"` SOL) via
|
|
90
|
-
* `tokenBaseAmountToDecimalString`, and native-source flows produce them.
|
|
91
|
-
*/
|
|
92
|
-
export type HydrateWalletOption = {
|
|
93
|
-
required: {
|
|
94
|
-
token: Token;
|
|
95
|
-
amount: string;
|
|
96
|
-
};
|
|
97
|
-
fees: {
|
|
98
|
-
usd: number;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
79
|
export declare const initialPaymentState: PaymentState;
|
|
102
80
|
export type PaymentEvent = {
|
|
103
81
|
type: "set_pay_params";
|
|
@@ -111,8 +89,7 @@ export type PaymentEvent = {
|
|
|
111
89
|
} | {
|
|
112
90
|
type: "hydrate_order";
|
|
113
91
|
refundAddress?: Address;
|
|
114
|
-
walletPaymentOption?:
|
|
115
|
-
feeType?: FeeType;
|
|
92
|
+
walletPaymentOption?: WalletPaymentOption;
|
|
116
93
|
bypass?: boolean;
|
|
117
94
|
} | {
|
|
118
95
|
type: "pay_source";
|
|
@@ -41,11 +41,13 @@ export type PayContextValue = {
|
|
|
41
41
|
/** EVM pending connector */
|
|
42
42
|
pendingConnectorId: string | undefined;
|
|
43
43
|
setPendingConnectorId: (id: string) => void;
|
|
44
|
-
/**
|
|
45
|
-
*
|
|
46
|
-
*
|
|
44
|
+
/** Flag set when a dual-chain wallet (e.g. Phantom mobile) connects both EVM
|
|
45
|
+
* and Solana simultaneously. Consumed on connect-complete to route back to
|
|
46
|
+
* SELECT_METHOD instead of jumping straight to SELECT_TOKEN. */
|
|
47
47
|
dualChainConnect: boolean;
|
|
48
48
|
setDualChainConnect: (v: boolean) => void;
|
|
49
|
+
userDisconnected: boolean;
|
|
50
|
+
setUserDisconnected: (v: boolean) => void;
|
|
49
51
|
/** Chosen Solana wallet, eg Phantom.*/
|
|
50
52
|
solanaConnector: SolanaWalletName | undefined;
|
|
51
53
|
setSolanaConnector: React.Dispatch<React.SetStateAction<SolanaWalletName | undefined>>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ApiVersion } from "@rozoai/intent-common";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import type { StellarWalletsKit } from "@creit.tech/stellar-wallets-kit";
|
|
4
|
-
import { useConnectCallbackProps } from "../hooks/useConnectCallback";
|
|
5
4
|
import { CustomTheme, Mode, RozoPayContextOptions, Theme } from "../types";
|
|
6
5
|
/** Minimal PostHog interface — only capture() is needed. Any posthog-js version works. */
|
|
7
6
|
type PostHogCapture = {
|
|
@@ -9,35 +8,115 @@ type PostHogCapture = {
|
|
|
9
8
|
};
|
|
10
9
|
type RozoPayProviderProps = {
|
|
11
10
|
children?: React.ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Predefined visual theme for the payment modal.
|
|
13
|
+
* @defaultValue `"auto"` — follows system light/dark preference.
|
|
14
|
+
*/
|
|
12
15
|
theme?: Theme;
|
|
16
|
+
/**
|
|
17
|
+
* Force light or dark mode, or follow system preference.
|
|
18
|
+
* @defaultValue `"auto"` — uses `prefers-color-scheme`.
|
|
19
|
+
*/
|
|
13
20
|
mode?: Mode;
|
|
21
|
+
/**
|
|
22
|
+
* Full custom theme object to override colors, fonts, borders, etc.
|
|
23
|
+
* When provided, overrides the built-in `theme` preset.
|
|
24
|
+
* @see {@link https://docs.rozo.ai/intent-pay/theming} for theme shape.
|
|
25
|
+
*/
|
|
14
26
|
customTheme?: CustomTheme;
|
|
27
|
+
/**
|
|
28
|
+
* Global UI options applied to all RozoPayButton instances.
|
|
29
|
+
* - `language` — UI language code (default: `"en"`).
|
|
30
|
+
* - `hideBalance` — hide token balances in the modal. Default `false`.
|
|
31
|
+
* - `hideTooltips` — disable tooltip hints. Default `false`.
|
|
32
|
+
* - `hideQuestionMarkCTA` — hide the "?" help CTA. Default `false`.
|
|
33
|
+
* - `hideNoWalletCTA` — hide the "Don't have a wallet?" CTA. Default `false`.
|
|
34
|
+
* - `hideRecentBadge` — hide the "Recent" badge on tokens. Default `false`.
|
|
35
|
+
* - `avoidLayoutShift` — add body padding when modal is open. Default `false`.
|
|
36
|
+
* - `embedGoogleFonts` — auto-load Google Font for current theme. Default `false`.
|
|
37
|
+
* - `truncateLongENSAddress` — shorten long ENS names. Default `false`.
|
|
38
|
+
* - `reducedMotion` — disable animations. Default `false`.
|
|
39
|
+
* - `disclaimer` — custom disclaimer node shown in the modal.
|
|
40
|
+
* - `bufferPolyfill` — polyfill `Buffer` for older browsers. Default `false`.
|
|
41
|
+
* - `customAvatar` — custom avatar component for wallet addresses.
|
|
42
|
+
* - `initialChainId` — force initial chain selection.
|
|
43
|
+
* - `enforceSupportedChains` — restrict to supported chains only. Default `false`.
|
|
44
|
+
* - `ethereumOnboardingUrl` — custom URL for Ethereum wallet onboarding.
|
|
45
|
+
* - `walletOnboardingUrl` — custom URL for general wallet onboarding.
|
|
46
|
+
* - `overlayBlur` — blur amount (px) for modal backdrop. Default `0`.
|
|
47
|
+
* - `disableMobileInjector` — disable mobile wallet deep-link detection. Default `false`.
|
|
48
|
+
*/
|
|
15
49
|
options?: RozoPayContextOptions;
|
|
50
|
+
/**
|
|
51
|
+
* Log internal SDK state transitions and API calls to console.
|
|
52
|
+
* @defaultValue `false`
|
|
53
|
+
*/
|
|
16
54
|
debugMode?: boolean;
|
|
17
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* API version used for payment endpoints.
|
|
57
|
+
* - `"v1"` — legacy endpoint format.
|
|
58
|
+
* - `"v2"` — current endpoint format with hydrated orders.
|
|
59
|
+
* @defaultValue `"v2"`
|
|
60
|
+
*/
|
|
18
61
|
apiVersion?: ApiVersion;
|
|
19
62
|
/**
|
|
20
|
-
*
|
|
21
|
-
* `signatureSubscribe
|
|
22
|
-
*
|
|
63
|
+
* Custom Solana RPC endpoint. Some providers (e.g. Alchemy) don't support
|
|
64
|
+
* `signatureSubscribe`, which causes transactions to take minutes instead of
|
|
65
|
+
* seconds to confirm. Use a provider that supports WebSocket subscriptions.
|
|
66
|
+
* @defaultValue Solana public RPC (rate-limited).
|
|
23
67
|
*/
|
|
24
68
|
solanaRpcUrl?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Custom Stellar RPC endpoint for horizon/friendbot access.
|
|
71
|
+
* @defaultValue Stellar public network RPC.
|
|
72
|
+
*/
|
|
25
73
|
stellarRpcUrl?: string;
|
|
26
|
-
/**
|
|
74
|
+
/**
|
|
75
|
+
* Override the Pay API base URL. Useful for test/staging environments.
|
|
76
|
+
* @defaultValue `"https://intentapi.rozo.ai"`
|
|
77
|
+
*/
|
|
27
78
|
payApiUrl?: string;
|
|
28
|
-
/**
|
|
79
|
+
/**
|
|
80
|
+
* Provide your own StellarWalletsKit instance instead of the built-in one.
|
|
81
|
+
* Useful when you need custom wallet configuration or want to share a single
|
|
82
|
+
* kit instance across your app.
|
|
83
|
+
* @defaultValue Built-in kit with default wallet list.
|
|
84
|
+
*/
|
|
29
85
|
stellarKit?: StellarWalletsKit;
|
|
30
|
-
/**
|
|
86
|
+
/**
|
|
87
|
+
* Persist Stellar wallet connection to `localStorage` and auto-reconnect on
|
|
88
|
+
* page refresh. When `true`, the last connected Stellar wallet is saved under
|
|
89
|
+
* `rozo-stellar-wallet` and restored automatically on mount.
|
|
90
|
+
*
|
|
91
|
+
* **Caveat**: auto-reconnect can cause a brief spinner on refresh when combined
|
|
92
|
+
* with wagmi's EVM reconnect — see the auto-connect gate for details.
|
|
93
|
+
* @defaultValue `true`
|
|
94
|
+
*/
|
|
31
95
|
stellarWalletPersistence?: boolean;
|
|
32
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* Host app's PostHog instance. Payment events (started, completed, bounced,
|
|
98
|
+
* payout_completed) are forwarded to this instance via `capture()`.
|
|
99
|
+
* When omitted, only built-in SDK telemetry fires (if enabled).
|
|
100
|
+
*/
|
|
33
101
|
posthog?: PostHogCapture;
|
|
34
102
|
/**
|
|
35
103
|
* Enable built-in SDK telemetry. Tracks anonymous payment funnel events
|
|
36
|
-
*
|
|
37
|
-
*
|
|
104
|
+
* using the SDK's own PostHog project. Does NOT track addresses, amounts,
|
|
105
|
+
* or tx hashes. Respects browser Do Not Track.
|
|
106
|
+
* @defaultValue `true` — set to `false` to fully disable all built-in tracking.
|
|
38
107
|
*/
|
|
39
108
|
telemetry?: boolean;
|
|
40
|
-
|
|
109
|
+
/**
|
|
110
|
+
* Called when an EVM wallet connects (not on reconnect).
|
|
111
|
+
* Receives the connected address and connector ID.
|
|
112
|
+
*/
|
|
113
|
+
onConnect?: ({ address, connectorId, }: {
|
|
114
|
+
address?: string;
|
|
115
|
+
connectorId?: string;
|
|
116
|
+
}) => void;
|
|
117
|
+
/** Called when the EVM wallet disconnects. */
|
|
118
|
+
onDisconnect?: () => void;
|
|
119
|
+
};
|
|
41
120
|
/**
|
|
42
121
|
* Provides context for RozoPayButton and hooks. Place in app root or layout.
|
|
43
122
|
*/
|
|
@@ -16,6 +16,14 @@ type StellarContextProviderValue = {
|
|
|
16
16
|
setWallet: (option: ISupportedWallet) => Promise<void>;
|
|
17
17
|
disconnect: () => Promise<void>;
|
|
18
18
|
convertXlmToUsdc: (amount: string) => Promise<string>;
|
|
19
|
+
/** Pre-fetched supported wallets from the kit. */
|
|
20
|
+
supportedWallets: any[];
|
|
21
|
+
/** True once getSupportedWallets() has resolved (even if result is []). */
|
|
22
|
+
walletsLoaded: boolean;
|
|
23
|
+
/** Re-fetch supported wallets (e.g. after kit init). */
|
|
24
|
+
refreshSupportedWallets: () => Promise<void>;
|
|
25
|
+
/** True if the kit includes a WalletConnectModule. */
|
|
26
|
+
hasWalletConnect: boolean;
|
|
19
27
|
};
|
|
20
28
|
export type StellarWalletName = ISupportedWallet;
|
|
21
29
|
export declare const STELLAR_WALLET_STORAGE_KEY = "rozo-stellar-wallet";
|
|
@@ -4,7 +4,7 @@ import { usePayContext } from '../../../hooks/usePayContext.js';
|
|
|
4
4
|
import { PageContent, ModalContent, ModalBody } from '../Modal/styles.js';
|
|
5
5
|
import { parseUnits } from 'viem';
|
|
6
6
|
import styled from '../../../styles/styled/index.js';
|
|
7
|
-
import { formatUsd, usdToRoundedTokenAmount, USD_DECIMALS, tokenAmountToRoundedUsd, roundUsd, roundTokenAmount, roundTokenAmountUnits } from '../../../utils/format.js';
|
|
7
|
+
import { formatUsd, usdToRoundedTokenAmount, USD_DECIMALS, fallbackDisplayDecimals, tokenAmountToRoundedUsd, roundUsd, roundTokenAmount, roundTokenAmountUnits } from '../../../utils/format.js';
|
|
8
8
|
import { isValidNumber, sanitizeNumber } from '../../../utils/validateInput.js';
|
|
9
9
|
import Button from '../Button/index.js';
|
|
10
10
|
import SwitchButton from '../SwitchButton/index.js';
|
|
@@ -60,7 +60,7 @@ const MultiCurrencySelectAmount = ({ selectedTokenOption, setSelectedTokenOption
|
|
|
60
60
|
const value = e.target.value;
|
|
61
61
|
const maxDecimals = isEditingUsd
|
|
62
62
|
? USD_DECIMALS
|
|
63
|
-
: balanceToken.displayDecimals;
|
|
63
|
+
: (balanceToken.displayDecimals ?? fallbackDisplayDecimals(balanceToken.decimals));
|
|
64
64
|
if (value !== "" && !isValidNumber(value, maxDecimals))
|
|
65
65
|
return;
|
|
66
66
|
const sanitizedValue = sanitizeNumber(value);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/Common/AmountInput/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/components/Common/AmountInput/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;;;;AA6BM,MAAA,yBAAyB,GAI1B,CAAC,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,QAAQ,EAAE,KAAI;IACjE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,GAAG,aAAa,EAAE,CAAC;AAClE,IAAA,MAAM,WAAW,GAAG,YAAY,CAAC,gBAAgB,EAAE,CAAC;AAEpD,IAAA,MAAM,YAAY,GAAG,mBAAmB,CAAC,OAAO,CAAC,KAAK,CAAC;AACvD,IAAA,MAAM,UAAU,GAAG,YAAY,CAAC,UAAU,IAAI,GAAG,CAAC;IAElD,MAAM,cAAc,GAClB,mBAAmB,CAAC,eAAe,CAAC,GAAG,GAAG,CAAC;AACzC,UAAE,CAAA;AACJ,EAAA,EAAA,SAAS,CACT,mBAAmB,CAAC,eAAe,CAAC,GAAG,EACvC,IAAI,EACJ,YAAY,CAAC,OAAO,CACrB,CAAE,CAAA;UACG,IAAI,CAAC;IAEX,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC7C,IAAA,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAC1C,uBA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AEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAAA,CAAA;;;;;CAKtC,CAAC;AACF,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA,CAAA;;;;;;;;;CASjC,CAAC;AACF,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAA,CAAA;;;;;;;;;;;;CAY9B,CAAC;AACF,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAA,CAAA;;;;CAIjC;;;;"}
|
|
@@ -65,6 +65,7 @@ const ConnectorItem = ({ wallet, isRecent, customDeeplink = null, }) => {
|
|
|
65
65
|
}, [context.paymentState.payParams?.paymentOptions]);
|
|
66
66
|
const onClick = () => {
|
|
67
67
|
const meta = { event: "connector-list-click", walletId: wallet.id };
|
|
68
|
+
context.setUserDisconnected(false);
|
|
68
69
|
// Desktop multi-chain wallet flow: prompt for chain selection.
|
|
69
70
|
if (!isMobile) {
|
|
70
71
|
if (wallet.solanaConnectorName) {
|
|
@@ -106,10 +107,11 @@ const ConnectorItem = ({ wallet, isRecent, customDeeplink = null, }) => {
|
|
|
106
107
|
// wallet-standard provider (e.g. Phantom): connect both chains at once
|
|
107
108
|
// instead of forcing a chain choice. SELECT_METHOD already shows
|
|
108
109
|
// separate "Pay with [eth]"/"Pay with [sol]" tiles once both are connected.
|
|
110
|
+
// Connect EVM directly (no intermediate injector page — we're already inside
|
|
111
|
+
// the wallet's in-app browser) and select Solana simultaneously.
|
|
109
112
|
if (isMobile && wallet.connector && wallet.solanaConnectorName) {
|
|
110
|
-
context.setPendingConnectorId(wallet.id);
|
|
111
113
|
context.setDualChainConnect(true);
|
|
112
|
-
|
|
114
|
+
connect({ connector: wallet.connector });
|
|
113
115
|
solanaWallets.select(wallet.solanaConnectorName);
|
|
114
116
|
return;
|
|
115
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/components/Common/ConnectorList/index.tsx"],"sourcesContent":[null],"names":["_jsxs","_j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 17px;
|
|
16
16
|
font-weight: var(--ck-primary-button-font-weight, 500);
|
|
17
|
-
line-height:
|
|
17
|
+
line-height: 1.35;
|
|
18
18
|
text-align: var(--ck-body-button-text-align, left);
|
|
19
19
|
transition: 180ms ease;
|
|
20
20
|
transition-property: background, color, box-shadow, transform, opacity;
|
|
@@ -118,14 +118,14 @@ const OptionTitle = styled(motion.span) `
|
|
|
118
118
|
white-space: nowrap;
|
|
119
119
|
text-overflow: ellipsis;
|
|
120
120
|
overflow: hidden;
|
|
121
|
+
text-wrap: balance;
|
|
121
122
|
width: 100%;
|
|
122
123
|
`;
|
|
123
124
|
const OptionSubtitle = styled(motion.span) `
|
|
124
|
-
font-size: 14px;
|
|
125
|
-
|
|
125
|
+
font-size: clamp(12px, 3vw, 14px);
|
|
126
|
+
line-height: 1.45;
|
|
127
|
+
opacity: 0.65;
|
|
126
128
|
font-weight: 400;
|
|
127
|
-
// white-space: nowrap;
|
|
128
|
-
// text-overflow: ellipsis;
|
|
129
129
|
overflow: hidden;
|
|
130
130
|
width: 100%;
|
|
131
131
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../../../src/components/Common/OptionsList/styles.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAKa,MAAA,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA,CAAA;;;AAGrC,UAAA,EAAA,CAAC,KAAK,MAAM,KAAK,CAAC,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2F7D;AAEW,MAAA,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAG5C,CAAA;;;;;;;;AAQgB,gBAAA,EAAA,CAAC,KAAK,MAAM,KAAK,CAAC,cAAc,KAAK,MAAM,GAAG,MAAM,G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