Giter VIP home page Giter VIP logo

rise-react-wallet's People

Contributors

roosmaa avatar tobiaszcudnik avatar vekexasia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

ben-haim

rise-react-wallet's Issues

Navigation in setting dialogs is incorrect

Currently the settings dialogs only features the close button, however, depending on the step in the different flows, that isn't always correct.

For example, the vote for delegate flow:

  • Step 1 (selecting the delegate). The close button should be visible
  • Step 2 (confirming the transactions). The back button should be visible taking the user back to previous step & the close button should be visible to get back to settings.
  • Step 3 (broadcasting transactions). The user should not be able to exit the dialog (no back nor close button). The ESC key should also not close the dialog.
  • Step 4 (broadcast success/error result). The close button is visible again.

Validations tracking issue

  • register delegate form - username
  • register delegate form - balance
  • send transaction form - recipient, amount input, balance
  • confirm transaction form - mnemonic, 2nd passphrase (see below) [#56]
  • remove account form
  • confirm transaction form - confirm (new) 2nd passphrase #54
  • 2nd passphrase

Switching between accounts quickly loads wrong transaction list

When switching between accounts quickly, the transaction list loaded can be that of the previously selected account.

Steps to reproduce:

  • Enable "Disable cache" and speed throttling ("Fast 3G") in dev tools
  • Click between two or more accounts ~500ms apart (eg select "Account 1" and then "Account 2")
  • Notice the transaction details shown are for the previous account (eg "Account 1" details when "Account 2" is selected)

Do not use floats for amounts

// corrects the int amount from the server to a user-readable float
export function amountToUser(amount: number|string) {
return parseInt(amount.toString(), 10) / 100000000;
}
export function amountToServer(amount: number|string) {
return parseInt(amount.toString(), 10) * 100000000;
}

We should not be using floats to represent money. Floats by design cannot represent exact values and it is bound to create weird bugs down the line, where the user enters a value with many decimal places and then ends up sending a different value.

A proper decimal (library) that represents the value exactly should be used instead.

Tweak the global theme colors

The current theme colors result in this bright green color for UI elements (settings toggle, FAB [if not overriden]). A better color combination should be selected in the global theme provider for everything to look nice without having to override colors constantly.

Accessibility problems tracking issue

This is a tracking issue for various accessibility problems we still need to address.

  • Progressing to transaction overview and onwards is invisible to the screen reader
  • The account overview isn't really usable with a screen reader
  • Use <a href> for navigation elements - #85
  • Security tips are visible to screen reader before the button click
  • Settings pinned account button doesn't expose current value to accessibility tools
  • Migrate forms to dedicated dialogs with correct labelledby and describedby attributes
  • Modal dialog header buttons lack accessibility titles - #47
  • Verify mnemonics visual word placement indicator should be aria-hidden
  • AppBar comes before drawer content for accessibility tools when drawer is permanently open
  • AccountIcon should be aria-hidden to reduce the screen reader noise

Transaction details

  • dont show the ID for second sig, voting nor delegates
  • time, confirmations, amount, fee, usd

Initial UI designs for account settings

Disclaimer 1: I will be editing the issue description to contain the latest mocks, if you have any comments regarding a mock, please copy the URL of that image into your comment so that the context of your comment would survive my edits

Disclaimer 2: the mocks are more meant to indicate the flow and general design direction. They will have some padding, spacing and font size issues which will be tweaked in the conversion to HTML step.

Account settings

Account settings UI mock

Remarks:

  • Each of the rows is a button. All of the editing will happen via modal dialogs, with the exception of "Pinned account" setting as this is a simple toggle and can automatically change it's value without a dialog.
  • On smaller screens the value span can be displayed under the label span (and aligned left).
  • For watch-only accounts the voting, 2nd passphrase & delegate registration fields should be disabled, but still show the correct state (what the account is voting for, if the 2nd passphrase is set and if they are registered as delegates)
  • Most of the modals follow the same-ish conventions as the on-boarding dialogs

Update account name

Update account name UI mock


Select FIAT currency

Select preferred currency UI mock

Remarks:

  • The FIAT field is a native <select> element (for good experience on mobile)
  • Use has two options, either update FIAT for the current account, or for all accounts in their wallet. This is mostly because we don't have global settings section yet (there's not enough content for it), so we have the FIAT selection under account settings instead.

Add 2nd passphrase

Add 2nd passphrase UI mock - 1st step

Remarks:

  • The mock shows 2 states at once. If the account has insufficient balance, the field and button shouldn't be shown. If there's enough balance the red error message shouldn't be shown.

