@rozoai/intent-pay 0.0.29-beta.3 → 0.0.29-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/build/package.json.js
CHANGED
|
@@ -21,8 +21,12 @@ import { useState, useRef, useMemo, useEffect } from 'react';
|
|
|
21
21
|
function useWalletPaymentOptions({ trpc, address, usdRequired, destChainId, preferredChains, preferredTokens, evmChains, isDepositFlow, payParams, log, }) {
|
|
22
22
|
const [options, setOptions] = useState(null);
|
|
23
23
|
const [isLoading, setIsLoading] = useState(false);
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
// Track the last executed parameters to prevent duplicate API calls
|
|
25
|
+
const lastExecutedParams = useRef(null);
|
|
26
|
+
// Track if we're currently making an API call to prevent concurrent requests
|
|
27
|
+
const isApiCallInProgress = useRef(false);
|
|
28
|
+
// Track the last successful result to avoid unnecessary state updates
|
|
29
|
+
const lastSuccessfulResult = useRef(null);
|
|
26
30
|
// Create stable array dependencies that only change when content actually changes
|
|
27
31
|
const stablePreferredChains = useMemo(() => {
|
|
28
32
|
if (!preferredChains || preferredChains.length === 0)
|
|
@@ -46,64 +50,135 @@ function useWalletPaymentOptions({ trpc, address, usdRequired, destChainId, pref
|
|
|
46
50
|
// Sort to ensure consistent comparison
|
|
47
51
|
return [...evmChains].sort((a, b) => a - b);
|
|
48
52
|
}, [evmChains]);
|
|
53
|
+
// Extract appId to avoid payParams object recreation causing re-runs
|
|
54
|
+
const stableAppId = useMemo(() => {
|
|
55
|
+
return payParams?.appId;
|
|
56
|
+
}, [payParams?.appId]);
|
|
57
|
+
// Use refs to store stable values and prevent unnecessary re-computations
|
|
58
|
+
const stableValuesRef = useRef({
|
|
59
|
+
address,
|
|
60
|
+
usdRequired,
|
|
61
|
+
destChainId,
|
|
62
|
+
isDepositFlow,
|
|
63
|
+
stablePreferredChains,
|
|
64
|
+
stablePreferredTokens,
|
|
65
|
+
stableEvmChains,
|
|
66
|
+
stableAppId,
|
|
67
|
+
});
|
|
68
|
+
// Update ref only when values actually change
|
|
69
|
+
const hasValuesChanged = useMemo(() => {
|
|
70
|
+
const current = stableValuesRef.current;
|
|
71
|
+
return (current.address !== address ||
|
|
72
|
+
current.usdRequired !== usdRequired ||
|
|
73
|
+
current.destChainId !== destChainId ||
|
|
74
|
+
current.isDepositFlow !== isDepositFlow ||
|
|
75
|
+
JSON.stringify(current.stablePreferredChains) !==
|
|
76
|
+
JSON.stringify(stablePreferredChains) ||
|
|
77
|
+
JSON.stringify(current.stablePreferredTokens) !==
|
|
78
|
+
JSON.stringify(stablePreferredTokens) ||
|
|
79
|
+
JSON.stringify(current.stableEvmChains) !==
|
|
80
|
+
JSON.stringify(stableEvmChains) ||
|
|
81
|
+
current.stableAppId !== stableAppId);
|
|
82
|
+
}, [
|
|
83
|
+
address,
|
|
84
|
+
usdRequired,
|
|
85
|
+
destChainId,
|
|
86
|
+
isDepositFlow,
|
|
87
|
+
stablePreferredChains,
|
|
88
|
+
stablePreferredTokens,
|
|
89
|
+
stableEvmChains,
|
|
90
|
+
stableAppId,
|
|
91
|
+
]);
|
|
92
|
+
// Update ref when values change
|
|
93
|
+
if (hasValuesChanged) {
|
|
94
|
+
stableValuesRef.current = {
|
|
95
|
+
address,
|
|
96
|
+
usdRequired,
|
|
97
|
+
destChainId,
|
|
98
|
+
isDepositFlow,
|
|
99
|
+
stablePreferredChains,
|
|
100
|
+
stablePreferredTokens,
|
|
101
|
+
stableEvmChains,
|
|
102
|
+
stableAppId,
|
|
103
|
+
};
|
|
104
|
+
}
|
|
49
105
|
useEffect(() => {
|
|
50
106
|
const refreshWalletPaymentOptions = async () => {
|
|
51
|
-
|
|
107
|
+
const stableValues = stableValuesRef.current;
|
|
108
|
+
if (stableValues.address == null ||
|
|
109
|
+
stableValues.usdRequired == null ||
|
|
110
|
+
stableValues.destChainId == null)
|
|
111
|
+
return;
|
|
112
|
+
// Create a unique key for the current parameters to prevent duplicate calls
|
|
113
|
+
const paramsKey = JSON.stringify({
|
|
114
|
+
address: stableValues.address,
|
|
115
|
+
usdRequired: stableValues.usdRequired,
|
|
116
|
+
destChainId: stableValues.destChainId,
|
|
117
|
+
isDepositFlow: stableValues.isDepositFlow,
|
|
118
|
+
stablePreferredChains: stableValues.stablePreferredChains,
|
|
119
|
+
stablePreferredTokens: stableValues.stablePreferredTokens,
|
|
120
|
+
stableEvmChains: stableValues.stableEvmChains,
|
|
121
|
+
stableAppId: stableValues.stableAppId,
|
|
122
|
+
});
|
|
123
|
+
// Skip if we've already executed with these exact parameters
|
|
124
|
+
if (lastExecutedParams.current === paramsKey) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
// Skip if we're already making an API call to prevent concurrent requests
|
|
128
|
+
if (isApiCallInProgress.current) {
|
|
52
129
|
return;
|
|
53
|
-
// Cancel any in-flight requests
|
|
54
|
-
if (abortControllerRef.current) {
|
|
55
|
-
abortControllerRef.current.abort();
|
|
56
130
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
abortControllerRef.current = abortController;
|
|
60
|
-
// Increment request ID
|
|
61
|
-
const currentRequestId = ++requestIdRef.current;
|
|
131
|
+
lastExecutedParams.current = paramsKey;
|
|
132
|
+
isApiCallInProgress.current = true;
|
|
62
133
|
setOptions(null);
|
|
63
134
|
setIsLoading(true);
|
|
64
135
|
try {
|
|
65
136
|
const queryParams = {
|
|
66
|
-
payerAddress: address,
|
|
137
|
+
payerAddress: stableValues.address,
|
|
67
138
|
// API expects undefined for deposit flow.
|
|
68
|
-
usdRequired: isDepositFlow
|
|
69
|
-
|
|
139
|
+
usdRequired: stableValues.isDepositFlow
|
|
140
|
+
? undefined
|
|
141
|
+
: stableValues.usdRequired,
|
|
142
|
+
destChainId: stableValues.destChainId,
|
|
70
143
|
};
|
|
71
144
|
// Only include array parameters if they have values
|
|
72
|
-
if (stablePreferredChains) {
|
|
73
|
-
queryParams.preferredChains = stablePreferredChains;
|
|
145
|
+
if (stableValues.stablePreferredChains) {
|
|
146
|
+
queryParams.preferredChains = stableValues.stablePreferredChains;
|
|
74
147
|
}
|
|
75
|
-
if (stablePreferredTokens) {
|
|
76
|
-
queryParams.preferredTokens = stablePreferredTokens;
|
|
148
|
+
if (stableValues.stablePreferredTokens) {
|
|
149
|
+
queryParams.preferredTokens = stableValues.stablePreferredTokens;
|
|
77
150
|
}
|
|
78
|
-
if (stableEvmChains) {
|
|
79
|
-
queryParams.evmChains = stableEvmChains;
|
|
151
|
+
if (stableValues.stableEvmChains) {
|
|
152
|
+
queryParams.evmChains = stableValues.stableEvmChains;
|
|
80
153
|
}
|
|
81
154
|
const newOptions = await trpc.getWalletPaymentOptions.query(queryParams);
|
|
82
|
-
// Only
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
155
|
+
// SUPPORTED CHAINS: Only these chains are currently active in wallet payment options
|
|
156
|
+
// To add more chains, add them to both arrays below and ensure they're defined in pay-common
|
|
157
|
+
const supportedChains = [base, polygon];
|
|
158
|
+
// SUPPORTED TOKENS: Only these specific tokens are currently active
|
|
159
|
+
// Each token corresponds to its respective chain above
|
|
160
|
+
const supportedTokens = [baseUSDC.token, polygonUSDC.token];
|
|
161
|
+
// Show BSC USDT for MugglePay apps or when BSC is preferred
|
|
162
|
+
const showBSCUSDT = stableValues.stableAppId?.includes("MP") ||
|
|
163
|
+
stableValues.stablePreferredChains?.includes(bsc.chainId) ||
|
|
164
|
+
stableValues.stableEvmChains?.includes(bsc.chainId);
|
|
165
|
+
if (showBSCUSDT) {
|
|
166
|
+
supportedChains.push(bsc);
|
|
167
|
+
supportedTokens.push(bscUSDT.token);
|
|
168
|
+
}
|
|
169
|
+
// Filter out chains/tokens we don't support yet in wallet payment options
|
|
170
|
+
// API may return more options, but we only show these filtered ones to users
|
|
171
|
+
const isSupported = (o) => supportedChains.some((c) => c.chainId === o.balance.token.chainId &&
|
|
172
|
+
supportedTokens.includes(o.balance.token.token));
|
|
173
|
+
const filteredOptions = newOptions.filter(isSupported);
|
|
174
|
+
if (filteredOptions.length < newOptions.length) {
|
|
175
|
+
log(`[WALLET]: skipping ${newOptions.length - filteredOptions.length} unsupported-chain balances on ${stableValues.address}`);
|
|
176
|
+
}
|
|
177
|
+
// Only update state if the result is actually different from the last successful result
|
|
178
|
+
const resultKey = JSON.stringify(filteredOptions);
|
|
179
|
+
const lastResultKey = JSON.stringify(lastSuccessfulResult.current);
|
|
180
|
+
if (resultKey !== lastResultKey) {
|
|
181
|
+
lastSuccessfulResult.current = filteredOptions;
|
|
107
182
|
setOptions(filteredOptions);
|
|
108
183
|
}
|
|
109
184
|
}
|
|
@@ -111,33 +186,17 @@ function useWalletPaymentOptions({ trpc, address, usdRequired, destChainId, pref
|
|
|
111
186
|
console.error(error);
|
|
112
187
|
}
|
|
113
188
|
finally {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
!abortController.signal.aborted) {
|
|
117
|
-
setIsLoading(false);
|
|
118
|
-
}
|
|
189
|
+
isApiCallInProgress.current = false;
|
|
190
|
+
setIsLoading(false);
|
|
119
191
|
}
|
|
120
192
|
};
|
|
121
|
-
|
|
193
|
+
const currentStableValues = stableValuesRef.current;
|
|
194
|
+
if (currentStableValues.address != null &&
|
|
195
|
+
currentStableValues.usdRequired != null &&
|
|
196
|
+
currentStableValues.destChainId != null) {
|
|
122
197
|
refreshWalletPaymentOptions();
|
|
123
198
|
}
|
|
124
|
-
|
|
125
|
-
return () => {
|
|
126
|
-
if (abortControllerRef.current) {
|
|
127
|
-
abortControllerRef.current.abort();
|
|
128
|
-
}
|
|
129
|
-
};
|
|
130
|
-
}, [
|
|
131
|
-
address,
|
|
132
|
-
usdRequired,
|
|
133
|
-
destChainId,
|
|
134
|
-
isDepositFlow,
|
|
135
|
-
stablePreferredChains,
|
|
136
|
-
stablePreferredTokens,
|
|
137
|
-
stableEvmChains,
|
|
138
|
-
trpc,
|
|
139
|
-
payParams,
|
|
140
|
-
]);
|
|
199
|
+
}, [hasValuesChanged, trpc, log]);
|
|
141
200
|
return {
|
|
142
201
|
options,
|
|
143
202
|
isLoading,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useWalletPaymentOptions.js","sources":["../../../src/hooks/useWalletPaymentOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAaA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,uBAAuB,CAAC,EACtC,IAAI,EACJ,OAAO,EACP,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACT,aAAa,EACb,SAAS,EACT,GAAG,GAYJ,EAAA;IACC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA+B,IAAI,CAAC,CAAC;IAC3E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"useWalletPaymentOptions.js","sources":["../../../src/hooks/useWalletPaymentOptions.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAaA;;;;;;;;;;;;;;;;AAgBG;AACG,SAAU,uBAAuB,CAAC,EACtC,IAAI,EACJ,OAAO,EACP,WAAW,EACX,WAAW,EACX,eAAe,EACf,eAAe,EACf,SAAS,EACT,aAAa,EACb,SAAS,EACT,GAAG,GAYJ,EAAA;IACC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAA+B,IAAI,CAAC,CAAC;IAC3E,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;;AAGlD,IAAA,MAAM,kBAAkB,GA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