-
Notifications
You must be signed in to change notification settings - Fork 896
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(wallet) Remove IPFS NFT pinning feature #24064
Conversation
8e1b183
to
1965f6d
Compare
A Storybook has been deployed to preview UI for the latest push |
return token.logo.startsWith('ipfs://') | ||
? (await this.getIpfsGatewayTranslatedNftUrl(token.logo)) || '' | ||
: `chrome://erc-token-images/${token.logo}` | ||
return `chrome://erc-token-images/${token.logo}` |
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.
can we move this function out from the base cache now that it no longer needs an async call into core? Maybe to asset-utils?
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 thought about that change in context of my current task: brave/brave-browser#37735
I think we should not remove an ability to display NFT which have a address like: ipfs://ipfs://Qm...7MA
(I know it works for now, because we have IPFS schema support and tranlsation IPFS address on redirect)
I mean we should not change that lines, because when we remove local IPFS node and IPFS schema at all, we will not translate IPFS addresses automatically like it works now. We will need to do it manually (by call this.getIpfsGatewayTranslatedNftUrl(token.logo)
).
For example here is my draft PR: https://github.com/brave/brave-core/blob/35025563bf90a24b76e4ddca3b974435b9023f5b/components/brave_wallet_ui/common/async/base-query-cache.ts#L373-L375, I leaved that place unchanged.
I mean in case of NFT's address like ipfs://ipfs://Qm...7MA
we should call this.getIpfsGatewayTranslatedNftUrl(token.logo) for translation from ipfs://ipfs://Qm...7MA
to https://ipfs.io/ipfs/Qm...7MA
WDYT?
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.
@vadimstruts I agree, let's keep this function as is. I will make the change
@@ -9,7 +9,6 @@ export const LOCAL_STORAGE_KEYS = { | |||
HIDE_PORTFOLIO_NFTS_TAB: 'BRAVE_WALLET_HIDE_PORTFOLIO_NFTS_TAB', | |||
PORTFOLIO_ASSET_FILTER_OPTION: 'PORTFOLIO_ASSET_FILTER_OPTION', | |||
PORTFOLIO_TIME_LINE_OPTION: 'PORTFOLIO_TIME_LINE_OPTION', | |||
IS_IPFS_BANNER_HIDDEN: 'BRAVE_WALLET_IS_IPFS_BANNER_HIDDEN', |
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.
maybe move to the deprecated list so we can delete the data from the user's local storage?
699f5d4
to
c1f54d4
Compare
[puLL-Merge] - brave/brave-core@24064 DescriptionThis PR removes the NFT pinning feature and related code from the Brave Wallet codebase. The NFT pinning feature allowed users to pin their NFTs to a local IPFS node for extra security and backup. The removal impacts UI components, API endpoints, constants, styles, and utility functions across the Brave Wallet UI. The motivation for this change is not explicitly stated, but it appears the NFT pinning feature is being removed or discontinued. ChangesChangesThe main changes in this PR, organized by filename, are:
Various files under
In general, this is a cleanup PR that removes a discontinued feature and all its associated code. |
A Storybook has been deployed to preview UI for the latest push |
@@ -1555,7 +1555,7 @@ void BraveWalletService::Reset() { | |||
} | |||
|
|||
void BraveWalletService::DiscoverEthAllowances( | |||
DiscoverEthAllowancesCallback callback) { | |||
DiscoverEthAllowancesCallback callback) { |
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.
trailing space
This PR removes NFT pinning using IPFS from wallet frontend. This feature was introduced in this PR #16998
Resolves brave/brave-browser#38891
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: