Skip to content

chore: use unchained proxy endpoints over nownodes proxy #6606

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

Merged
merged 2 commits into from
Apr 3, 2024

Conversation

kaladinlight
Copy link
Contributor

Description

Instead of using api gateway to proxy nownodes jsonrpc requests, leverage our existing unchained apis for proxying requests. This gives us more control over the proxy endpoints if we ever need and should cut down on some cost related to usage of the api gateway resource.

Pull Request Type

  • 🐛 Bug fix (Non-breaking Change: Fixes an issue)
  • 🛠️ Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
  • 💅 New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

shapeshift/unchained#957

Risk

High Risk PRs Require 2 approvals

Low

What protocols, transaction types or contract interactions might be affected by this PR?

Testing

  • Ensure all node rpc requests still work as expected
    • search for api/v1/jsonrpc in network tab and verify there are no failed requests

Engineering

☝️

Operations

☝️

Screenshots (if applicable)

@kaladinlight kaladinlight requested a review from a team as a code owner March 29, 2024 16:45
@woodenfurniture woodenfurniture self-assigned this Apr 3, 2024
@woodenfurniture
Copy link
Contributor

woodenfurniture commented Apr 3, 2024

When doing an allowance approval I'm seeing consistent http 422 on this PR compared to prod for avalanche eth_blockNumber

Prod
image

This PR

"Could not match the union against any of the items. Issues: [{\"body.params\":{\"message\":\"'params' is required\"}},{\"body.$0.params\":{\"message\":\"'params' is required\"}}]"

image

@kaladinlight
Copy link
Contributor Author

@woodenfurniture pushing this fix: shapeshift/unchained#968

Copy link
Contributor

@woodenfurniture woodenfurniture left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
image

@kaladinlight kaladinlight enabled auto-merge (squash) April 3, 2024 22:23
@kaladinlight kaladinlight merged commit faa414f into develop Apr 3, 2024
3 checks passed
@kaladinlight kaladinlight deleted the unchained-jsonrpc-proxy-endpoints branch April 3, 2024 22:28
This was referenced Apr 7, 2024
0xApotheosis added a commit that referenced this pull request Apr 10, 2024
* add watch asset functionality

