Skip to content

Commit

Permalink
Fix user page not found (#378)
Browse files Browse the repository at this point in the history
  • Loading branch information
torztomasz committed Apr 5, 2023
1 parent 8d63ccb commit 3863f71
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/backend/src/api/controllers/UserController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ export class UserController {
this.withdrawableAssetRepository.getAssetBalancesByStarkKey(starkKey),
])

if (!registeredUser) {
return { type: 'not found', content: 'User not found' }
}

const assetDetailsMap = await this.assetDetailsService.getAssetDetailsMap({
userAssets: userAssets,
assetHistory: history,
Expand Down Expand Up @@ -143,13 +139,13 @@ export class UserController {
const offers =
await this.forcedTradeOfferViewService.forcedTradeOffersToEntriesWithFullHistory(
forcedTradeOffers,
registeredUser.starkKey
starkKey
)
const content = renderUserPage({
user,
tradingMode: this.tradingMode,
starkKey,
ethereumAddress: registeredUser.ethAddress,
ethereumAddress: registeredUser?.ethAddress,
withdrawableAssets: withdrawableAssets.map((asset) => ({
asset: {
hashOrId: asset.assetHash,
Expand Down

0 comments on commit 3863f71

Please sign in to comment.