-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/display address external link #221
Feat/display address external link #221
Conversation
@heronlancellot is attempting to deploy a commit to the Shared Blockful's projects Team on Vercel. A member of the Team first needs to authorize it. |
lib/client/ui-utils.ts
Outdated
if (!token.contract) { | ||
address = (token as ERC721).contractMetadata?.address; | ||
} else { | ||
address = new EthereumAddress(token.contract as 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.
if (!token.contract) { | |
address = (token as ERC721).contractMetadata?.address; | |
} else { | |
address = new EthereumAddress(token.contract as string); | |
} | |
if (!token.contract) { | |
address = (token as ERC721).contractMetadata?.address; | |
} else if (typeof token.contract === "string") { | |
address = new EthereumAddress(token.contract); | |
} | |
if (!address) throw new Error(`Token contract address not defined for ${getTokenName(token)}`) |
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.
Address is not yet defined so the proposal will not work, I changed in a way to accept undefined as well but throwing for it. Also changed the conditionals into a double ternary
- duplicated check on address Co-authored-by: frankind.eth <49823133+FrancoAguzzi@users.noreply.github.com>
Co-authored-by: frankind.eth <49823133+FrancoAguzzi@users.noreply.github.com>
Closes #213