-
Notifications
You must be signed in to change notification settings - Fork 333
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: ✨ Add spamFilteringTx in LLD #7911
feat: ✨ Add spamFilteringTx in LLD #7911
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
4 Skipped Deployments
|
ce9ee33
to
3bb906f
Compare
apps/ledger-live-desktop/src/renderer/hooks/useSyncNFTsWithAccounts.ts
Outdated
Show resolved
Hide resolved
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've added an optional suggestion. but it's a nice and clean work 👏
3bb906f
to
fe927b7
Compare
export const ONE_DAY = 24 * 60 * 60 * 1000; | ||
export const HALF_DAY = ONE_DAY / 2; |
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.
Should this be defined here or imported from libs/ledger-live-common/src/market/utils/timers.ts
? Because I don't see HALF_DAY
imported anywhere.
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.
perhaps we could consider a file with all the timers, as this one is specific to the market, for example ? 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.
Yes it's good too but what I suggested here here was either:
-
To import
ONE_DAY
andHALF_DAY
fromledger-live-common/src/market/utils/timers
-
Or to remove
HALF_DAY
fromledger-live-common/src/market/utils/timers
and remove theexport
from the declaration:Suggested changeexport const ONE_DAY = 24 * 60 * 60 * 1000; export const HALF_DAY = ONE_DAY / 2; const ONE_DAY = 24 * 60 * 60 * 1000; const HALF_DAY = ONE_DAY / 2;
It's a detail but since HALF_DAY
is not imported anywhere it looks like extra unused code right now. Unless of course if you're planning to use it later.
bf44241
to
d510372
Compare
6a8e4d2
to
dfa5ee1
Compare
d510372
to
aa9ccfe
Compare
972e404
to
93eadf1
Compare
aa9ccfe
to
38ffc44
Compare
93eadf1
to
ca467ec
Compare
38ffc44
to
d5fe6ae
Compare
f32c6e9
to
7af1be4
Compare
apps/ledger-live-desktop/src/renderer/hooks/nfts/useSyncNFTsWithAccounts.ts
Outdated
Show resolved
Hide resolved
...-live-desktop/src/renderer/screens/settings/sections/Accounts/HiddenNFTCollections/index.tsx
Outdated
Show resolved
Hide resolved
...er-live-desktop/src/renderer/screens/settings/sections/Accounts/HiddenNFTCollections/row.tsx
Show resolved
Hide resolved
expect(mapChain(BlockchainEVM.Avalanche)).toEqual("avalanche"); | ||
}); | ||
|
||
it("mapChains", () => { |
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.
Suggestion it("should map a multiple chains")
696f6cc
to
04cac3c
Compare
04cac3c
to
8be765b
Compare
8be765b
to
4665522
Compare
4665522
to
a3d3d75
Compare
a3d3d75
to
a96bcd1
Compare
a96bcd1
to
5a9c4c3
Compare
feat: ✨ Add spamFilteringTx hook in global review: Enums
Fix some UI broken + improve SimpleHash tool
test: ✅ Add tests for new Hooks Check when adding new address ✅ Add tests for new Hooks
5a9c4c3
to
3f90142
Compare
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 works well! Well done!
✅ Checklist
npx changeset
was attached.Transaction Filtering:
Implementation of a new feature to filter transactions involving spam NFTs. This ensures that only valid and relevant transactions are considered within the system.
Whitelist and Enhancement of HiddenCollection:
Addition of a whitelist to control the addresses and accounts authorized to interact with the system, enhancing the security and reliability of processed transactions.
Improvements made to the HiddenCollection object to optimize the management and storage of
hidden
NFT collections.Automatic Synchronization:
Implementation of automatic synchronization every 6 hours to refresh and filter NFTs via the Simplehash API. This ensures that the data remains up-to-date and relevant.
Refresh on Account Addition:
When new accounts or addresses are added, the filtering request is automatically re-triggered. This guarantees that new entries are immediately taken into account in the filtering process.
Add loading "Show more collections" to avoid load everything fully
📝 Description
0 - News
1 - Tests
2 - Feature
0 - What's new
useNftGalleryFilter
useNftCollections
used instead in each file that was usinguseNftGalleryFilter
HiddenCollection
andWhitelist
NFTs1 - TESTS Feature with SimpleHashTool + TanStackQuery
Test if we have more than 20 address if check is done on other groups
Screen.Recording.2024-09-25.at.14.41.07.mov
Adding a new account
Screen.Recording.2024-09-25.at.15.21.38.mov
Test FF
Screen.Recording.2024-09-25.at.16.22.37.mov
2 - Spam Filtering
Screen.Recording.2024-10-28.at.16.21.13.mov
Screen.Recording.2024-10-28.at.16.22.19.mov
❓ Context
🧐 Checklist for the PR Reviewers