Giter VIP home page Giter VIP logo

vegawallet-desktop's Introduction

Vega Wallet desktop app

The Vega Wallet desktop app provides a graphical user interface for Vega Protocol's wallet for Windows, macOS and Linux.

Latest release: Download the latest release from the releases section.

Wallet documentation: Read the quick-start guide for tips on using the desktop wallet app.

Supported platforms

macOS: >= 10.13 (High Sierra) Windows: >= 8 Linux: Supported, but the minimum version is unknown.

Dependencies

Golang

You will need to go 1.21.

Wails

This project uses Wails to build the desktop app. To install Wails, follow the instruction on its Getting started page.

Be sure to have the following environment variables set:

  • CGO_ENABLED=1
  • GO111MODULE=on
go install github.com/wailsapp/wails/v2/cmd/[email protected]

To check if you have the correct dependencies installed, use the following command:

wails doctor

Frontend

To be able to compile the frontend, you'll also need to install:

  • nodejs >= v18.12.0
  • yarn >= v1.22.19

Platform Specific Dependencies

Be sure to follow the installation guide from Wails. Specific dependencies need to be installed.

For more details, see https://wails.io/docs/gettingstarted/installation#platform-specific-dependencies

Build

This will compile your project and save the production-ready binary in the build/bin directory.

Note, this application can be bundle specifically for fairground or mainnet.

Using the script build.sh

There are scripts that ease the switch between fairground and mainnet:

For fairground:

WALLET_OPTIMIZED_FOR=fairground ./build.sh

For mainnet:

WALLET_OPTIMIZED_FOR=mainnet ./build.sh

Ensure you set the executable mode on the scripts:

chmod +x build-*.sh

Using wails

Compile the project using the wails build command. This will produce a software optimized for mainnet.

wails build -f -clean

To compile the optimization for fairground:

wails build -f -clean -tags fairground

Note that this step alone won't correctly bundle the application for fairground. Hacks must be performed to have the right bundle name, metadata and icon. See build.sh script for more detail.

More at the Wails documentation.

Development

The backend embeds files from the frontend/dist folder. On a new environment, the frontend/dist folder is not populated, and will result of the following failure if wails is run first:

pattern frontend/dist: cannot embed directory frontend/dist: contains no embeddable files

As a result, we need to run the frontend first, so wails can embed actual files for start up the app for the first time.

cd frontend
yarn build

Then run

wails dev

This will start the app running on localhost:34115, as well as starting up Vite to handle watching for any changes and hot reloading the frontend. See wails.json for further configuration options. For more details on developing the frontend code, check out the frontend readme.

Feature flags

These flags are passed as environment variables to the app. They are used to enable/disable features. For example:

VITE_FEATURE_MODE='fairground' wails dev

or

VITE_FEATURE_MODE='fairground' wails build

A full list of these can be found below:

Flag Description
VITE_FEATURE_NETWORK_WARNING Enable warning the user if the network is a different version for the one configured for the
VITE_FEATURE_TELEMETRY_CHECK Enable users being asked if they would like to send bug reports for the application
VITE_FEATURE_MODE Build the app in fairground mode with different styling/messaging that is mode specific

More commands

To generate the go bindings for the frontend, you can run:

wails generate module

Common issues

Too many open files
Error: EMFILE: too many open files, watch
    at FSEvent.FSWatcher._handle.onchange (node:internal/fs/watchers:204:21)

It is raised on macOS. It is fixed by installing watchman:

brew install watchman

Testing

Backend

To launch the backend tests, use the following commands:

go test ./...

End to end

Check out the frontend guide to see how to run the end-to-end tests.

Support

Documentation

Get API reference documentation and learn more about how Vega works.

Wallet documentation

Read a quick-start guide for tips on using the desktop wallet app.

Feedback

Raise issues and see what others have raised.

Discord

Ask us for help, find out about scheduled open sessions, and keep up with Vega generally.

About Vega

Vega is a protocol for creating and trading derivatives on a fully decentralized network. The network, secured with proof-of-stake, will facilitate fully automated, end-to-end margin trading and execution of complex financial products. Anyone will be able to build decentralized markets using the protocol.

Read more at https://vega.xyz.

vegawallet-desktop's People

Contributors

andywhitevega avatar asiaznik avatar candida-d avatar dalebennett1992 avatar daniel1302 avatar dependabot[bot] avatar dexturr avatar edd avatar fkondej avatar gordsport avatar jeremyletang avatar jtsang586 avatar karlem avatar mattrussell36 avatar mkjmdski avatar notbot00 avatar pennyandrews avatar radoslaw-szpiech avatar vacuumdreams avatar valentintrinque avatar wwestgarth avatar ze97286 avatar

Stargazers

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

Watchers

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

vegawallet-desktop's Issues

Ability to set vega home

Motivation

We would like to be able to have deterministic tests, so rather than using the wallet that is configured it would be helpful to be able to switch to different wallets to test different states and have a new state for each test.

There is already a CLI flag for this.

Wallet service clarification

