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

Remove Backend tx-service calls #3114

Closed
3 tasks done
DiogoSoaress opened this issue Dec 6, 2021 · 6 comments · Fixed by #3189
Closed
3 tasks done

Remove Backend tx-service calls #3114

DiogoSoaress opened this issue Dec 6, 2021 · 6 comments · Fixed by #3189
Assignees
Labels
Tech-debt 🚧 Technical debt

Comments

@DiogoSoaress
Copy link
Member

DiogoSoaress commented Dec 6, 2021

Description

Remove tx-service direct calls.

There are 3 places where we are using BE tx-service endpoints. These should be converted to use the CGW.

Places to modify:

  • Fetching the tokens asset list: getTokensServiceUrl().
    Add a function to the gateway-sdk. We will likely have to update the way in which type Token = RecordOf<TokenProps> are created from Redux.
  • Get decoded data: getDataDecoderUrl()
    Add a function to the gateway-sdk
  • Get master copies: getMasterCopiesUrl()

Instead all these call should go through the CGW.

@iamacook
Copy link
Member

iamacook commented Dec 6, 2021

I believe we are using transactionService (returned from the CGW) as intended now: fetching tokens, master copies and data decoder. We fetch all transactions from /chains. @katspaugh

image

Safe Apps use it for their communicator and iframe message handler. Can you confirm if this is correct @mikheevm?

@mmv08
Copy link
Member

mmv08 commented Dec 6, 2021

Safe Apps use it for their communicator and iframe message handler. Can you confirm if this is correct @mikheevm?

This is correct, but it was used only in older versions and we keep it only for backward compatibility. After we implement safe-global/safe-apps-sdk#255 we'll check if we can remove it

@DiogoSoaress DiogoSoaress changed the title Replace tx-service for fetching the assets list Remove Backend tx-service calls Dec 6, 2021
@katspaugh katspaugh added the Tech-debt 🚧 Technical debt label Dec 6, 2021
@jpalvarezl
Copy link

Just to be totallly certain this is necessary, the CGW generally returns TokenInfo within the transaction response. It would be good to know whether having a dedicated token endpoint is even necessary. Maybe this can get removed entirely without the need for an endpoint.

@iamacook
Copy link
Member

It would be good to know whether having a dedicated token endpoint is even necessary.

It appears to not be being used at all. I've removed the redundant code in the linked PR.

@francovenica
Copy link
Contributor

@katspaugh can we close this one?

@katspaugh
Copy link
Member

Yes. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Tech-debt 🚧 Technical debt
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants