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

Fe/sorting wip #1770

Merged
merged 27 commits into from
Jan 8, 2024
Merged

Fe/sorting wip #1770

merged 27 commits into from
Jan 8, 2024

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Jan 7, 2024

null
ec5c949020ecf545095e8b6661090a6d00f3fc57: synapse-interface preview link
022f0cc8fa54653ae600a95d53b3df88396551b2: synapse-interface preview link
5ab41d90392f8ea20f7fee58ce2324b5597e4ad8: synapse-interface preview link
774406cb93a0078583485b5f4b515f48f2f12f54: synapse-interface preview link
7926e5acd26c725835a0ca7dfb5e578b0eaea014: synapse-interface preview link
2a2c2962833ae32ea1ae8777157e54d57e1b83ea: synapse-interface preview link
6bda7444fc957164380282e46834eaedd1c8af88: synapse-interface preview link
38f46507321625a94090b0726933565a21db0267: synapse-interface preview link
21da39ec13ce4e16e2f729bb000f8d2dbeb42be4: synapse-interface preview link
075a578de62ecc9f14adcf3d7fed171dd525f3aa: synapse-interface preview link
aca915a25cd1a34a0ff265263c3dcdf4dcb8b7f8: synapse-interface preview link
f9ca32ad4d946ea481b7b2bcd6094aeb2bd936b4: synapse-interface preview link
ddec5021f09ee9a2ed5b28210fef4f6633e19d8b: synapse-interface preview link
a88407e88a7b9a9047cd5fad9d5c7a94a0fc674f: synapse-interface preview link
549d9e2930e89f102a564ec3b51ee732eb5a0e14: synapse-interface preview link
8572f41d99218f6ebdea332608f3e828dba398a3: synapse-interface preview link
cee6c3a7bb45d27982bf0055cc67577949d9f810: synapse-interface preview link
4e23209413c9bb7d9c03f31e82893c01d4161b4d: synapse-interface preview link
5231a9d2ccdd3046a114cbe0caf8147b63b0d2ea: synapse-interface preview link

Copy link
Contributor

coderabbitai bot commented Jan 7, 2024

Important

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

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?

Share

Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit tests for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository from git and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit tests.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

codecov bot commented Jan 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b1e6301) 52.05070% compared to head (3294272) 52.05070%.

Additional details and impacted files
@@               Coverage Diff               @@
##           sdk/add-rfq       #1770   +/-   ##
===============================================
  Coverage     52.05070%   52.05070%           
===============================================
  Files              366         366           
  Lines            24772       24772           
  Branches           295         295           
===============================================
  Hits             12894       12894           
  Misses           10636       10636           
  Partials          1242        1242           
Flag Coverage Δ
packages 92.93044% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

cloudflare-workers-and-pages bot commented Jan 7, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3294272
Status: ✅  Deploy successful!
Preview URL: https://7c000f6b.sanguine.pages.dev
Branch Preview URL: https://fe-sorting.sanguine.pages.dev

View logs

@trajan0x trajan0x mentioned this pull request Jan 8, 2024
33 tasks
@aureliusbtc aureliusbtc merged commit d0e6a01 into sdk/add-rfq Jan 8, 2024
39 of 41 checks passed
@aureliusbtc aureliusbtc deleted the fe/sorting branch January 8, 2024 10:43
ChiTimesChi added a commit that referenced this pull request Jan 8, 2024
* ChainToken marshalling

* Ticker marshalling

* Chore: docs

* Scaffold FastBridge class

* Scaffold FastBridgeSet class

* Implement `getBridgeRoutes`

* Add some initial values for RFQ contracts

* Add coverage for `createNoSwapQuery`

* Add fastBridgeContract

* Implement `fastBridge.bridge()`

* Initialize set of FastBridge modules

* FastBridgeQuote type for current Quote structure

* Add `applyQuote()`

* Adjust getBridgeRoutes to current API

* Implement `getAllQuotes`

* Add API unit tests, make SDK tests pass

* Add node-fetch@^2 for integration tests

* Add URL, integration test

* Add unit tests for quote pricing

* Add some tests around zero quotes

* Hardcode rounding tests

* Use correct pricing algo

* Add tests for FastBridgeSet

* Fix: properly implement quote filtering

* Add some units tests for FastBridge class

* Mainnet API URL

* Draw the rest of the owl

* Fix: incorrect invariant

* Temp FE fix: don't apply slippage to RFQ

* [DROP IN PROD] Use local SDK for build

* Add tests for expected `bridge()` behavior

* Use correct tx.value

* [REVERT IN PROD] up the deadline for RFQ

* Update FastBridge bindings

* Temp fix: support origin sender address

* Update FastBridge addresses

* Use only quotes with age of [0 .. 5) minutes

* Skip tests: sending with non-zero gas rebate

* Temp fix for zero gas airdrop for RFQ

* Include origin/dest FastBridge address in api response

* Discard quotes with non-relevant FastBridge address

* Update addresses

* Fix: tests

* try to add rfq bridgestatus sdk call to fe

* Fix: use snake case for api quote schema

* Fix: tests

* yarn lint:fix

* Coverage for RFQ tracking

* SDK: fix median time

* Start using SDK to check status earlier

* Revert "[REVERT IN PROD] up the deadline for RFQ"

This reverts commit 8fae090.

* Add bridgeTransactions reducer to host updated Txn flow

* Expose helper hook `useBridgeTransactionsState`

* _Transaction component using SDK for status

* _Transactions component to render individual _Transaction

* Implement SDK-based Pending Transaction flow

* Persist _Transaction slice

* _Transaction tracking newly fired txs

* Provide Origin/Destination Token/Chain into _Transaction

* Basic styled _Transaction component with SDK tracking

* Add spacing between Tx

* Updated FE transaction time estimation logic and interval check frequency

* Revised the logic for estimating transaction completion time in _Transaction.tsx. Now, the system starts checking for transaction completion a few minutes before the estimated completion time.
* Reduced the interval for checking the current time in _Transactions.tsx from 30 seconds to 5 seconds.

* Adds try catch to prevent app crashing (#1762)

* Fe/sorting wip (#1770)

* Sorting wip

* Show by latest

* Merging sorting-j

* Hides debugging related kappa and time

* debug why new type isnt recognized

* Convert transactions object to list

* Render transactions in list

* Check tx is stored before adding into _transaction

* Check tx has been confirmed before adding to _transaction store

* Sorting by descending timestamp

* Allow clear tx functionality to persist

* back to optimism mainnet rpc

* Prevent refiring tx sdk queries if already complete

* Mark tx as complete once kappa and isTxComplete avail

* Check if store marked Tx complete before firing tx status hook, render persisted tx status

* `useBridgeTxStatus` hook initialized to set isComplete to true if kappa exists, save call

* Revert prev commit, require check on tx status beyond kappa avail

* Utilize `checkStatus` as guardrail check in `useBridgeTxStatus`

* removes unused prop

* removes another unused prop

* Hide debugging meta

* Hide debugging meta

* limits to 5 txns

* align time

---------

Co-authored-by: bigboydiamonds <[email protected]>

* Chore: fix lint

* Revert "[DROP IN PROD] Use local SDK for build"

This reverts commit 32dcaf6.

---------

Co-authored-by: aureliusbtc <[email protected]>
Co-authored-by: Daniel Wasserman <[email protected]>
Co-authored-by: bigboydiamonds <[email protected]>
Co-authored-by: abtestingalpha <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants