Giter Site home page Giter Site logo

clef-ui's People

Contributors

chikeichan avatar gillesfernandez avatar holiman avatar mslipper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

clef-ui's Issues

Add Origin and User Agent from meta to UI

Currently we are not showing ORIGIN and USER AGENT from the rpc meta data.

ORIGIN shows where the domain that made the request come from
USER AGENT show the user agent of user

Neither will be present if request is made with IPC.

Additional Consideration:

  • There can be any number of new meta field being added to RPC response. The UI should find a way to show all info in the future.

Implement ApproveListing

Please refer to ApproveListing API

  • Add ApproveListing handler to pkg/rpc/rpc.go
  • Implement ApproveListing UI. There is no mock, but you can refer to the reference UI down below. We don't have to be super polished on styling for now, as there is no real design for this yet. Refer to ApproveSignData for what's already implemented.
  • I am not sure if the API allow us to response with a filtered list of account. If so, please also implement the ability to check/uncheck the account that users wish to return. If not, let's just return all accounts on Approve

Reference UI
screen shot 2018-08-31 at 12 47 44 am

Add warning message for sendTx Data view

Data come from call_info:message

There is CRITICAL, WARNING and INFO.

CRITICAL: show warning and don't allow user to advance. An example message is "message":"Tx destination is the zero address!","type":"CRITICAL" when to address is all zeros

INFO give you a human-readable string of the ABI call.

WARNING give you an error message, that we should surface to the user. The longest error message will likely be "Tx contains data, but provided ABI signature could not be matched: WARNING: Supplied data is stuffed with extra data. \nWant 0100000000000000000000000000000000000000000000000000000000000012\nHave 0000000000000000000000000000000000000000000000000000000000000012\nfor method safeSend(address)"

Implement Blocky Identicon for ETH Address

According to specs, Clef UI MUST show the blocky-identicon for ethereum addresses.

This task is just the implement the QWidget for the blocky identicon. We should be able to call something like NewBlocky(address string) *QWidget and get back a widget.

This task DOES NOT include adding blocky to other approval screens. But feel free to do so if it helps with development.

Change label in Meta to be more intuitive

Currently we are using LOCAL ENDPOINT as a label for local. However, LOCAL ENDPOINT is not clear to the user what it actually means. We should find better names for these labels.

BUG: NewAccount request does not go thru if you experience an error first

Repo:

  1. Receive new account request
  2. Create password that's less than 10 characters
  3. see error
  4. Now create password that is longer than 10 characters
  5. see that the first request didn't go thru
  6. Repeat step 4
  7. See that request went thru

(Just tried to repo, but these repo steps does that reproduce the bug 100% of the time)

Installation errors (debian 9)

Tried to make a dev environment on debian-9, but ran into some errors:

user@debian-work:~/go/src/github.com/kyokan/clef-ui$ make deps
go get -u github.com/ethereum/go-ethereum
go get -u github.com/therecipe/qt
go get -u github.com/sirupsen/logrus
go get -u github.com/dchest/siphash
go get -u github.com/powerman/rpc-codec/jsonrpc2
go get -u golang.org/x/tools/imports
go install github.com/ethereum/go-ethereum/cmd/clef
go install github.com/therecipe/qt
go install github.com/therecipe/qt/cmd/qtdeploy
go install github.com/therecipe/qt/cmd/qtsetup
make: dep: Command not found
Makefile:6: recipe for target 'deps' failed
make: *** [deps] Error 127

Most of it seemed to work, so I continued anyway

user@debian-work:~/go/src/github.com/kyokan/clef-ui$ make run
go build -o ./build/clefui ./cmd/clefui/main.go
# github.com/therecipe/qt/quickcontrols2
quickcontrols2.cpp:9:22: fatal error: QByteArray: No such file or directory
 #include <QByteArray>
                      ^
compilation terminated.
# github.com/therecipe/qt/core
core.cpp:9:30: fatal error: QAbstractAnimation: No such file or directory
 #include <QAbstractAnimation>
                              ^
