Skip to content
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

Merged

Conversation

heronlancellot
Copy link
Member

Closes #213

  • created new component BlockExplorerExternalLinkButton.tsx
  • fix word correction in search-bar
  • adjust the ApproveTokenCard to fill the address + external link
  • moved setTokenApprovalStatus(TokenApprovalStatus.APPROVE_IN_YOUR_WALLET) to else condition in ApproveTokenCard
  • add getTokenContract() to get the contractAddress

Copy link

vercel bot commented Mar 15, 2024

@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.

@heronlancellot heronlancellot requested review from FrancoAguzzi and eduramme and removed request for FrancoAguzzi March 15, 2024 21:53
components/01-atoms/BlockExplorerExternalLinkButton.tsx Outdated Show resolved Hide resolved
components/01-atoms/BlockExplorerExternalLinkButton.tsx Outdated Show resolved Hide resolved
Comment on lines 73 to 77
if (!token.contract) {
address = (token as ERC721).contractMetadata?.address;
} else {
address = new EthereumAddress(token.contract as string);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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)}`)

Copy link
Contributor

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

@0xneves 0xneves merged commit 0cb3201 into blockful-io:develop Mar 21, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants