Skip to content

Conversation

@hernan-clich
Copy link
Member

@hernan-clich hernan-clich commented Oct 31, 2025

Dynamic issue

I'm currently integrating wallet connectivity with Sui in our project and noticed that when I switch to my Sui account (I'm using Slush if that's of any importance), I get the following error:
[WalletConnector] [ERROR]: InvalidAddressError: Address "0xe134401c54397d5497012f1d70960b8d57dc8b6725035277260debf464cf78e7" is invalid.

- Address must be a hex value of 20 bytes (40 hex characters).
- Address must match its checksum counterpart.

The pattern is:
I connect with an EVM only account.
I link a new Sui wallet on the dynamic widget
I switch to the Sui wallet, making it the primary wallet
I close the tab, do other things, the wallet automatically disconnects after some time (I assume the same would happen if I explicitly log out)
I get this error

I think this is probably due to it attempting to sign a tx on Ethereum during the login process with a Sui wallet, but unfortunately there's no instance to switch to the EVM wallet before facing this error.
image

Todos

  • Ensure the aforementioned bug is fixed by Dynamic before merging.

Summary

Added Sui wallet integration utilities, enabling type-safe extraction of Sui wallet clients and typed wallet instances from Dynamic Labs' primaryWallet.

Key Changes

  • getSuiWalletClient() - Extracts SuiClient from primaryWallet for transaction execution
  • getSuiWallet() - Returns typed SuiWallet instance for transaction signing
  • Both functions use isSuiWallet() type guard for runtime validation

@hernan-clich hernan-clich changed the title feat: Add Sui support and helpers [BLOCKED] feat: Add Sui support and helpers Oct 31, 2025
@hernan-clich hernan-clich requested a review from fadeev October 31, 2025 16:56
@hernan-clich hernan-clich marked this pull request as draft October 31, 2025 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants