Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

refactor: update SDK to use baseUrl #3888

Merged
merged 2 commits into from
May 18, 2022
Merged

refactor: update SDK to use baseUrl #3888

merged 2 commits into from
May 18, 2022

Conversation

iamacook
Copy link
Member

What it solves

Dependency update

How this PR fixes it

The gateway SDK has been updated to the latest version and all instances requiring the gateway URL to be passes removed. The environment-depebdent baseUrl is now set on mount.

How to test it

There should be no changes.

@iamacook iamacook requested a review from katspaugh May 18, 2022 13:08
@github-actions
Copy link

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented May 18, 2022

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 6 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@katspaugh
Copy link
Member

Cool, thanks!

The CGW debug toggle might benefit from a window.reload() now probably.

@iamacook
Copy link
Member Author

The CGW debug toggle might benefit from a window.reload() now probably.

It already reloads.

I'll merge this now as it is purely code-related.

Copy link
Member

@usame-algan usame-algan left a comment

Choose a reason for hiding this comment

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

Nice 👍

@@ -18,15 +18,9 @@ describe('fetchTokenCurrenciesBalances', () => {
selectedCurrency: 'USD',
})

expect(getBalances).toHaveBeenCalledWith(
GATEWAY_URL,
Copy link
Member

Choose a reason for hiding this comment

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

It can also be removed from the imports of this file

@@ -178,7 +178,7 @@ describe('<LoadSafePage>', () => {
await waitFor(() => {
fireEvent.change(safeAddressInputNode, { target: { value: validSafeAddress } })

expect(mockedEndpoints.getSafeInfo).toBeCalledWith(GATEWAY_URL, rinkebyNetworkId, validSafeAddress)
Copy link
Member

@usame-algan usame-algan May 18, 2022

Choose a reason for hiding this comment

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

GATEWAY_URL can also be removed from the imports in this file

@github-actions
Copy link

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2345706018

  • 6 of 15 (40.0%) changed or added relevant lines in 14 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.003%) to 37.018%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/components/Root/index.tsx 0 1 0.0%
src/logic/contracts/api/masterCopies.ts 0 1 0.0%
src/logic/currencyValues/store/actions/updateAvailableCurrencies.ts 0 1 0.0%
src/logic/safe/transactions/api/fetchSafeTransaction.ts 0 1 0.0%
src/logic/safe/transactions/txHistory.ts 0 1 0.0%
src/logic/tokens/api/fetchSafeCollectibles.ts 0 1 0.0%
src/utils/decodeTx.ts 0 1 0.0%
src/logic/safe/store/actions/transactions/fetchTransactions/loadGatewayTransactions.ts 0 2 0.0%
Totals Coverage Status
Change from base Build 2344289548: 0.003%
Covered Lines: 3849
Relevant Lines: 9468

💛 - Coveralls

@iamacook iamacook merged commit 5f62487 into dev May 18, 2022
@iamacook iamacook deleted the update-sdk branch May 18, 2022 13:32
@github-actions github-actions bot locked and limited conversation to collaborators May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants