@orderly.network/wallet-connector-privy 2.6.0 → 2.6.1-alpha.0
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.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -3103,6 +3103,11 @@ var commonSwrOpts = {
|
|
|
3103
3103
|
// don't duplicate a request with the same key for 1hr
|
|
3104
3104
|
dedupingInterval: 36e5
|
|
3105
3105
|
};
|
|
3106
|
+
var testnetTokenFallback = types.TesntTokenFallback([
|
|
3107
|
+
types.ArbitrumSepoliaTokenInfo,
|
|
3108
|
+
types.SolanaDevnetTokenInfo
|
|
3109
|
+
]);
|
|
3110
|
+
var testnetChainFallback = [types.ArbitrumSepoliaChainInfo, types.SolanaDevnetChainInfo];
|
|
3106
3111
|
var formatSwapChainInfo = (data = {}) => {
|
|
3107
3112
|
return Object.keys(data).map((key) => {
|
|
3108
3113
|
const chain = data[key];
|
|
@@ -3239,12 +3244,18 @@ function WalletConnectorPrivyProvider(props) {
|
|
|
3239
3244
|
const { data: mainnetChainInfos } = hooks.useSWR(
|
|
3240
3245
|
!props.customChains ? "https://api.orderly.org/v1/public/chain_info" : null,
|
|
3241
3246
|
hooks.fetcher,
|
|
3242
|
-
|
|
3247
|
+
{
|
|
3248
|
+
...commonSwrOpts,
|
|
3249
|
+
fallbackData: testnetTokenFallback
|
|
3250
|
+
}
|
|
3243
3251
|
);
|
|
3244
3252
|
const { data: testChainInfos } = hooks.useSWR(
|
|
3245
3253
|
!props.customChains ? "https://testnet-api.orderly.org/v1/public/chain_info" : null,
|
|
3246
3254
|
hooks.fetcher,
|
|
3247
|
-
|
|
3255
|
+
{
|
|
3256
|
+
...commonSwrOpts,
|
|
3257
|
+
fallbackData: testnetChainFallback
|
|
3258
|
+
}
|
|
3248
3259
|
);
|
|
3249
3260
|
const handleCustomerChains = () => {
|
|
3250
3261
|
const testChains = processChainInfo(
|