[Steem Gigs] Add Wallet to Steem Gigs

in #utopian-io5 years ago

screely-1554651752642.png

Repositories

https://github.com/steemgigs/steemgigs

https://github.com/steemgigs/steemgigsServer

Introduction

The following post briefly describes some of the work I recently carried out for Steem Gigs, the main feature I added was a wallet to Steem Gigs. I completed this work nearly 2 weeks ago, however, unfortunately, I haven't had the time to post about it yet.

Pull Request

The following pull requests are related to the work carried out:

The site is live at the following URL:

https://steemgigs.org/

New Features/Improvements

The main feature added within this release was the wallet, the following breaks this down in the front end and API work completed, let's get started how the wallet currently looks:

screely-1554651752642.png

There are two mains sections to the overall wallet, first, there is the balances area that features the following:

  1. Steem
  2. Steem Power
  3. SBD
  4. Teardrops

When you access your own wallet you're presented with a few different actions depending on the currency you choose, these include:

  • Steem - Power up, buy, sell & transfer
  • Steem Power - None (Power Down
    Coming Soon)
  • SBD - Buy & Sell
  • Teardrops - Transfer, Buy & Sell

The following shows the options available for Teardrops:

screely-1554651809400.png

Focussing on Steem, when you select the power up option you're presented with a modal as shown here:

screely-1554652074100.png

The power-up modal will allow you to enter the amount you wish to power up, upon submission of the amount you'll be redirected to SteemConnect to complete the transaction.

When you select to transfer on either Steem, SBD or Teardrops you will be presented with the following modal:

screely-1554651842678.png

This modal allows you to configure the receiver, the amount, the currency and the memo for the transaction, dependent on the currency you select there are two different outcomes. In the event you select Steem or SBD you will be sent to SteemConnect to complete a transfer transaction, if you select Teardrops you'll be sent to SteemConnect to complete a custom_json transaction. As the majority of the site uses SteemConnect for transfers this seemed like the logical choice, however, a keychain integration could make the process of transferring Teardrops more seamless.

As seen below, there is another section the wallet that shows the transfers a particular user has made:

screely-1554651752642.png

This section combines transactions that were made both on Steem and using Steem Engine, this allows both different types of transactions within a single feed, this was important because we wanted to show both transactions that were made using Steem, SBD & Teardrops. Taking a look at the API that powers this section we can see that there are two promises that take place, first we gather the Steem related transactions as seen here:

carbon.png

Next, we gather the Teardrops transactions as shown here:

carbon (1).png

This is brought together in the following:

carbon (2).png

In the above, you can see that after the data has been gathered we take that the information that is required in the response, combine the two sets of transactions and then sort it with lodash.

Although the above will work for a large majority of users it does have some limitations, this is currently due to the fixed amount of transactions set within the get Steem transactions promise.

carbon.png

Currently, there is a limit of 3000 passed into the getAccountHistory. Within the response from getAccountHistory there will be items such as votes, transfers, custom_json, etc. Once we receive a response we filter it down to just transfers, however, this means that users who have large amounts of votes will not see all of their transfers should they be outside of the 3000 fixed limit. In a future release I could improve this by iterating through for a certain time period or set number of transactions that are type transfer, however for the initial wallet it was agreed that this would be suitable (transactions weren't a requirement for the first phase ;))

What's Next?

Although I will be taking a short break from Steem Gigs due to a vacation, when I return I will continue to help improve the site and overall implement new features that @surpassinggoogle brings, the next work will surround the Teardrops landing page, however if I have time I might be able to get something quick up before I go ;)

GitHub Account

A link to my GitHub account can be found here:

https://github.com/tobias-g1

Sort:  

Great post defining the feature and the solution.

Somehow, it couldn't load my balances on live site, however, don't have time to debug it as a 3rd party at the moment. It may be a temporary network issue since my connection is bad, at the moment. (I have seen a couple of Heroku application errors in the Chrome console.)

I completed this work nearly 2 weeks ago, however, unfortunately, I haven't had the time to post about it yet.

We have a 2 weeks rule but that's generally a soft point. This rule is landed because we had to prevent spamming the contribution posts on old/unmaintained repositories. For this contribution, there is no problem since you didn't pass the limit yet, but in case you do pass that limit in the future, feel free to post. (We soften the rule if we see the author has no intention to abuse.)

Great work!


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

🎁 Dear @emrebeyler,

SteemBet Seed round SPT sale is about to start in 2 days!

When our started the development of SteemBet Dice game, we couldn’t imagine that our game would go so viral and that SteemBet would become one of the pioneers in this field.

In order to give back to our beloved community, we’ll distribute 4000 STEEM to SPT holders immediately after Seed sale. Plus, investors in this earliest round will be given 60% more tokens as reward and overall Return on Investment is estimated at 300%!

Join the whitelist on SteemBet webiste now and start investing! Feel free to ask us anything on Discord https://discord.gg/tNWJEAD

spt-sale-2-day.jpg

Thank you for your review, @emrebeyler! Keep up the good work!

Hey man I need to check it. Question is this running in the steem chain or it’s own chain?

Posted using Partiko iOS

It's on Steem. Teardrops are a token on Steem Engine. The balances come from a combination of using SteemJS and SSCJS which is a javascript library for SteemEngine, link here:

https://github.com/harpagon210/sscjs

The transactions also use the same :)

Hi @tobias-g!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hi, @tobias-g!

You just got a 0.95% 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.

Hey, @tobias-g!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!