Add 2nd passphrase UI mock - 2nd step

Remarks:

  • This is actually the app-wide shared component for transactions.
  • Even though the account doesn't have the 2nd passphrase set yet, we pretend it is to verify that the user actually knows the passphrase they entered in the previous step. [#54]
  • Since there's no recipient for funds, only the network transaction we display the RISE logo instead of the recipient account image
  • On mobile, the sender labels might have to be moved on top of the sender account image. Then the images are on the same line and then followed by the recipient information on the next line.

Add 2nd passphrase - 3rd step


Add 2nd passphrase - success


Add 2nd passphrase - failure

Remarks:

  • If the reason why the submission failed was due to connectivity problems, the "Try again" button should be visible and resend the same signed tx that's in the memory. If the error is some account state related and the signed TX itself is invalid and will never be accepted, the "Try again" button should be hidden. [#35]

Cast a delegate vote

Cast vote UI mock - 1st step

Remarks:

  • The "R:", "U:" and "A:" should be replaced with appropriate icons, on hover the tooltip will appear to explain what they are exactly.
  • When the search box is empty, we show the suggested delegates, which is 3 random delegates selected from the 101 active delegates
  • If the delegate displayed is currently voted for by the user, the "cast vote" button is replaced with "remove vote" (in red text) button

Cast vote UI mock - 2nd step


Cast vote UI mock - 3rd step

Remarks:

  • The flow from this dialog continues as above for the "add 2nd passphrase"

Delegate registration

TODO

Remove account

Remove account UI mock


Account URLs should include the address

Currently the URL mapping is as follows:

  • /wallet
  • /wallet/settings
  • /wallet/send

We should migrate to the following:

  • /accounts/:address (e.g. /account/1231413R) for account overview
  • /accounts/:address/settings for account settings
  • /accounts/:address/send for sending from a specific account
  • /accounts for the list of all accounts (accessible from drawer if user has too many accounts)

ES modules build for modern browsers

ES modules build for modern browsers will allow us to avoid transpilation for runtimes which dont need it. Should work based on the script[nomodule] attribute.

The first transaction doesn't show until another one is made

It seems that the first receive transaction doesn't show under the account overview. Only after another transaction is made, does it show up.

Steps to reproduce:

  • Create new account
  • Send some RISE to it
  • Observe the account balance update, but no transaction shows up

Global loading indicator component

Global loading indicator component component should be used in App.tsx and Wallet components before the selected account has been loaded

Use context dependent transaction summaries in account overview

Currently the transaction list looks like:

Screenshot of transactions in account overview

The screenshot above has these issues:

  • "Transfer from X (Y)" label should be "Transfer from Y" as there is no address book entry for that sender
  • "Transfer to Cast Vote (Y)" should be "Cast vote for Z" (or "Remove vote from Z") (where Z is the delegate username)

So all of the possible transaction summaries should be verified to be correct.

Global error handler

We should handle uncaught exceptions with a global error handler, either showing a msg to the user or redirecting to a fallback URL (or both).

Delegate search is case sensitive

Delegate search should be case insensitive, but currently it is case-sensitive. For example, when searching for cor and Cor, the results are different.

I don't want to just lowercase the user input as that is probably wrong (as delegates can contain uppercase letters as well). Most likely the API request needs to indicate that this is a case insensitive search.

Chance of duplicate delegate suggestions

const rand = uniqueRandom(0, active.length - 1);
this.setState({
loadingDelegates: false,
displayedDelegates: [active[rand()], active[rand()], active[rand()]],
});
} else {

The code snippet above has a small chance of picking a single delegate into 2 (or more) slots.

One option to fix this would be to shuffle the whole active array and then just selecting a slice from that.

Error state for transaction dialogs

Currently there's no errors form the API we use to submit transactions we don't really have a way to implement proper behaviour for the error states of the transaction dialogs.

The following things need to be implemented:

  • Error messages for transaction dialogs, passed from API methods to the ConfirmTransactionDialog.
  • Correct behaviour for the "Try again" button.

The behaviour for the "Try again" button is defined in #1 as:

If the reason why the submission failed was due to connectivity problems, the "Try again" button should be visible and resend the same signed tx that's in the memory. If the error is some account state related and the signed TX itself is invalid and will never be accepted, the "Try again" button should be hidden.


Blocked by: #22

Eject create-react-app configs

Eject create-react-app configs to be able to customize

  • es7 for dev env (non-transpiled await etc)
  • remove babel from the build chain

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.