@rash2x/bridge-widget 0.6.13 → 0.6.15
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-8iyt7Qza.js} +2 -2
- package/dist/{index-Bnjs5pEq.js.map → index-8iyt7Qza.js.map} +1 -1
- package/dist/{index-C6a8cU4O.cjs → index-ChBJiTJF.cjs} +20 -4
- package/dist/index-ChBJiTJF.cjs.map +1 -0
- package/dist/{index-BflpXTpo.js → index-P1h97irF.js} +20 -4
- package/dist/index-P1h97irF.js.map +1 -0
- package/dist/{index-B7J9ZWjf.cjs → index-vob2mbdZ.cjs} +2 -2
- package/dist/{index-B7J9ZWjf.cjs.map → index-vob2mbdZ.cjs.map} +1 -1
- 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) {
|
|
@@ -6537,7 +6553,7 @@ const TokenRow = ({
|
|
|
6537
6553
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12 rounded-md" })
|
|
6538
6554
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6539
6555
|
/* @__PURE__ */ jsx("div", { className: "font-semibold text-foreground text-sm leading-4 truncate", children: hasAnyWallet ? formatBalance(balance) : "—" }),
|
|
6540
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs leading-3 text-muted-foreground
|
|
6556
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs 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-8iyt7Qza.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-P1h97irF.js.map
|