-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: display Stark name in Sidebar #184
feat: display Stark name in Sidebar #184
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for the work
IMHO, i think there is no reason to create another snap method to get the name individually
instead the logic should bundle together in current recoverAccounts
if (!domain) return ''; | ||
const ellipsis = '...'; | ||
|
||
if (domain.length <= maxLength) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the domain always in eng? if not we may consider to verify the length by [...domain].length
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now yes, but it could change in the future so I updated this part
export const getStarkNameUtil = async (network: Network, userAddress: string) => { | ||
const provider = getProvider(network); | ||
return provider.getStarkName(userAddress); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add EOS
}; | |
}; | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so it's weird because there is one, but it's not showing
|
||
export interface GetStarkNameRequestParam extends BaseRequestParams { | ||
userAddress: string; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add EOS
} | |
} | |
|
||
export const getStarkNameUtil = async (network: Network, userAddress: string) => { | ||
const provider = getProvider(network); | ||
return provider.getStarkName(userAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check if the StarknetIdContract in sepolia
if yes, please pass in the sepolia StarknetIdContract when using sepolia
the current starknet.js does not contains sepolia contract in getStarknetIdContract
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not yet deployed, but it will be in the coming days. We plan on updating starknet.js with it as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is any update @irisdv
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made a PR to starknet.js adding the Sepolia contracts but it won't be deployed in production before a few weeks. I can add them in this PR, what do you think ?
I updated the code to get the stark name in |
Thank you very much for the work For SNAP For UI in such big changes, may be it is better to rollback to use your original implementation, a single snap api to get the starkname sorry for causing you the inconvenient |
d99b384
to
4703026
Compare
No worries, I rolled back to the previous version ! |
just keep the domain.length checking where you did |
2a29be5
to
4703026
Compare
done |
LGTM |
Close #183
This PR displays the user Stark name in the
Sidebar
component.To test it, you can use the python script
buy_domain
from this repo : https://github.com/irisdv/test_scripts