@rash2x/bridge-widget 0.6.13 → 0.6.16
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/evaa-bridge.cjs +1 -1
- package/dist/evaa-bridge.mjs +1 -1
- package/dist/{index-Bnjs5pEq.js → index-5e2z-MAz.js} +2 -2
- package/dist/{index-Bnjs5pEq.js.map → index-5e2z-MAz.js.map} +1 -1
- package/dist/{index-B7J9ZWjf.cjs → index-Cju6YF5r.cjs} +2 -2
- package/dist/{index-B7J9ZWjf.cjs.map → index-Cju6YF5r.cjs.map} +1 -1
- package/dist/{index-C6a8cU4O.cjs → index-DOJM0lwX.cjs} +23 -7
- package/dist/index-DOJM0lwX.cjs.map +1 -0
- package/dist/{index-BflpXTpo.js → index-UiqPwW9r.js} +23 -7
- package/dist/index-UiqPwW9r.js.map +1 -0
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/index-BflpXTpo.js.map +0 -1
- package/dist/index-C6a8cU4O.cjs.map +0 -1
|
@@ -4095,6 +4095,7 @@ const WalletSelectModal = () => {
|
|
|
4095
4095
|
const { t: t2 } = useBridgeTranslation();
|
|
4096
4096
|
const { isOpen, onClose } = useWalletSelectModal();
|
|
4097
4097
|
const { connectors } = useConnect();
|
|
4098
|
+
const { address: evmAddress, connector: connectedConnector } = useAccount();
|
|
4098
4099
|
const { chainRegistry } = useChainStrategies();
|
|
4099
4100
|
const tonWallet = chainRegistry.getStrategyByType(CHAIN_TYPES.TON);
|
|
4100
4101
|
const metaMaskWallet = chainRegistry.getStrategyByType(CHAIN_TYPES.EVM);
|
|
@@ -4116,6 +4117,9 @@ const WalletSelectModal = () => {
|
|
|
4116
4117
|
}
|
|
4117
4118
|
];
|
|
4118
4119
|
const connectedWallets = walletConfigs.reduce((acc, { strategy, walletId, name, icon }) => {
|
|
4120
|
+
if (walletId === "metamask" && evmAddress && connectedConnector) {
|
|
4121
|
+
return acc;
|
|
4122
|
+
}
|
|
4119
4123
|
const account = strategy?.getAccount();
|
|
4120
4124
|
if (strategy?.isConnected() && account) {
|
|
4121
4125
|
acc.push({
|
|
@@ -4128,6 +4132,19 @@ const WalletSelectModal = () => {
|
|
|
4128
4132
|
}
|
|
4129
4133
|
return acc;
|
|
4130
4134
|
}, []);
|
|
4135
|
+
if (evmAddress && connectedConnector) {
|
|
4136
|
+
const iconMap = {
|
|
4137
|
+
metaMaskSDK: MetaMaskIcon,
|
|
4138
|
+
walletConnect: WalletConnectIcon
|
|
4139
|
+
};
|
|
4140
|
+
connectedWallets.push({
|
|
4141
|
+
id: connectedConnector.id,
|
|
4142
|
+
name: connectedConnector.name,
|
|
4143
|
+
icon: iconMap[connectedConnector.id] || WalletConnectIcon,
|
|
4144
|
+
address: evmAddress,
|
|
4145
|
+
onDisconnect: () => metaMaskWallet?.disconnect()
|
|
4146
|
+
});
|
|
4147
|
+
}
|
|
4131
4148
|
tronConnections.forEach((connection) => {
|
|
4132
4149
|
if (!connection.connected || !connection.address) return;
|
|
4133
4150
|
const isWalletConnect = connection.provider === "walletconnect";
|
|
@@ -5559,7 +5576,6 @@ class TronChainStrategy {
|
|
|
5559
5576
|
}
|
|
5560
5577
|
async connect(options) {
|
|
5561
5578
|
const provider = this.resolveProvider(options?.provider);
|
|
5562
|
-
console.log(provider);
|
|
5563
5579
|
if (provider === "walletconnect") {
|
|
5564
5580
|
const walletConnect = this.config.walletConnect;
|
|
5565
5581
|
if (!walletConnect?.connect) {
|
|
@@ -6528,16 +6544,16 @@ const TokenRow = ({
|
|
|
6528
6544
|
}
|
|
6529
6545
|
),
|
|
6530
6546
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col items-start gap-1", children: [
|
|
6531
|
-
/* @__PURE__ */ jsx("p", { className: "
|
|
6532
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs leading-3 text-muted-foreground truncate", children: name })
|
|
6547
|
+
/* @__PURE__ */ jsx("p", { className: "text-foreground font-extrabold text-sm leading-4 truncate flex items-center gap-1", children: symbol }),
|
|
6548
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold leading-3 text-muted-foreground truncate", children: name })
|
|
6533
6549
|
] })
|
|
6534
6550
|
] }),
|
|
6535
6551
|
/* @__PURE__ */ jsx("div", { className: "text-right space-y-1", children: isBalanceLoading && hasAnyWallet ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-end gap-1", children: [
|
|
6536
6552
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-md" }),
|
|
6537
6553
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12 rounded-md" })
|
|
6538
6554
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6539
|
-
/* @__PURE__ */ jsx("div", { className: "
|
|
6540
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs leading-3 text-muted-foreground
|
|
6555
|
+
/* @__PURE__ */ jsx("div", { className: "text-foreground font-extrabold text-sm leading-4 truncate", children: hasAnyWallet ? formatBalance(balance) : "—" }),
|
|
6556
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs font-semibold leading-3 text-muted-foreground", children: hasAnyWallet && balance > 0 && usdValue > 0 ? formatUsd(usdValue) : "—" })
|
|
6541
6557
|
] }) })
|
|
6542
6558
|
]
|
|
6543
6559
|
}
|
|
@@ -25921,7 +25937,7 @@ class WalletConnectModal {
|
|
|
25921
25937
|
}
|
|
25922
25938
|
async initUi() {
|
|
25923
25939
|
if (typeof window !== "undefined") {
|
|
25924
|
-
await import("./index-
|
|
25940
|
+
await import("./index-5e2z-MAz.js");
|
|
25925
25941
|
const modal = document.createElement("wcm-modal");
|
|
25926
25942
|
document.body.insertAdjacentElement("beforeend", modal);
|
|
25927
25943
|
OptionsCtrl.setIsUiLoaded(true);
|
|
@@ -26672,4 +26688,4 @@ export {
|
|
|
26672
26688
|
getQuoteFees as y,
|
|
26673
26689
|
calculateMinReceived as z
|
|
26674
26690
|
};
|
|
26675
|
-
//# sourceMappingURL=index-
|
|
26691
|
+
//# sourceMappingURL=index-UiqPwW9r.js.map
|