Skip to content

Commit

Permalink
Allow transfered pfps (#1230)
Browse files Browse the repository at this point in the history
  • Loading branch information
jarrel-b authored Oct 13, 2023
1 parent a159774 commit dda810b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion db/gen/coredb/batch.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion db/queries/core/query.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1539,7 +1539,7 @@ where pfp.id = @id
when pfp.source_type = @ens_source_type
then exists(select 1 from wallets w where w.id = pfp.wallet_id and not w.deleted)
when pfp.source_type = @token_source_type
then exists(select 1 from tokens t where t.id = pfp.token_id and t.displayable and not t.deleted)
then exists(select 1 from tokens t where t.id = pfp.token_id and not t.deleted)
else
0 = 1
end;
Expand Down
3 changes: 3 additions & 0 deletions graphql/resolver/schema.resolvers.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions graphql/resolver/schema.resolvers.helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -2145,11 +2145,11 @@ func profileImageToModel(ctx context.Context, pfp db.ProfileImage) (model.Profil
}
switch pfp.SourceType {
case persist.ProfileImageSourceToken:
token, err := resolveTokenByTokenID(ctx, pfp.TokenID)
token, err := publicapi.For(ctx).Token.GetTokenByIdIgnoreDisplayable(ctx, pfp.TokenID)
if err != nil {
return nil, err
}
return &model.TokenProfileImage{Token: token}, nil
return &model.TokenProfileImage{Token: tokenToModel(ctx, *token, nil)}, nil
case persist.ProfileImageSourceENS:
return ensProfileImageToModel(ctx, pfp.UserID, pfp.WalletID, pfp.EnsAvatarUri.String, pfp.EnsDomain.String)
default:
Expand Down

0 comments on commit dda810b

Please sign in to comment.