Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Remove "start Job" button! #172

Open
astroseger opened this issue Feb 14, 2019 · 3 comments
Open

Remove "start Job" button! #172

astroseger opened this issue Feb 14, 2019 · 3 comments

Comments

@astroseger
Copy link

I would propose to completely remove "start Job" button. Why do we have it???

When user interact with service for the first time he should have "open channel" button. But if user already have a channel (and you claim that you find channels which already exits), then we obviously don't need "start Job".

User should have possibility to directly invoke new Request, or Fund/Extend the channel.

@astroseger
Copy link
Author

@raamb
Our tests in kovan and ropsten have shown that event filtering is actually very fast. So finding all channel for a given recipient, groupId and sender is relatively fast and "cheap". It is why, I've included test for existed channels in snet channel open-init

So I propose the following workflow for dApp.

  1. Each time user click on a service (press "details" in the current dApp) we start searching for existed channels. (without signing something with metamask! :) )
  2. Before "1" is completed user can only read documentation about the service
  3. If "1" finds zero channels we show "open channel" button to create new channel.
  4. if "1" finds one existed channel with sufficient funds and expiration we proceed directly to invoke tab (but "FUND" tab is still accessible! in case user wants to put more funds in advance )
  5. If "1" finds one existed channel with insufficient funds we inform user about it and proceed directly to Fund tab
  6. If "1" finds several channels (which shouldn't normally happen, because both dApp and snet-cli will not create second channel) we should normally have a form for select channels, but for the beta we could just select the channel with more funds in it...

@raamb
Copy link
Member

raamb commented Feb 18, 2019

Hi @astroseger the current flow is rather similar to what you suggested the distinction being in when the channel activity is started

  • The details button is to just open up the details of the job.
  • Start job does the check for existing channels. This is very fast and the signing with metamask is actually the communication with the daemon to get channel state if a channel is found.
  • Start job does what you mentioned, if a channel is found with enough funds you go to the invoke screen directly, if channel does not have enough funds or if no channel is found then we ask to add funds.

@astroseger
Copy link
Author

ok. I see now. We need to get the state of the channel from the service to calculate remaining funds. And you call it "start Job"... And we cannot avoid signature with metamask here, so we cannot remove "Start Job" button unless we implement #174 (which would be more convenient but less secure... )

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants