diff --git a/src/user.js b/src/user.js index 46393f60..e51e5d92 100644 --- a/src/user.js +++ b/src/user.js @@ -433,8 +433,8 @@ export default function createUserModule(web3, contracts, utils) { if ( response && - response.data && - response.data.profileMigrationConsent + 'data' in response && + 'profileMigrationConsent' in response.data ) { return response.data.profileMigrationConsent; } diff --git a/test/user.test.js b/test/user.test.js index 1b973bc6..11d884c9 100644 --- a/test/user.test.js +++ b/test/user.test.js @@ -186,7 +186,7 @@ describe('User - update profile migration consent', () => { ).toBe(false); }); - it('should return correct value of profile migration consent after updatins', async () => { + it('should return correct value of profile migration consent after updating', async () => { await core.user.updateProfileMigrationConsent(account, { safeAddress, profileMigrationConsent: true,