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

Use Gateway SDK for most of the gateway calls #2522

Merged
merged 27 commits into from Jul 27, 2021
Merged

Use Gateway SDK for most of the gateway calls #2522

merged 27 commits into from Jul 27, 2021

Conversation

katspaugh
Copy link
Member

@katspaugh katspaugh commented Jul 9, 2021

What it solves

Resolves #2505.

How this PR fixes it

Replaces some of the endpoints with the new Gateway SDK.
Namely:

  • Safe info
  • Fiat currency list
  • Token balances
  • Collectibles
  • Transaction history
  • Transaction queue

How to test it

Load a safe, check assets and collectibles. Open the currency menu.

@katspaugh katspaugh requested a review from dasanra July 9, 2021 11:08
@github-actions
Copy link

github-actions bot commented Jul 9, 2021

CLA Assistant Lite All Contributors have signed the CLA.

@katspaugh katspaugh marked this pull request as draft July 9, 2021 11:15
@github-actions
Copy link

github-actions bot commented Jul 9, 2021

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 4 0
Ignored 4 N/A
  • Result: ✅ success

  • Annotations: 4 total


[warning] @typescript-eslint/explicit-module-boundary-types

Require explicit return and argument types on exported functions' and classes' public class methods


Report generated by eslint-plus-action

@github-actions
Copy link

github-actions bot commented Jul 9, 2021

@github-actions
Copy link

github-actions bot commented Jul 9, 2021

@github-actions
Copy link

github-actions bot commented Jul 9, 2021

@github-actions
Copy link

github-actions bot commented Jul 9, 2021

@katspaugh katspaugh marked this pull request as ready for review July 12, 2021 16:18
@katspaugh
Copy link
Member Author

katspaugh commented Jul 14, 2021

Definitely a regression.

Update: I couldn't reproduce this. The API might have been down?

@francovenica
Copy link
Contributor

Sorry, I forgot the link.
This is the safe Where I have issues: https://pr2522--safereact.review.gnosisdev.com/mainnet/app/#/safes/0x4dEBDD6CEe25b2F931D2FE265D70e1a533B02453/transactions

It works fine on the Release branch #2535

@katspaugh katspaugh force-pushed the gateway-sdk branch 8 times, most recently from 0d5ac26 to 46940b5 Compare July 14, 2021 18:59
@katspaugh
Copy link
Member Author

@francovenica fixed! ✅

@francovenica
Copy link
Contributor

Works fine now

@katspaugh
Copy link
Member Author

katspaugh commented Jul 15, 2021

@dasanra the combination of a GitHub package (@gnosis.pm/safe-react-gateway-sdk) and a prepare script that builds it was breaking our yarn install. Some googling revealed that it's due to network concurrency when installing dependencies for both the main and the SDK package.

So I had to add this line, which fixed the problem: https://github.com/gnosis/safe-react/pull/2522/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R36

This might shoot us in the foot in some unexpected way, so please be aware of it.

@mmv08
Copy link
Member

mmv08 commented Jul 22, 2021

@dasanra the combination of a GitHub package (@gnosis.pm/safe-react-gateway-sdk) and a prepare script that builds it was breaking our yarn install. Some googling revealed that it's due to network concurrency when installing dependencies for both the main and the SDK package.

So I had to add this line, which fixed the problem: https://github.com/gnosis/safe-react/pull/2522/files#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R36

This might shoot us in the foot in some unexpected way, so please be aware of it.

This will make the depedency install very slow, apparently, it only happens if the package is published on GitHub. Can we maybe release it to npm?

@dasanra
Copy link
Collaborator

dasanra commented Jul 22, 2021

@mikheevm it seems that changing cache folder fix only works when you have 1 package causing conflicts. We can have either safe-react-components or safe-react-gateway-sdk referencing a direct commit on github but not both 😉

For now I published a new version with latest safe-react-components and we will publish a new one of the sdk when we close the current changes 👍

@github-actions
Copy link

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 4 0
Ignored 4 N/A
  • Result: ✅ success

  • Annotations: 4 total


[warning] @typescript-eslint/explicit-module-boundary-types

Require explicit return and argument types on exported functions' and classes' public class methods


Report generated by eslint-plus-action

@dasanra dasanra merged commit f3d9b8a into dev Jul 27, 2021
@dasanra dasanra deleted the gateway-sdk branch July 27, 2021 11:13
@github-actions github-actions bot locked and limited conversation to collaborators Jul 27, 2021
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.

[Gateway SDK] Replace gateway and tx-service calls with SDK calls
4 participants