-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Extension notifications should show the username when using metatransactions #4220
Fix: Extension notifications should show the username when using metatransactions #4220
Conversation
ffa7dc4
to
2928bcd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work @iamsamgibbs 🎉
Now the notifications properly show the username when using metatransactions 💯
Enabled metatransactions
Installed the extension, deprecated it, uninstalled it, installed it again and changed the threshold
And all notifications contained the username 💯
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one @iamsamgibbs thanks for fixing this 📈
Notifications and the extension page correctly show Leela now:
![Screenshot 2025-02-03 at 12 45 43](https://private-user-images.githubusercontent.com/38098203/409111255-57200692-ffe1-4448-9399-47f3d4a5fdc1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjg1MTIsIm5iZiI6MTczOTE2ODIxMiwicGF0aCI6Ii8zODA5ODIwMy80MDkxMTEyNTUtNTcyMDA2OTItZmZlMS00NDQ4LTkzOTktNDdmM2Q0YTVmZGMxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA2MTY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEwNDc0ZmRiNGVhYjNhYjBjYWFhZjgxMTVlMDg5YjlkYmM2MGMyMzgzMzAzYzg3NjM2MWJmNmU1ZDlhZDcyNzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.SCplhBOf9hfkh8sCKZksDxRB2UabnTEdiD5dG742-ww)
![Screenshot 2025-02-03 at 12 46 23](https://private-user-images.githubusercontent.com/38098203/409111261-187bb7ad-6f2a-4aa0-a8e4-a969bf8c28bc.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjg1MTIsIm5iZiI6MTczOTE2ODIxMiwicGF0aCI6Ii8zODA5ODIwMy80MDkxMTEyNjEtMTg3YmI3YWQtNmYyYS00YWEwLWE4ZTQtYTk2OWJmOGMyOGJjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA2MTY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWEzZWRmZjdiNDExMjViZmMzMGI5OTJlZmMwOWM5MTg5YzIzMDFkY2M0NGFjOTBhNjRhYmE1MGI2M2Q5Y2QxOTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.4y9Ct6WQkuTjeBUl0-9Sgj1AumpX1lL86pZPKimGpc0)
![Screenshot 2025-02-03 at 12 46 38](https://private-user-images.githubusercontent.com/38098203/409111271-ccc4727b-75b1-44ce-a2b4-94b117b6145d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjg1MTIsIm5iZiI6MTczOTE2ODIxMiwicGF0aCI6Ii8zODA5ODIwMy80MDkxMTEyNzEtY2NjNDcyN2ItNzViMS00NGNlLWEyYjQtOTRiMTE3YjYxNDVkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA2MTY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4OGMyOThkMThlZjdkZWMzNTQ0MzI4YjNkOTM0NmMwOTZmYzJmMTZmYjg0MzhkY2MzYjEzMTQ5M2Q5NTk0ODUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.kXbZktfd3HIKFvhQ0hMH0Iw4dxoTlTzb0iGm7hez6xQ)
![Screenshot 2025-02-03 at 12 46 57](https://private-user-images.githubusercontent.com/38098203/409111278-7cfd5ea5-5a00-486f-821b-255de71823e7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjg1MTIsIm5iZiI6MTczOTE2ODIxMiwicGF0aCI6Ii8zODA5ODIwMy80MDkxMTEyNzgtN2NmZDVlYTUtNWEwMC00ODZmLTgyMWItMjU1ZGU3MTgyM2U3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA2MTY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTUwZDFhYjI0ZGU2MTM1ZWIwYjE5ZDkzNGNlOWIxYTg1YzI2ODFhYmNmZmJjZWNiNTM1NDI0MGExZDBiZmVmOWUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.zDRPWWniu5WX3g6YLWzJpADstpuIpp8FRQtXdhh9ssM)
![Screenshot 2025-02-03 at 12 47 22](https://private-user-images.githubusercontent.com/38098203/409111279-49a020c8-a7e1-4e48-95d1-49e8418f8537.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkxNjg1MTIsIm5iZiI6MTczOTE2ODIxMiwicGF0aCI6Ii8zODA5ODIwMy80MDkxMTEyNzktNDlhMDIwYzgtYTdlMS00ZTQ4LTk1ZDEtNDllODQxOGY4NTM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEwVDA2MTY1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFjM2RmN2Q2NTQ0YjZiN2Q3NjlmODRhNTg2ZDlhNTg2NDBjNDc4ZGY2NmY5MmU1OTdjY2E1MTA2ZGRiNGVjYTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.8_2ZeKIC80uoKtNZicS6lTYV887-fndsn4pQZAY0Thw)
a9df1c5
2928bcd
to
a9df1c5
Compare
a9df1c5
to
ae66f6d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a beautiful new hash right there!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A much nicer txHash this time 😎
Reapproving after rebase, let's go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-approving the hash change 👍
Description
See block-ingestor PR
This PR makes a change to how the
creator
name is set for extension related actions.Previously the block-ingestor used
receipt.from
as the creator for all extension related actions as the extension event does not emit the msg_sender. This works fine when metatransactions are disabled, but when they are enabled the metatransaction address in place of the original creator.This PR adds a new
getTransactionSignerAddress
function to the block-ingestor (courtesy of @bassgeta 's implementation on the proxy colony PRs!) and replaces uses ofreceipt.from
to get the address of the user who actually installed the extension.This means the correct user now shows in both notifications and the extension details.
Warning
If anyone knows of a reason why replacing the metatransactions address with the user address is a bad idea, please let me know!
Testing
npm run dev --notifications
Diffs
New stuff ✨
getTransactionSignerAddress
function addedChanges 🏗
receipt.from
replaced withgetTransactionSignerAddress
Resolves #3913