-
Notifications
You must be signed in to change notification settings - Fork 45
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
fix: improve fuzzing #449
fix: improve fuzzing #449
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
📊 Package size report No changes
Unchanged files
🤖 This report was automatically generated by pkg-size-action |
@@ -1,7 +1,11 @@ | |||
export type Address = { | |||
export type SearchItem = { |
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.
renamed as i found it super confusing (given Address is 0xstring in viem)
threshold: 0.2, | ||
ignoreLocation: true, | ||
// ignoreLocation: false, |
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.
not ignoring location rates lib.oracle
> lib.asset.oracle
which is what we want.
import Fuse, { FuseResult } from 'fuse.js'; | ||
import { Box } from './Box'; | ||
import { SearchResult } from './SearchResult'; | ||
|
||
const fuseOptions = { | ||
includeScore: true, | ||
keys: ['searchPath', 'value'], | ||
keys: ['searchPath', 'value', 'library', 'key'], |
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.
adding the root (library) and the end (key) as dedicated results makes the behavior more natural as in this case locationSearch will no longer consider the distance (given oracle
would exact match the key)
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!
No description provided.