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

Conversation

@iamacook
Copy link
Contributor

@iamacook iamacook commented Mar 9, 2022

What it solves

Build issues with latest SDK types

How this PR fixes it

Wherever TokenType was being used, relative to transactions, TransactionTokenType is not being used in accordance with the following: safe-global/safe-gateway-typescript-sdk#62

The client gateway returns NATIVE_TOKEN for TokenType enum and Transaction type uses NATIVE_COIN to define native chain token.

@iamacook iamacook requested review from dasanra and katspaugh March 9, 2022 13:16
@iamacook iamacook self-assigned this Mar 9, 2022
@github-actions
Copy link

github-actions bot commented Mar 9, 2022

CLA Assistant Lite All Contributors have signed the CLA.

@github-actions
Copy link

github-actions bot commented Mar 9, 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 1 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1957444600

  • 0 of 4 (0.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 34.848%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/routes/safe/components/Transactions/TxList/TokenTransferAmount.tsx 0 1 0.0%
src/routes/safe/components/Transactions/TxList/TxInfoDetails.tsx 0 1 0.0%
src/routes/safe/components/Transactions/TxList/modals/ApproveTxModal.tsx 0 2 0.0%
Totals Coverage Status
Change from base Build 1956851480: 0.0%
Covered Lines: 3364
Relevant Lines: 8724

💛 - Coveralls

@github-actions
Copy link

github-actions bot commented Mar 9, 2022

Deployment links

🟠 Rinkeby Mainnet 🟣 Polygon 🟡 BSC Arbitrum 🟢 Gnosis Chain

@github-actions
Copy link

github-actions bot commented Mar 9, 2022

E2E Tests Failed
Check the results here: https://github.com/gnosis/safe-react-e2e-tests/actions/runs/1957488034

Failed tests:

  • ❌ Add an existing safe Add an existing safe
  • ❌ Read-only transaction creation and review Read-only transaction creation and review
  • ❌ Safe Apps List Safe Apps List
  • ❌ Safe Balances Safe Balances

Copy link
Contributor

@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.

Looks fine to me but I am not sure if we need all the changes or if its enough to only change occurrences of NATIVE_COIN to TransactionTokenType since everything else is the same in both types.

@iamacook
Copy link
Contributor Author

iamacook commented Mar 9, 2022

I am not sure if we need all the changes or if its enough to only change occurrences of NATIVE_COIN to TransactionTokenType since everything else is the same in both types.

Although that makes total sense, when types themselves use TransactionTokenType as a value, we have to follow. Erc20Transfer is a good example.

@katspaugh katspaugh merged commit 3f1134e into dev Mar 10, 2022
@katspaugh katspaugh deleted the use-tx-token-type branch March 10, 2022 12:53
@github-actions github-actions bot locked and limited conversation to collaborators Mar 10, 2022
name: string
symbol: string
type: TokenType
type: TransactionTokenType
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this case I think TokenType would be more precise, as we are checking the type for an asset

onError={(error) => {
error.currentTarget.onerror = null
error.currentTarget.src = assetInfo.tokenType === TokenType.ERC721 ? NFTIcon : TokenPlaceholder
error.currentTarget.src = assetInfo.tokenType === TransactionTokenType.ERC721 ? NFTIcon : TokenPlaceholder
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would say that also this could be a TokenType instead a TransactionTokenType, because I understand it also comes from an asset, but I couldn't ensure because I'm not doing a deep check on the code

@iamacook
Copy link
Contributor Author

@dasanra, I've addressed your two comments here.

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.

6 participants