* feat: regenerate asset data 04/02/2024 (#6620)

* feat: disable sym deposits after RUNE (#6622)

* fix: don't bork asset generation on idle API failures (#6619)

* feat: collect 0x trade surplus (#6625)

* feat: bottom sheet dialog (#6623)

* add bottom sheet dialog

* try out vaul

* hook up send

* Create SubPage.tsx

* adjusting dialog header

* Update DialogCloseButton.tsx

* add new action menu

* updates

* update more height stuff

* use 100dvh instead of vh

* use 100vh

* anchor footer at the bottom of the screen

* update new asset search

* Update SelectAssets.tsx

* add min height for regular modals

* Update MobileNavBar.tsx

* remove extra stuff not needed for PR

* remove more stuff not for this PR

* Update AddressInput.tsx

* Update AddressInput.tsx

* Update Dialog.tsx

* Update SelectAssets.tsx

* fix for dialog height

* Update AssetSearch.tsx

---------

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

* chore: use unchained proxy endpoints over nownodes proxy (#6606)

* feat: use proxy validation endpoint (#6626)

* feat: use proxy validation endpoint

* chore: improve fn name

* update endpoint

* fix: csp

* fix: tests

* chore: use shapeshift proxy csp

* chore: fail open

---------

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

* feat: many migrations (#6631)

* fix: remove portal on account dropdown (#6635)

* account down remove portal

* Update StepRow.tsx

* feat: cow affiliate fees (#6621)

* chore: update app translations (#6638)

* chore: invalidate outdated translations

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

---------

Co-authored-by: Hellhound13 <[email protected]>
Co-authored-by: Jpanam <[email protected]>
Co-authored-by: yuki <[email protected]>
Co-authored-by: guiribabrb <[email protected]>
Co-authored-by: Markus Meyer <[email protected]>
Co-authored-by: Romko <[email protected]>
Co-authored-by: tonyjiang12399 <[email protected]>

* feat: cow quote/unsigned order build cleanup (#6639)

* feat: getFullAppData tests

* feat: cow quote/unsigned order build cleanup

* fix: deep merge opportunities accounts (#6627)

* feat: regenerate asset data 04/04/2024 (#6636)

Co-authored-by: GitHub Action <[email protected]>

* fix: defi aggregated opportunities uniqBy id first (#6628)

* fix: zapperAssetToMaybeAssetId handle base-token as native asset

* fix: filter unique opportunities by id first

* Revert "fix: zapperAssetToMaybeAssetId handle base-token as native asset"

This reverts commit 1ed1a59.

* feat: lending loan summary repayment lock (#6642)

* fix: mobile dashboard routing (#6637)

* feat: thorchain lp disable max deposits (#6645)

* feat: uni-v2 pools static generation (#6629)

* feat: uni-v2 pools static generation

* feat: revert DynamicLpAssets flag

* feat: regen

* feat: cleanup asset upserty bits

* feat: regen

* feat: regenerate asset data 04/08/2024 (#6648)

* feat: thorchain LP charts (#6624)

* add home page

* trigger ci

* Update AssetActions.tsx

* feat: tag foxy as expired opportunity (#6651)

* fix: empty my position pools page (#6656)

Update YourPositions.tsx

* Update src/pages/Home/Home.tsx

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

* Update src/state/slices/preferencesSlice/preferencesSlice.ts

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

* rename to assetIds

* rework the avatar

* more comments

* add top assets default

* feat: naming

---------

Co-authored-by: woodenfurniture <[email protected]>
Co-authored-by: gomes <[email protected]>
Co-authored-by: Apotheosis <[email protected]>
Co-authored-by: kevin <[email protected]>
Co-authored-by: firebomb1 <[email protected]>
Co-authored-by: Hellhound13 <[email protected]>
Co-authored-by: Jpanam <[email protected]>
Co-authored-by: yuki <[email protected]>
Co-authored-by: guiribabrb <[email protected]>
Co-authored-by: Markus Meyer <[email protected]>
Co-authored-by: Romko <[email protected]>
Co-authored-by: tonyjiang12399 <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Co-authored-by: Apotheosis <[email protected]>
0xApotheosis added a commit that referenced this pull request Apr 16, 2024
* feat: regenerate asset data 04/02/2024 (#6620)

* feat: disable sym deposits after RUNE (#6622)

* fix: don't bork asset generation on idle API failures (#6619)

* feat: collect 0x trade surplus (#6625)

* feat: bottom sheet dialog (#6623)

* add bottom sheet dialog

* try out vaul

* hook up send

* Create SubPage.tsx

* adjusting dialog header

* Update DialogCloseButton.tsx

* add new action menu

* updates

* update more height stuff

* use 100dvh instead of vh

* use 100vh

* anchor footer at the bottom of the screen

* update new asset search

* Update SelectAssets.tsx

* add min height for regular modals

* Update MobileNavBar.tsx

* remove extra stuff not needed for PR

* remove more stuff not for this PR

* Update AddressInput.tsx

* Update AddressInput.tsx

* Update Dialog.tsx

* Update SelectAssets.tsx

* fix for dialog height

* Update AssetSearch.tsx

---------

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

* chore: use unchained proxy endpoints over nownodes proxy (#6606)

* feat: use proxy validation endpoint (#6626)

* feat: use proxy validation endpoint

* chore: improve fn name

* update endpoint

* fix: csp

* fix: tests

* chore: use shapeshift proxy csp

* chore: fail open

---------

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

* feat: many migrations (#6631)

* fix: remove portal on account dropdown (#6635)

* account down remove portal

* Update StepRow.tsx

* feat: cow affiliate fees (#6621)

* chore: update app translations (#6638)

* chore: invalidate outdated translations

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

* Translate main.json via GitLocalize

---------

Co-authored-by: Hellhound13 <[email protected]>
Co-authored-by: Jpanam <[email protected]>
Co-authored-by: yuki <[email protected]>
Co-authored-by: guiribabrb <[email protected]>
Co-authored-by: Markus Meyer <[email protected]>
Co-authored-by: Romko <[email protected]>
Co-authored-by: tonyjiang12399 <[email protected]>

* feat: cow quote/unsigned order build cleanup (#6639)

* feat: getFullAppData tests

* feat: cow quote/unsigned order build cleanup

* fix: deep merge opportunities accounts (#6627)

* feat: regenerate asset data 04/04/2024 (#6636)

Co-authored-by: GitHub Action <[email protected]>

* fix: defi aggregated opportunities uniqBy id first (#6628)

* fix: zapperAssetToMaybeAssetId handle base-token as native asset

* fix: filter unique opportunities by id first

* Revert "fix: zapperAssetToMaybeAssetId handle base-token as native asset"

This reverts commit 1ed1a59.

* feat: lending loan summary repayment lock (#6642)

* fix: mobile dashboard routing (#6637)

* feat: thorchain lp disable max deposits (#6645)

* feat: uni-v2 pools static generation (#6629)

* feat: uni-v2 pools static generation

* feat: revert DynamicLpAssets flag

* feat: regen

* feat: cleanup asset upserty bits

* feat: regen

* feat: regenerate asset data 04/08/2024 (#6648)

* feat: thorchain LP charts (#6624)

* feat: tag foxy as expired opportunity (#6651)

* fix: empty my position pools page (#6656)

Update YourPositions.tsx

* feat: add first pass WarningAcknowledgement component

* chore: use translations

* chore: wire up savers deposit

* chore: tidy

* feat: use warningAcknowledgement in trade quote confirm

* feat: use warningAcknowledgement in trade quote confirm

* feat: use warningAcknowledgement in trade lp deposit

* fix: trade quote input warning logic

* chore: use dimmed background

* chore: component a little closer to mock

* chore: component tweaks

* chore: style fixes

* chore: use cancel translation

* fix: trade confirm warning

* Update WarningAcknowledgement.tsx

* Update WarningAcknowledgement.tsx

* feat: chart styles and loading state (#6655)

* fix: thor token repayments (#6676)

* fix: don't render back button on modals initial routes (#6675)

* chore: use translations & constants

* chore: address review feedback

* fix: unbork trade widget size

* fix: show minimum trade amount when unsafe

* fix: trade confirm width

* chore: trigger CI

* fix: typo

* chore: extract motion style to constant

* fix: add no min fallback message

---------

Co-authored-by: woodenfurniture <[email protected]>
Co-authored-by: gomes <[email protected]>
Co-authored-by: reallybeard <[email protected]>
Co-authored-by: kevin <[email protected]>
Co-authored-by: firebomb1 <[email protected]>
Co-authored-by: Hellhound13 <[email protected]>
Co-authored-by: Jpanam <[email protected]>
Co-authored-by: yuki <[email protected]>
Co-authored-by: guiribabrb <[email protected]>
Co-authored-by: Markus Meyer <[email protected]>
Co-authored-by: Romko <[email protected]>
Co-authored-by: tonyjiang12399 <[email protected]>
Co-authored-by: GitHub Action <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants