swarmcity / SwarmCityConcept

This is the high level description of what needs to be built
9 stars 1 forks source link

As a seeker, I payout the deal so the Provider gets the funds, and reputation tokens are created for both of us. #14

Open kikipluche opened 6 years ago

kikipluche commented 6 years ago

Abstract:

In the first hashtags on Swarm City Boardwalk, a request becomes a deal when both parties agree to the deal, and are equally invested in it.

After the task has been completed, the Seeker can payout the Provider.

Both Seeker and Provider get reputation tokens, minted by the hashtagcontract.

How it could work:

On the detail-view of the deal, the Seeker taps "Payout". The transaction is signed and then sent to the API.

The hashtagcontract payout function is used which sends the locked funds to the Provider, and mints reputation tokens for both Seeker and Provider.

How the API could be used:

Re-use sendSignedTx: The api receives the signed transaction and returns a transaction hash.

The API emits hashtagItemChanged event.

Smart Contracts:


What it looks like:

Userflow: https://invis.io/ABGM89SX3V5#/295019238_-Hashtag--contractadress---dealhash- ( > in Invision, hold shift to see clickable areas)


route: /hashtag/[contractadress]/[dealhash]

On the detail-view of an item that is in deal (1), directly below the shareable link, we see:

By tapping the button "payout", the Seeker confirms he wants to payout this deal to the Provider. The view changes to confirm-payout-page (2).

The copy on the confirm-payout-page (2) is "You’re about to pay (amount) SWT to (name)".

After signing through the password-unlock (3) component, the view changes to payout-processing-page (4).

payout-processing-page (4)is a processing page (https://github.com/swarmcity/SwarmCityPM#26), in this case the copy on succes is ‘Funding is being processed.’"Payout is being processed."

Once enabled, tapping the white next-button will changes the view back to the detail-view of the item.


Desktop view:


Invisionlinks with login (for inspect mode!): mobile: https://projects.invisionapp.com/d/main#/console/13838256/295019238/inspect desktop: https://projects.invisionapp.com/d/main#/console/14147648/295018832/inspect

Documentation / references

With ♡ from Swarm City

kikipluche commented 6 years ago

@faffydee needs changes on the processing page

faffydee commented 6 years ago

Changes done!