@rash2x/bridge-widget 0.5.0 → 0.5.5
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/README.md +73 -2
- package/dist/evaa-bridge.cjs +1 -2
- package/dist/evaa-bridge.cjs.map +1 -1
- package/dist/evaa-bridge.mjs +43 -44
- package/dist/{index-Cg_MPp5L.cjs → index-Du3Jvj8-.cjs} +2 -2
- package/dist/{index-Cg_MPp5L.cjs.map → index-Du3Jvj8-.cjs.map} +1 -1
- package/dist/{index-C4YkGAHm.js → index-DuPQ_srt.js} +21072 -20692
- package/dist/index-DuPQ_srt.js.map +1 -0
- package/dist/{index-BsVKYtLN.cjs → index-DxLEQnH4.cjs} +21031 -20651
- package/dist/index-DxLEQnH4.cjs.map +1 -0
- package/dist/{index-CNQIX3lo.js → index-IktEMotK.js} +2 -2
- package/dist/{index-CNQIX3lo.js.map → index-IktEMotK.js.map} +1 -1
- package/dist/index.d.ts +11 -39
- package/dist/styles.css +1 -1
- package/package.json +3 -3
- package/dist/index-BsVKYtLN.cjs.map +0 -1
- package/dist/index-C4YkGAHm.js.map +0 -1
package/README.md
CHANGED
|
@@ -43,8 +43,30 @@ npm install wagmi ethers connectkit
|
|
|
43
43
|
# For TON
|
|
44
44
|
npm install @tonconnect/ui-react @ton/core @ton/crypto @ton/ton
|
|
45
45
|
|
|
46
|
-
# For Tron
|
|
47
|
-
npm install @tronweb3/tronwallet-adapter-react-hooks @tronweb3/tronwallet-adapters tronweb @walletconnect/universal-provider @walletconnect/modal
|
|
46
|
+
# For Tron (with specific WalletConnect versions)
|
|
47
|
+
npm install @tronweb3/tronwallet-adapter-react-hooks @tronweb3/tronwallet-adapters tronweb @walletconnect/universal-provider@^2.23.0 @walletconnect/modal@^2.7.0
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
> **⚠️ Important:** When using TRON WalletConnect support, ensure you install the exact versions specified above (`@walletconnect/modal@^2.7.0` and `@walletconnect/universal-provider@^2.23.0`) to avoid runtime errors like `this.client.core.relayer.publishCustom is not a function`.
|
|
51
|
+
|
|
52
|
+
### Version Lock (Recommended)
|
|
53
|
+
|
|
54
|
+
To prevent version conflicts, add these overrides to your `package.json`:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"overrides": {
|
|
59
|
+
"@walletconnect/modal": "^2.7.0",
|
|
60
|
+
"@walletconnect/universal-provider": "^2.23.0"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For **yarn**, use `resolutions` instead of `overrides`. For **pnpm**, add to your `.npmrc`:
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
@walletconnect/modal=^2.7.0
|
|
69
|
+
@walletconnect/universal-provider=^2.23.0
|
|
48
70
|
```
|
|
49
71
|
|
|
50
72
|
### Required shadcn/ui Components
|
|
@@ -286,6 +308,55 @@ npm run build:lib
|
|
|
286
308
|
npm run lint
|
|
287
309
|
```
|
|
288
310
|
|
|
311
|
+
## Troubleshooting
|
|
312
|
+
|
|
313
|
+
### WalletConnect Error: `this.client.core.relayer.publishCustom is not a function`
|
|
314
|
+
|
|
315
|
+
This error occurs due to version conflicts with WalletConnect packages. To fix:
|
|
316
|
+
|
|
317
|
+
1. **Ensure exact versions are installed**:
|
|
318
|
+
```bash
|
|
319
|
+
npm install @walletconnect/modal@^2.7.0 @walletconnect/universal-provider@^2.23.0
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
2. **Add package overrides** to your `package.json`:
|
|
323
|
+
```json
|
|
324
|
+
{
|
|
325
|
+
"overrides": {
|
|
326
|
+
"@walletconnect/modal": "^2.7.0",
|
|
327
|
+
"@walletconnect/universal-provider": "^2.23.0"
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
3. **Delete `node_modules` and lock file**, then reinstall:
|
|
333
|
+
```bash
|
|
334
|
+
rm -rf node_modules package-lock.json
|
|
335
|
+
npm install
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
4. **For yarn users**, use `resolutions` instead of `overrides`:
|
|
339
|
+
```json
|
|
340
|
+
{
|
|
341
|
+
"resolutions": {
|
|
342
|
+
"@walletconnect/modal": "^2.7.0",
|
|
343
|
+
"@walletconnect/universal-provider": "^2.23.0"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
5. **For pnpm users**, add to `.npmrc`:
|
|
349
|
+
```
|
|
350
|
+
@walletconnect/modal=^2.7.0
|
|
351
|
+
@walletconnect/universal-provider=^2.23.0
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Other Common Issues
|
|
355
|
+
|
|
356
|
+
- **Missing peer dependencies**: Check that all required peer dependencies are installed for your chain (see Installation section)
|
|
357
|
+
- **shadcn/ui component errors**: Ensure all required shadcn components are installed (see Required shadcn/ui Components)
|
|
358
|
+
- **Theme not working**: Make sure you have CSS variables configured properly (see Theme Customization)
|
|
359
|
+
|
|
289
360
|
## Contributing
|
|
290
361
|
|
|
291
362
|
Contributions are welcome! Please open an issue or submit a pull request.
|
package/dist/evaa-bridge.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-DxLEQnH4.cjs");
|
|
4
4
|
exports.DEFAULT_SLIPPAGE_BPS = index.DEFAULT_SLIPPAGE_BPS;
|
|
5
5
|
exports.EvaaBridge = index.EvaaBridge;
|
|
6
6
|
exports.RoutePriority = index.RoutePriority;
|
|
@@ -54,5 +54,4 @@ exports.useSettingsStore = index.useSettingsStore;
|
|
|
54
54
|
exports.useSwapModel = index.useSwapModel;
|
|
55
55
|
exports.useTokensStore = index.useTokensStore;
|
|
56
56
|
exports.useTransactionStore = index.useTransactionStore;
|
|
57
|
-
exports.useTronWalletConnect = index.useTronWalletConnect;
|
|
58
57
|
//# sourceMappingURL=evaa-bridge.cjs.map
|
package/dist/evaa-bridge.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaa-bridge.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"evaa-bridge.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/evaa-bridge.mjs
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Q, d, f, e, G, A, D, V, K, y, Z, F, z, B, X, v, r, s, q, o, p, J, a0, a7, a2, a4, w, H, x, a3, a1, a5, a6, W, U, L, Y, $, a8, N, P, _, I, S, t, i, u, l, m, j, n, h, k } from "./index-DuPQ_srt.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
3
|
+
Q as DEFAULT_SLIPPAGE_BPS,
|
|
4
4
|
d as EvaaBridge,
|
|
5
5
|
f as RoutePriority,
|
|
6
6
|
e as RouteType,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
7
|
+
G as addEvmNetworkFee,
|
|
8
|
+
A as addTonNetworkFee,
|
|
9
|
+
D as addTronNetworkFee,
|
|
10
|
+
V as addrForApi,
|
|
11
|
+
K as buildAssetMatrix,
|
|
12
|
+
y as calculateMinReceived,
|
|
13
|
+
Z as computeFeesUsdFromArray,
|
|
14
|
+
F as estimateEvmNetworkFee,
|
|
15
|
+
z as estimateTonNetworkFee,
|
|
16
|
+
B as estimateTronNetworkFee,
|
|
17
|
+
X as findNativeMeta,
|
|
18
|
+
v as formatAddress,
|
|
19
|
+
r as formatBalance,
|
|
20
|
+
s as formatHash,
|
|
21
|
+
q as formatPercentage,
|
|
22
|
+
o as formatTokenAmount,
|
|
23
|
+
p as formatUsd,
|
|
24
|
+
J as fromLD,
|
|
25
|
+
a0 as getChains,
|
|
26
|
+
a7 as getDeliveryStatus,
|
|
27
|
+
a2 as getDestTokens,
|
|
28
|
+
a4 as getEvmBalances,
|
|
29
|
+
w as getQuoteAmounts,
|
|
30
|
+
H as getQuoteDetails,
|
|
31
|
+
x as getQuoteFees,
|
|
32
|
+
a3 as getQuotesByPriority,
|
|
33
|
+
a1 as getTokens,
|
|
34
|
+
a5 as getTonBalances,
|
|
35
|
+
a6 as getTronBalances,
|
|
36
|
+
W as isNativeAddrEqual,
|
|
37
|
+
U as isZeroAddr,
|
|
38
|
+
L as listAssetsForSelect,
|
|
39
|
+
Y as lookupTokenMeta,
|
|
40
|
+
$ as normalizeTickerSymbol,
|
|
41
|
+
a8 as pollUntilDelivered,
|
|
42
|
+
N as resolveTokenOnChain,
|
|
43
|
+
P as resolveTokenOnChainFromMatrix,
|
|
44
|
+
_ as sumFeeByTokenLD,
|
|
45
|
+
I as toLD,
|
|
46
|
+
S as tonNorm,
|
|
47
47
|
t as truncateToDecimals,
|
|
48
48
|
i as useBridgeQuoteStore,
|
|
49
49
|
u as useChainsStore,
|
|
@@ -52,7 +52,6 @@ export {
|
|
|
52
52
|
j as useSettingsStore,
|
|
53
53
|
n as useSwapModel,
|
|
54
54
|
h as useTokensStore,
|
|
55
|
-
k as useTransactionStore
|
|
56
|
-
o as useTronWalletConnect
|
|
55
|
+
k as useTransactionStore
|
|
57
56
|
};
|
|
58
57
|
//# sourceMappingURL=evaa-bridge.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-DxLEQnH4.cjs");
|
|
4
4
|
/**
|
|
5
5
|
* @license
|
|
6
6
|
* Copyright 2019 Google LLC
|
|
@@ -5475,4 +5475,4 @@ __decorateClass([
|
|
|
5475
5475
|
WcmWebConnectingView = __decorateClass([
|
|
5476
5476
|
e$2("wcm-web-connecting-view")
|
|
5477
5477
|
], WcmWebConnectingView);
|
|
5478
|
-
//# sourceMappingURL=index-
|
|
5478
|
+
//# sourceMappingURL=index-Du3Jvj8-.cjs.map
|