mirror of
https://github.com/lens-protocol/core.git
synced 2026-01-10 06:38:05 -05:00
Merge pull request #1 from aave/fix/set-follow-nft-uri-with-sig
Fix: Fix `setFollowNFTURIWithSig()` function to properly set the follow NFT URI.
This commit is contained in:
@@ -322,6 +322,7 @@ contract LensHub is ILensHub, LensNFTBase, VersionedInitializable, LensMultiStat
|
||||
}
|
||||
|
||||
_validateRecoveredAddress(digest, owner, vars.sig);
|
||||
_setFollowNFTURI(vars.profileId, vars.followNFTURI);
|
||||
}
|
||||
|
||||
/// @inheritdoc ILensHub
|
||||
|
||||
@@ -297,6 +297,8 @@ makeSuiteCleanRoom('Profile URI Functionality', function () {
|
||||
MAX_UINT256
|
||||
);
|
||||
|
||||
const profileImageURIBefore = await lensHub.tokenURI(FIRST_PROFILE_ID);
|
||||
|
||||
await expect(
|
||||
lensHub.setProfileImageURIWithSig({
|
||||
profileId: FIRST_PROFILE_ID,
|
||||
@@ -310,7 +312,10 @@ makeSuiteCleanRoom('Profile URI Functionality', function () {
|
||||
})
|
||||
).to.not.be.reverted;
|
||||
|
||||
expect(await lensHub.tokenURI(FIRST_PROFILE_ID)).to.eq(MOCK_URI);
|
||||
const profileImageURIAfter = await lensHub.tokenURI(FIRST_PROFILE_ID);
|
||||
|
||||
expect(profileImageURIBefore).to.eq(MOCK_PROFILE_URI);
|
||||
expect(profileImageURIAfter).to.eq(MOCK_URI);
|
||||
});
|
||||
|
||||
it('TestWallet should set the follow NFT URI with sig', async function () {
|
||||
@@ -322,6 +327,8 @@ makeSuiteCleanRoom('Profile URI Functionality', function () {
|
||||
MAX_UINT256
|
||||
);
|
||||
|
||||
const followNFTURIBefore = await lensHub.getFollowNFTURI(FIRST_PROFILE_ID);
|
||||
|
||||
await expect(
|
||||
lensHub.setFollowNFTURIWithSig({
|
||||
profileId: FIRST_PROFILE_ID,
|
||||
@@ -334,6 +341,11 @@ makeSuiteCleanRoom('Profile URI Functionality', function () {
|
||||
},
|
||||
})
|
||||
).to.not.be.reverted;
|
||||
|
||||
const followNFTURIAfter = await lensHub.getFollowNFTURI(FIRST_PROFILE_ID);
|
||||
|
||||
expect(followNFTURIBefore).to.eq(MOCK_FOLLOW_NFT_URI);
|
||||
expect(followNFTURIAfter).to.eq(MOCK_URI);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user