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

Adds try catch to prevent app crashing #1762

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Jan 7, 2024

null
79bf413c68c60584061bc985fb1fa7348758a2bd: 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.

@aureliusbtc aureliusbtc merged commit 410ebdb into sdk/add-rfq Jan 7, 2024
37 checks passed
@aureliusbtc aureliusbtc deleted the try-catch branch January 7, 2024 14:27
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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants