Skip to content

Commit

Permalink
Merge pull request #926 from Magickbase/fix/some-pages-are-displayed-…
Browse files Browse the repository at this point in the history
…abnormally-online
  • Loading branch information
Keith-CY authored Mar 20, 2023
2 parents 73bac23 + f78b06f commit 2fd7e63
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion components/AccountOverview/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ const AccountOverview: React.FC<AccountOverviewProps & { refetch: () => Promise<

const getInfoBlock = account => {
const { type } = account
const domain = account.bit_alias
const domain = account?.bit_alias

const blockMap = {
[`${GraphQLSchema.AccountType.MetaContract}`]: <MetaContract {...(account.script as MetaContract['script'])} />,
Expand Down
4 changes: 2 additions & 2 deletions components/MultiTokenActivityList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ const ActivityList: React.FC<
{transfers?.metadata.total_count ? (
transfers.entries.map(item => {
const method = item.transaction.method_name || item.transaction.method_id
const fromBitAlias = item.from_account.bit_alias
const toBitAlias = item.to_account.bit_alias
const fromBitAlias = item.from_account?.bit_alias
const toBitAlias = item.to_account?.bit_alias

const token_ids = Array.isArray(item.token_ids) ? item.token_ids : [item.token_id]
const amounts = Array.isArray(item.amounts) ? item.amounts : [item.amount]
Expand Down
4 changes: 2 additions & 2 deletions components/NFTActivityList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ const ActivityList: React.FC<
{transfers?.metadata.total_count ? (
transfers.entries.map(item => {
const method = item.transaction.method_name || item.transaction.method_id
const fromBitAlias = item.from_account.bit_alias
const toBitAlias = item.to_account.bit_alias
const fromBitAlias = item.from_account?.bit_alias
const toBitAlias = item.to_account?.bit_alias

return (
<tr key={item.transaction.eth_hash + item.log_index}>
Expand Down
2 changes: 1 addition & 1 deletion components/TxList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ const TxList: React.FC<TxListProps & { maxCount?: string; pageSize?: number }> =
if (item.polyjuice?.native_transfer_account) {
to = item.polyjuice.native_transfer_account.eth_address
toType = GraphQLSchema.AccountType.EthUser
to_alias = item.polyjuice.native_transfer_account.bit_alias
to_alias = item.polyjuice.native_transfer_account?.bit_alias
}

const method = item.method_name || item.method_id
Expand Down
2 changes: 1 addition & 1 deletion pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ const TxList: React.FC<{ list: HomeLists['transactions']['entries']; isLoading:

if (tx.polyjuice?.native_transfer_account) {
to = tx.polyjuice.native_transfer_account.eth_address
to_bit_alias = tx.polyjuice.native_transfer_account.bit_alias
to_bit_alias = tx.polyjuice.native_transfer_account?.bit_alias
toType = GraphQLSchema.AccountType.EthUser
}
const isSpecialFrom = SPECIAL_ADDR_TYPES.includes(tx.from_account.type)
Expand Down

0 comments on commit 2fd7e63

Please sign in to comment.