@kimafinance/kima-transaction-widget 1.3.7 → 1.3.8
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.cjs +6 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -8
- package/dist/index.js.map +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2544,11 +2544,12 @@ function useIsWalletReady() {
|
|
|
2544
2544
|
checkChainId();
|
|
2545
2545
|
}, [externalProvider, sourceChain, switchNetwork, walletChainId, isConnected]);
|
|
2546
2546
|
(0, import_react76.useEffect)(() => {
|
|
2547
|
-
if (isConnected) {
|
|
2547
|
+
if (isConnected && sourceChain.compatibility === "EVM" /* EVM */) {
|
|
2548
2548
|
console.debug(
|
|
2549
2549
|
"useIsWalletReady:EVM: Dispatching source address:",
|
|
2550
2550
|
walletAddress
|
|
2551
2551
|
);
|
|
2552
|
+
console.log("dispatching evm address: ", walletAddress);
|
|
2552
2553
|
dispatch(setSourceAddress(walletAddress ?? ""));
|
|
2553
2554
|
}
|
|
2554
2555
|
}, [walletAddress, isConnected, dispatch]);
|
|
@@ -2798,8 +2799,7 @@ function useEvmAllowance() {
|
|
|
2798
2799
|
});
|
|
2799
2800
|
return await walletClient.signMessage({
|
|
2800
2801
|
account: walletAddress,
|
|
2801
|
-
message: `
|
|
2802
|
-
Target Address: ${data.targetAddress}
|
|
2802
|
+
message: `Target Address: ${data.targetAddress}
|
|
2803
2803
|
Target Chain: ${data.targetChain}
|
|
2804
2804
|
Target Symbol: ${data.targetSymbol}`
|
|
2805
2805
|
});
|
|
@@ -3112,13 +3112,12 @@ function useSolanaAllowance() {
|
|
|
3112
3112
|
return;
|
|
3113
3113
|
}
|
|
3114
3114
|
try {
|
|
3115
|
-
const message = `
|
|
3116
|
-
Target Address: ${data.targetAddress}
|
|
3115
|
+
const message = `Target Address: ${data.targetAddress}
|
|
3117
3116
|
Target Chain: ${data.targetChain}
|
|
3118
3117
|
Target Symbol: ${data.targetSymbol}`;
|
|
3119
3118
|
const encodedMessage = new TextEncoder().encode(message);
|
|
3120
3119
|
const signature = await signMessage(encodedMessage);
|
|
3121
|
-
return signature
|
|
3120
|
+
return `0x${Buffer.from(signature).toString("hex")}`;
|
|
3122
3121
|
} catch (error2) {
|
|
3123
3122
|
console.error("Error signing message:", error2);
|
|
3124
3123
|
throw error2;
|
|
@@ -3697,8 +3696,7 @@ function useTronAllowance() {
|
|
|
3697
3696
|
return;
|
|
3698
3697
|
}
|
|
3699
3698
|
try {
|
|
3700
|
-
const message = `
|
|
3701
|
-
Target Address: ${data.targetAddress}
|
|
3699
|
+
const message = `Target Address: ${data.targetAddress}
|
|
3702
3700
|
Target Chain: ${data.targetChain}
|
|
3703
3701
|
Target Symbol: ${data.targetSymbol}`;
|
|
3704
3702
|
const signedMessage = await signMessage(message);
|