compilation terminated.
Makefile:26: recipe for target 'build' failed
make: ***
Error 2

I did install Qt 5.11.1 according to the instructions, using the official package. I did not install 'system package managers version' -- I thought that should not be needed, since it said:

Your applications won't run on a different distro than the one you used to deploy your application, but this is currently the only option to make your application look native on your distro.

And we want cross-platform, right?

Update Clef UI API Integration

Clef UI API is changing

Pending PRs
ethereum/go-ethereum#17704
ethereum/go-ethereum#17554

MasterPassword
First of all OnMasterPassword(request *PasswordRequest) (PasswordResponse, error)

    PasswordRequest struct {
        Prompt string `json:"prompt"`
    }
    PasswordResponse struct {
        Password string `json:"password"`
    }

Secondly that OnAccounts or something like it

Thirdly, I'm leaning towards removing Import from the external API

Implement ShowError

Please refer to Show Error API

  • Add support for ShowError in pkg/rpc/rpc.go. You can declare an empty struct as the reply parameters of the RPC handler, as this method does not expect a reply
  • Add UI to show a pop up dialog on ShowError request
  • The pop up dialog just need to show the error message (check out QErrorMessage) and an "x" button to allow user to close the message.

Implement ApproveExport

Approve Export API

  • Implement handler in pkg/rpc/rpc.go
  • Implement ApproveExport UI
  • You will have to rely on a bit of creativity here. There is no prior views to reference, and there are no mocks. The goal of the UI is to display all request params to the user, and allow them to approve/reject. At minimal, the UI should include Request Info (refer to ApproveSignData), and Transaction Info that includes all others requst params from the RPC request.

Refuse to execute if binary permission allow non-user write

According to specs, Clef UI SHOULD verify the permissions on the signer binary, and refuse to execute or warn if permissions allow non-user write.

For completion of this task, Clef UI should:

  • Verify permission on signer binary
  • If the permission allow non-user write, display a message that says "Your signer binary allows non-user write. Clef will not start"
  • We should show the same button that allow the user to set their own directory to geth.

Implement Show Info

Please refer to Show Info API

  • Add support for ShowInfo in pkg/rpc/rpc.go. You can declare an empty struct as the reply parameters of the RPC handler, as this method does not expect a reply
  • Add UI to show a pop up dialog on ShowInfo request
  • The pop up dialog just need to show the error message (check out QT Dialog) and an "x" button to allow user to close the message.

Implement Login UI

  • Clef-UI SHOULD try to start Clef with $GOPATH env var to see if go-ethereum is there
  • Clef-UI SHOULD inform the user about the SHA256 or MD5 hash of the binary being executed
  • Login UI SHOULD allow user to select GETH directory

Login UI should have the following state (sorry, no mocks):
READY TO START CLEF
In this case, GOPATH AND go-ethereum is found, and Clef is ready to be started. We should show the user the SHA256 or MD5 hash of the binary that is going to be executed. The user should be able to do the following actions:

  1. Click "Start Clef" to start Clef
  2. Click "Change Directroy" to use a File Dialog to select the right folder. After which, the UI will go back to #1

CLEF NOT FOUND
In this case, we cannot find GOPATH or go-ethereum. We should show the user a message that says "We cannot locate your go-ethereum directory." The user should be able to perform the following actions:

  1. Click "Set Directory" to use a File Dialog to select the right folder. After which, the UI will go back to #1 of READY TO START CLEF
  2. Click "Download Geth" and redirect user to the geth homepage.

Add warning message if destination address has invalid checksum

According to specs, Clef UI MUST display approproate warning if the destination-account is formatted with invalid checksum.

This task should add a small (font-size 10px) warning message in color red below the destination address if the address has an invalid checksum. AFAIK, signTransaction should be the only view that requires this change, as it is the only view with a destination address.

This task DOES NOT include added warning message to sending ERC20 for now. In the future, we should add checksum validation for ERC20 transactions as well (Created #4 to track).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.