From 9e0c880b6312ac82f1817262bbbbbe2e2e00ee81 Mon Sep 17 00:00:00 2001 From: iamacook Date: Fri, 11 Mar 2022 10:24:58 +0100 Subject: [PATCH 1/2] fix: asset types --- src/logic/collectibles/sources/Gnosis.ts | 6 +++--- .../components/Transactions/TxList/TokenTransferAmount.tsx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/logic/collectibles/sources/Gnosis.ts b/src/logic/collectibles/sources/Gnosis.ts index b8b0ecca95..c0f957103e 100644 --- a/src/logic/collectibles/sources/Gnosis.ts +++ b/src/logic/collectibles/sources/Gnosis.ts @@ -1,4 +1,4 @@ -import { SafeCollectibleResponse, TransactionTokenType } from '@gnosis.pm/safe-react-gateway-sdk' +import { SafeCollectibleResponse, TokenType } from '@gnosis.pm/safe-react-gateway-sdk' import { Collectibles, NFTAsset, NFTAssets, NFTTokens } from 'src/logic/collectibles/sources/collectibles.d' import { sameAddress } from 'src/logic/wallets/ethAddresses' @@ -12,7 +12,7 @@ type TokenResult = { logoUri: string name: string symbol: string - type: TransactionTokenType + type: TokenType } type FetchResult = { @@ -27,7 +27,7 @@ class Gnosis { logoUri, name: tokenName, symbol: tokenSymbol, - type: TransactionTokenType.ERC721, + type: TokenType.ERC721, })) return assets diff --git a/src/routes/safe/components/Transactions/TxList/TokenTransferAmount.tsx b/src/routes/safe/components/Transactions/TxList/TokenTransferAmount.tsx index cfd9045dc7..7f01817382 100644 --- a/src/routes/safe/components/Transactions/TxList/TokenTransferAmount.tsx +++ b/src/routes/safe/components/Transactions/TxList/TokenTransferAmount.tsx @@ -1,5 +1,5 @@ import { Text } from '@gnosis.pm/safe-react-components' -import { TransactionTokenType } from '@gnosis.pm/safe-react-gateway-sdk' +import { TokenType } from '@gnosis.pm/safe-react-gateway-sdk' import { ReactElement } from 'react' import styled from 'styled-components' @@ -34,7 +34,7 @@ export const TokenTransferAmount = ({ assetInfo }: TokenTransferAmountProps): Re height={26} onError={(error) => { error.currentTarget.onerror = null - error.currentTarget.src = assetInfo.tokenType === TransactionTokenType.ERC721 ? NFTIcon : TokenPlaceholder + error.currentTarget.src = assetInfo.tokenType === TokenType.ERC721 ? NFTIcon : TokenPlaceholder }} src={assetInfo.logoUri} /> From a4db28f0e2aa99e564237152116c5798f6a7aa6a Mon Sep 17 00:00:00 2001 From: iamacook Date: Sun, 13 Mar 2022 18:46:51 +0100 Subject: [PATCH 2/2] fix: add mock --- src/setupTests.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/setupTests.js b/src/setupTests.js index 3a7fd5de16..614c87bbd3 100644 --- a/src/setupTests.js +++ b/src/setupTests.js @@ -42,6 +42,7 @@ jest.mock('@gnosis.pm/safe-react-gateway-sdk', () => { // We require some of the enums/types from the original module ...originalModule, Operation: jest.fn(), + TokenType: jest.fn(), TransactionTokenType: jest.fn(), TransactionStatus: jest.fn(), TransferDirection: jest.fn(),