Skip to content

Commit

Permalink
fix bug in profile that prevented ENS name owners from creating a pro…
Browse files Browse the repository at this point in the history
…file
  • Loading branch information
AlexNi245 authored and hai-ko committed Aug 29, 2023
1 parent e60c926 commit ac782af
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/lib/profile/src/userProfile/getUserProfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ export async function getUserProfile(
contact,
PROFILE_RECORD_NAME,
);
//The user has no dm3-Profile text record set. Hence we need to fetch the profile offChain
if (!textRecord) {
throw Error('Account has no dm3 profile');
//The user has no dm3-Profile text record set. Hence we need to fetch the profile offChain
return undefined;
}
/**
* The Text record can contain either
Expand Down
4 changes: 2 additions & 2 deletions packages/react/src/session/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
checkUserProfile,
getUserProfile,
} from 'dm3-lib-profile';
import { ethersHelper, globalConfig, log } from 'dm3-lib-shared';
import { ethersHelper, globalConfig, log, logError } from 'dm3-lib-shared';
import { Connection, ConnectionState } from '../web3provider/Web3Provider';
import { getNameForAddress } from 'dm3-lib-offchain-resolver-api';

Expand Down Expand Up @@ -36,7 +36,7 @@ export async function connectEthAccount(
? await connectOnchainAccount(connection, ensName, address)
: await connectOffchainAccount(connection, address);
} catch (e) {
log('[connectEthAccount] ' + JSON.stringify(e), 'error');
logError('[connectEthAccount] ' + e);
return {
existingAccount: false,
connectionState: ConnectionState.ConnectionRejected,
Expand Down

0 comments on commit ac782af

Please sign in to comment.