hero-org/herocast

Fix account renaming

Closed this issue · 1 comments

Short description:
Fail to make post call to the offchain farcaster username endpoint (https://fnames.farcaster.xyz/transfers) with error UNAUTHORIZED.
I'm checking that the connected wallet owns the FID and that the new username isn't used already.

Code: https://github.com/hellno/herocast/blob/9bb982e5eb007e26a9b30fc7ccc60b3f5bc3f8c5/src/common/components/RenameAccountForm.tsx#L192

Steps to reproduce:

  1. Go to https://app.herocast.xyz/settings
  2. Click on rename of any account (best case don't use your main account)
  3. Enter new username, click rename and sign the message
  4. See error message below:
image

Network tab:
image

Request error:
image

I've changed the fids to numbers in the post request payload. apparently this was throwing an unauthorized error in the endpoint. 👀
now I'm getting INVALID_FID_OWNER. I'm confirm before sending that the wallet that is signing the message owns the fid. calling ID_REGISTRY.idOf onchain

telegram-cloud-photo-size-2-5409361887856021218-x

telegram-cloud-photo-size-2-5409361887856021253-y