@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.js CHANGED
@@ -2561,11 +2561,12 @@ function useIsWalletReady() {
2561
2561
  checkChainId();
2562
2562
  }, [externalProvider, sourceChain, switchNetwork, walletChainId, isConnected]);
2563
2563
  useEffect(() => {
2564
- if (isConnected) {
2564
+ if (isConnected && sourceChain.compatibility === "EVM" /* EVM */) {
2565
2565
  console.debug(
2566
2566
  "useIsWalletReady:EVM: Dispatching source address:",
2567
2567
  walletAddress
2568
2568
  );
2569
+ console.log("dispatching evm address: ", walletAddress);
2569
2570
  dispatch(setSourceAddress(walletAddress ?? ""));
2570
2571
  }
2571
2572
  }, [walletAddress, isConnected, dispatch]);
@@ -2822,8 +2823,7 @@ function useEvmAllowance() {
2822
2823
  });
2823
2824
  return await walletClient.signMessage({
2824
2825
  account: walletAddress,
2825
- message: `Amount: ${allowanceNumber}
2826
- Target Address: ${data.targetAddress}
2826
+ message: `Target Address: ${data.targetAddress}
2827
2827
  Target Chain: ${data.targetChain}
2828
2828
  Target Symbol: ${data.targetSymbol}`
2829
2829
  });
@@ -3150,13 +3150,12 @@ function useSolanaAllowance() {
3150
3150
  return;
3151
3151
  }
3152
3152
  try {
3153
- const message = `Amount: ${allowanceNumber}
3154
- Target Address: ${data.targetAddress}
3153
+ const message = `Target Address: ${data.targetAddress}
3155
3154
  Target Chain: ${data.targetChain}
3156
3155
  Target Symbol: ${data.targetSymbol}`;
3157
3156
  const encodedMessage = new TextEncoder().encode(message);
3158
3157
  const signature = await signMessage(encodedMessage);
3159
- return signature;
3158
+ return `0x${Buffer.from(signature).toString("hex")}`;
3160
3159
  } catch (error2) {
3161
3160
  console.error("Error signing message:", error2);
3162
3161
  throw error2;
@@ -3741,8 +3740,7 @@ function useTronAllowance() {
3741
3740
  return;
3742
3741
  }
3743
3742
  try {
3744
- const message = `Amount: ${allowanceNumber}
3745
- Target Address: ${data.targetAddress}
3743
+ const message = `Target Address: ${data.targetAddress}
3746
3744
  Target Chain: ${data.targetChain}
3747
3745
  Target Symbol: ${data.targetSymbol}`;
3748
3746
  const signedMessage = await signMessage(message);