Hex string is too short error when using aptos-connect to interact with module function #712
Unanswered
BounebRayan
asked this question in
Questions
Replies: 1 comment
-
can you pad the address manually? petra probably pads it automatically but connect doesn't |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Discord user ID
No response
Describe your question in detail.
Hello everyone,
I'm running into an issue when using an aptos-connect wallet to interact with a function in my custom Aptos Move module. Whenever I attempt to call the function, I receive the following error:
Additional context:
I get the same error even when interacting with the function via the Aptos Explorer.
The exact same logic works perfectly when using Petra wallet.
The error only occurs with some FA values passed as arguments—others work fine.
I’ve verified that all values are valid hex strings prefixed with 0x.
Thanks in advance!
What error, if any, are you getting?
Unexpected error
Hex string is too short, must be 60 to 64 chars long, excluding the leading 0x. You may need to fix the address by padding it with 0s before passing it to fromString (e.g. .padStart(64, '0')). Received 0x123
What have you tried or looked at? Or how can we reproduce the error?
No response
Which operating system are you using?
Windows
Which SDK or tool are you using? (if any)
TypeScript SDK
Describe your environment or tooling in detail
No response
Beta Was this translation helpful? Give feedback.
All reactions