- 
                Notifications
    You must be signed in to change notification settings 
- Fork 361
          fix: migrate to TransactionTokenType type
          #3640
        
      Conversation
| CLA Assistant Lite All Contributors have signed the CLA. | 
| ESLint Summary View Full Report
 
 
 Report generated by eslint-plus-action | 
| Pull Request Test Coverage Report for Build 1957444600
 
 
 💛 - Coveralls | 
| E2E Tests Failed Failed tests: 
 | 
There was a problem hiding this 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.
| 
 Although that makes total sense, when types themselves use  | 
| name: string | ||
| symbol: string | ||
| type: TokenType | ||
| type: TransactionTokenType | 
There was a problem hiding this comment.
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 | 
There was a problem hiding this comment.
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
What it solves
Build issues with latest SDK types
How this PR fixes it
Wherever
TokenTypewas being used, relative to transactions,TransactionTokenTypeis not being used in accordance with the following: safe-global/safe-gateway-typescript-sdk#62