Adding contextual menus to Steem Keychain

avatar
(Edited)

If, by now, you don't know about Steem Keychain then you need to wake up 😅. Steem Keychain (Keychain for short) is the Metamask for STEEM, its a browser extension that allows you to manage your private keys and sign transactions without passing your keys to the dApps. Steemit.com has integrated Keychain to allow you to login and use its feature without entering your password or private keys.

Context menus

I have previously contributed to the Keychain code and added a feature called Keychainify which allows overtaking a SteemConnect URL and trigger Keychain.

I've now added a new feature for displaying context menus to a page.

Transfer to user menus

Transfer to Steem user shortcut

When right-clicking on a link that sends you to a Steem user profile, you will see a "Steem Keychain" context menu allowing you to:

  • Transfer STEEM/SBD to the user
  • Send a MEMO message to the user (0.001 STEEM transfer)
  • Tip a user (1 STEEM transfer)

Transfer to author menus

Transfer to author
These context menus are the same as for the above but they are showing for a page as opposed to for links. So if you are on a page related to a Steem author (a blog post for example), then the menu will show up and will allow you to do the same thing as above

Technical challenges

I have developed several Chrome extensions with context menu before so it was easy, the challenge comes from understanding how Steem Keychain works and how to trigger a popup view. Thank you @stoodkev for being available and giving me some clues on where to look at.

I ended up having to refactor part of the navigation logic and move things around to make the popup screen show up and display the transfer view without temporarily showing the main view first and causing some flickering.

The feature is not yet available, a PR has been submitted:
https://github.com/MattyIce/steem-keychain/pull/133


Vote for my witness
Support @quochuy Witness.jpg
On Steem, Witnesses are playing the important role of providing a performant and safe network for all of us. You have the power to choose 30 trusty witnesses to package transactions and sign the blocks that will go in the Steem blockchain. Vote for me via SteemConnect to help me do more useful projects for the communities.



0
0
0.000
8 comments
avatar
(Edited)

Mate, this is fantastic. So if I'm reading it right I could have a standing agreement with another Splinterlands player, that the winner of our matchups gets tipped SPT or DEC, then I can right click in the battle results window and send the booty directly without leaving splinterlands.io?
On second thought, clicking another player in that window just opens their splinterlands profile, not their steem account, so it wouldn't work. Still, great development. Appreciate your efforts :)

0
0
0.000
avatar

Hi @mattclarke, I have not tried with splinterland.io but if the URL to a user profile is similar to one to steemit.com profile then it should work the same, I’m detecting based on a pattern that matches the path not the domain. I’m not sure how it would work with other coins though. Keychain v1.6 includes a partial version of the feature so you can try it now.

Posted using Partiko iOS

0
0
0.000
avatar
(Edited)

image.png
Yes, only Steem/SBD support currently. Also should'nt it be autopopulating the account name?
Right clicking on the username inside splinterlands.io didn't return the option.

0
0
0.000
avatar

The auto-populate is part of the pull request above, the feature was removed accidentally during the few first fixes.

0
0
0.000
avatar

Yea, on the splinterland website, the usernames links are internal triggers instead of links to URLs. Would be tricker to support. I can have a look in the future.

0
0
0.000
avatar

This is awesome! I can see the possibilities of this extending even further into tribes and dapps. keychain has made my life so much easier and clearly will continue to do so. Great updates man, keep up the good work

0
0
0.000
avatar

Yes, this is an exploratory development, might give more ideas for future functionalities.

Posted using Partiko iOS

0
0
0.000
avatar

Hi, @quochuy!

You just got a 1.09% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

0
0
0.000