-
Notifications
You must be signed in to change notification settings - Fork 33
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
FE Release [2024-08-06] #2978
FE Release [2024-08-06] #2978
Conversation
* Linea + Blast RFQ FastBridge deployments * add linea fast bridge address * lint * lint * rm create2factory
* Fetch and store Maintenance data * Construct maintenance lists from fetched data * Use state to construct Maintenance components * Maintenance components working except for countdown * useMaintenance exports bridge maintenance components * Add Swap maintenance components in useMaintenance * Maintenance Banners exported from useMaintenance * Clean * Text size in Progress Bar * Prevent active chain pause clashes between diff instances * Clean * Use fetched paused bridge module list in Bridge * Clean * Organize * Type Maintenance State * Lift isFetching status to store * Organize * Add tests for fetchJSONData, implement retries * Use local data source as backup when fetch retries fail * useMaintenanceListener * Clean, fix current chain pause selection when only single pause exists * Clean, use jsdelivr urls * Revert package.json, remove jest command * Resolve file name * Add randomized query params to cache bust git rest api * Test URLs * Revert changes * No cache fetch request, update to gh pages cdn url * yarn * useSynapsePauseData hook (#2921)
- @synapsecns/[email protected]
- @synapsecns/[email protected]
* Compare against 0xee * Use constant defined ethereum address --------- Co-authored-by: abtestingalpha <[email protected]>
- @synapsecns/[email protected]
Co-authored-by: Trajan0x <[email protected]>
…aps (#2955) * feat: add FB Router to generateMaps * fix: filter out very old RFQ data * feat: rework RFQ bridge map generation * cleanup: remove deprecated `extractBridgeSymbolsMap` * build: regenerate maps * fix: generate swappable lists on chains w/o SynapseRouter * build: regenerate
- @synapsecns/[email protected]
* Lint fix * Refactor named functions to arrow functions per lint * Fix errors * cleaning up all linting problems --------- Co-authored-by: defi-moses <[email protected]>
* `formatAmount` * Show greater than minimum value if amount is zero (assume no bridge tx has absolute zero value)
- @synapsecns/[email protected]
Co-authored-by: Trajan0x <[email protected]>
* Format raw bigint value in transaction * Display full amount on hover
- @synapsecns/[email protected]
* Feat: configure Confirmations * [goreleaser] * Fix: build * [goreleaser] * [goreleaser]
* [goreleaser] * small optimizaiton * [goreleaser] * better
* feat: add option to exclude RFQ quotes * feat: scaffold passing originUserAddress * feat: encode user's origin address in rawParams for RFQ * feat!: introduce a single bridge quote options object BREAKING CHANGE: The `bridgeQuote` and `allBridgeQuotes` functions now accept an options object instead of individual optional parameters. * docs: new options * test: update * test: cleanup * fix: make `createRFQDestQuery` static, expose for tests * test: add unit tests for `createRFQDestQuery` * feat: use FastBridgeRouterV2 address * docs: be more explicit about smart contract integrations * docs: add address section * docs: strike through deprecated addresses * feat: use newest address * docs: more explicit language * docs: be more explicit in README as well * fix: update docs link, slippage wording
- @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected] - @synapsecns/[email protected]
* decimals implementation * add test * add test * lint * [goreleaser] * handle native gas token * combine into Validate func * commnent * [goreleaser] * better call to loadconfig and abstract away validate * abstract away validate * [goreleaser] --------- Co-authored-by: Trajan0x <[email protected]>
…uotes (#2969) * feat: pass connected address as `originUserAddress` option * feat: use `originUserAddress` option for gas estimation
- @synapsecns/[email protected]
Important Review skippedMore than 25% of the files skipped due to max files limit. The review is being skipped to prevent a low-quality review. 131 files out of 184 files are above the max files limit of 50. Please upgrade to Pro plan to get higher limits. You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## fe-release #2978 +/- ##
================================================
Coverage ? 25.84352%
================================================
Files ? 775
Lines ? 55689
Branches ? 116
================================================
Hits ? 14392
Misses ? 39812
Partials ? 1485
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Bundle ReportChanges will decrease total bundle size by 9.52MB ⬇️
|
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.
PR Summary
This pull request introduces several changes across multiple components of the Sanguine project, focusing on improving functionality, performance, and code quality. Here's a summary of the key changes:
- Enhanced Chainalysis API client with caching for address screening results
- Updated transaction handling and querying in the submitter package
- Added support for new networks (Blast and Linea) in the contracts-rfq package
- Improved UI components in the explorer-ui package
- Minor version updates and changelog entries
Key points to consider:
- The Chainalysis API client improvements may need further review for potential caching strategy and error handling issues
- New FastBridge.json files for Blast and Linea networks are missing 'receipt' and 'abi' fields, which could cause functionality issues
- The ScrollToTop component in the explorer-ui package has several issues that need addressing, including unused variables and unclear functionality
- Some components in the explorer-ui package have TypeScript ignores present, which could lead to type-related issues
29 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings
if _, ok := c.registrationCache.Get(address); ok { | ||
return true, nil | ||
} |
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.
logic: This caching strategy may lead to false positives. Consider caching both positive and negative results with an expiration time.
risk := fastjson.GetString(resp.Body(), "risk") | ||
return slices.Contains(c.riskLevels, risk), nil | ||
|
||
if slices.Contains(c.riskLevels, risk) { | ||
c.registrationCache.Set(address, struct{}{}) | ||
return true, nil | ||
} |
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.
style: Only caching risky addresses may lead to unnecessary API calls for non-risky addresses that have been checked before.
func ParseOptions(opts ...Option) OptionsFetcher { | ||
myOptions := &options{ | ||
statuses: nil, | ||
maxResults: DefaultMaxResultsPerChain, // Default to 0 for no limit. |
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.
syntax: Comment is incorrect. Default is set to DefaultMaxResultsPerChain (10), not 0
@@ -123,10 +118,11 @@ func (s *Store) GetDistinctChainIDs(ctx context.Context) ([]*big.Int, error) { | |||
// GetTXS returns all transactions for a given address on a given (or any) chain id that match a given status. | |||
// there is a limit of 50 transactions per chain id. The limit does not make any guarantees about the number of nonces per chain. | |||
// the submitter will get only the most recent tx submitted for each chain so this can be used for gas pricing. | |||
func (s *Store) GetTXS(ctx context.Context, fromAddress common.Address, chainID *big.Int, matchStatuses ...db.Status) (txs []db.TX, err error) { | |||
func (s *Store) GetTXS(ctx context.Context, fromAddress common.Address, chainID *big.Int, options ...db.Option) (txs []db.TX, err error) { |
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.
style: update comment to reflect new option-based approach
{ | ||
"address": "0x34F52752975222d5994C206cE08C1d5B329f24dD", | ||
"constructorArgs": "0x000000000000000000000000bd88862fcc17de436f7bd17276c537acadda9a67" | ||
} |
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.
logic: Missing 'receipt' and 'abi' fields. Check if these are required for system functionality.
@@ -1,6 +1,6 @@ | |||
import { useEffect } from 'react' | |||
|
|||
export function ScrollToTop() { | |||
export const ScrollToTop = () => { | |||
const pathname = '' |
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.
logic: pathname is unused. Remove or use useRouter to set it
Description
A clear and concise description of the features you're adding in this pull request.
Additional context
Add any other context about the problem you're solving.
Metadata
0f58744: synapse-interface preview link
0f58744: explorer-ui preview link