Wallet Service as a menu item may not mean enough to a user - ideas for a better name? Should we also get rid of the word “proxy” here? It’s no longer used in the CLI. Connect to Console or Load Console might do the job.

  • Consider renaming wallet service
  • Replace usage of the word proxy on the service view with something easier to understand

Support creating a wallet

We want the user to be able to create its very first wallet through the desktop wallet at a location of his choice.

Align copy for service url, ports and proxies

  • Make labels used in the network config page (and edit page) align better with what is used in the footer to indicate running services and proxies
  • Consider url labels across token dApp and Console when connecting to wallet. These should be consistent
  • Rename proxies or possibly drop the word 'proxy'. Eg just 'Connect to console'

Further changes

  • Remove service page
  • Changes to footer to allow starting/stopping

Support getting keys

Users will want to see there keys. Need a way to access them. The equivalent of ./vegawallet.exe key list

No service config if you create a new wallet

If you create a fresh wallet using the app, and then try and retrieve the config using window.backend.Service.GetConfig nothing is returned. So you are unable to edit the config of your newly created wallet.

Edit hosts in config

The config edit form doesnt support editing your hosts. Would be good to be able to add and remove nodes from the list.

Add splash screen

Feature request: In a world where the wallet is opened with a UI... Have a splash screen open to give the user some feedback that the service is running, so that they can then continue with their task (e.g. launching console).

Screenshot 2021-03-30 at 12 15 57

It could include:

  • Version number
  • Link to launch Console (the splash screen close on "Open Vega Console"

Improve icon

To quote @mattrussell36:

One thing I’d also like to add to the list of things to do is to touch up the desktop icon a bit it doesn’t look quite right (at least on a mac)
We should:

  • round the corners
  • make sure the V is sharp, its a little blurry right now
  • Make it a tad smaller with some transparent background

Here it is in my dock:

C4BE0A73-8873-49B1-92D5-36D063322C48

Import network form changes

  • Don't require name field. Re-add advanced fields section to hide away the name field and force checkbox. If the users tries to import a network with a name that clashes with a current network. Lets programmatically open the advanced field section and highlight/focus the name field with suitable messaging
  • Clarify the file path vs URL import type. Its not 100% clear that you only need one of these fields. Perhaps we need a radio button to select between 'file path' and 'url'.
  • Add further guidance where required to help users import networks. Possible link to here https://docs.vega.xyz/docs/tools/vega-wallet/cli-wallet/latest/guides/manage-networks

Guidance on wallet page

After connecting to a wallet, I can see a truncated version of the public key and a wallet name. I don’t think it’s totally obvious what those are. They could use some headings, or guidance. (Will also help reinforce the terminology of “wallet name”)

  • Add headers for key alias and public key
  • Add label for wallet name eg 'Wallet name: <wallet_name>'

Display keys

Show the keys to the use once they have selected a wallet

Add changelog, project board Github actions and linked PR action version

To align with discussed processes in other repos and new processes discussed we will:

Add the GH Action to move new issues to the new project board for triage
Update the linked PR GH Action version
Add a GH Action to validate the changelog is updated
Back date the changelog so it can be updated moving forward from now on

Audit & improve error messages

Some of the error messages coming from the backend are not at all helpful for a user to self-debug.

Incomplete list of bad errors below. Worth checking every function provided by the backend.

Expose the console

We want to expose the console in the project the the future front end can call it.

The desktop application will access the wallet through the console.

Scrolling broken when going through the edit network page

Seems like the scrolling gets stuck when going to the edit network page then coming back to another page.

How to reproduce

  • Start the wallet
  • Go to the network page
  • Click edit
  • Scroll down to the bottom
  • Click on the wallet service tab without saving or anything
  • You're stuck!
Screen.Recording.2022-01-28.at.08.38.19.mov

User is not able to change version number

This use is unable to change the version on the input labeled * Version on http://localhost:3000/#/import/recovery-phrase
Screenshot 2022-01-21 at 13 07 24

hitting the up/down steppers does nothing,
can't delete the value and re-type
up/down keys do not change it.

Build & send transaction from the UI

Some users are willing to send handcrafted transaction but doesn't know how to craft one. Having a dynamic form to help them doing it could be good.

Recovery phrase interactive confirmation

Would be good to have some UI that makes users enter their recovery phrase after wallet creation to confirm that they have taken a copy of the phrase.

This could be manual entry of the words or perhaps clicking the words in the right order.

Toasts design changes

  • Make the x icon more squared off aligning with Vega style
  • Ensure text colors are readable on the different 'intent' backgrounds.

Perhaps adjust colors so intent colors work with black or white text for easier theming

More guidance for next steps after creating a wallet and keypair

Its not clear what a user should do next after having created a wallet and keypair. We should show some info about next steps, perhaps to do with importing a network configuration

  • Guidance copy shown after creating a wallet, possibly only shown the first time you create a wallet. Perhaps a different CTA to direct to import network
  • Possible guidance copy shown after generating a keypair The first keypair is now auto-generated

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.