From fb6e90ad4d5ad53eaa7052fdd78ac9211d3eecd0 Mon Sep 17 00:00:00 2001 From: lelenei Date: Tue, 22 Feb 2022 22:04:29 +0800 Subject: [PATCH 1/3] fix: show token icon at history --- .../mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx | 2 +- packages/web3-providers/src/opensea/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx b/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx index a22391604bb0..ba61dbb9617a 100644 --- a/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx +++ b/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx @@ -79,7 +79,7 @@ export function Row({ event, isDifferenceToken }: Props) { {event.price?.asset?.image_url && ( {event.price.asset?.asset_contract.symbol} diff --git a/packages/web3-providers/src/opensea/index.ts b/packages/web3-providers/src/opensea/index.ts index 0b708c25c2a2..b5453652c937 100644 --- a/packages/web3-providers/src/opensea/index.ts +++ b/packages/web3-providers/src/opensea/index.ts @@ -306,7 +306,7 @@ export class OpenSeaAPI implements NonFungibleTokenAPI.Provider { const response = await fetchFromOpenSea<{ asset_events: OpenSeaAssetEvent[] }>(requestPath, chainId) - return response?.asset_events.map(createNFTHistory) ?? [] + return response?.asset_events?.map(createNFTHistory) ?? [] } async getOrders( From 00ac4f92181eb88bddb182868f4c9b7f3665504d Mon Sep 17 00:00:00 2001 From: lelenei Date: Tue, 22 Feb 2022 22:15:26 +0800 Subject: [PATCH 2/3] fix: typo --- .../src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx b/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx index ba61dbb9617a..04a11c7bc397 100644 --- a/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx +++ b/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx @@ -76,10 +76,10 @@ export function Row({ event, isDifferenceToken }: Props) { <> - {event.price?.asset?.image_url && ( - + {event.price?.paymentToken?.image_url && ( + {event.price.asset?.asset_contract.symbol} From d963661844529a17146c2edba15090234dc65045 Mon Sep 17 00:00:00 2001 From: guanbinrui <52657989+guanbinrui@users.noreply.github.com> Date: Tue, 22 Feb 2022 22:19:58 +0800 Subject: [PATCH 3/3] refactor: code style --- .../mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx b/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx index 04a11c7bc397..8b6b0e4d33b8 100644 --- a/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx +++ b/packages/mask/src/plugins/Collectible/SNSAdaptor/HistoryTab/Row.tsx @@ -79,7 +79,7 @@ export function Row({ event, isDifferenceToken }: Props) { {event.price?.paymentToken?.image_url && ( {event.price.asset?.asset_contract.symbol}