Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Binance Version 2 Trading Widget #9118

Closed
ryanml opened this issue Apr 9, 2020 · 2 comments · Fixed by brave/brave-core#5160 or #9172
Closed

Binance Version 2 Trading Widget #9118

ryanml opened this issue Apr 9, 2020 · 2 comments · Fixed by brave/brave-core#5160 or #9172

Comments

@ryanml
Copy link
Contributor

ryanml commented Apr 9, 2020

https://docs.google.com/document/d/1RGIfaPyfY9v7QRx2e5B4k1W88oRHxUNSKlaMjzFDY-s/edit#heading=h.lzlktw5ja2pg

There are some deviations from the doc, as per recent changes, notably:

  1. Hiding account balances by default
  2. API keys are not in use, rather we are using the new Oauth method of authenticating users.
  3. The widget is built in to the new Crypto Stack as opposed to being standalone.

Test Plan:

Pre-requisite: Ensure you are signed up for Binance.com

  1. Ensure that the functionality of the Buy widget is maintained as per existing behavior. This also includes checking the show/hide widget menu functionality for regressions.
  2. Ensure that for .com users, clicking Connect via the Buy screen leads you to the Oauth flow for Binance.com, where you can authorize the Brave NTP widget.
  3. Upon being redirected back to the NTP, you should see the full widget realize after being authed, starting on the deposit screen.

Deposit View:

  1. Ensure that assets filter and can be searched via the search input.
  2. Ensure that each asset can be clicked in to for a detail view.
  3. For addresses that are available, ensure that a "Copy" button is present, upon which clicking will copy the asset address to your clipboard. The QR code icon should be clickable to render a full widget window. Upon scanning this QR code it should render as the asset address. Exiting out of the screen should lead back to the deposit view.
  4. For unavailable addresses, neither the QR icon or copy button should be present.

Buy View:

This is expected to be the same as the initial un-authed Buy screen, just contained within the view.

Convert View

  1. Ensure that changing the asset you wish to convert updates the available balance displayed for that asset.
  2. Ensure that the available "Convert To" options change along with that asset (not every asset can be converted in to another.)
  3. Ensure that you can not enter amount an amount greater than the balance of the convert from asset ("Upon hitting preview conversion you should receive an error")
    Note, very small amounts cannot be accepted for conversion, please at least try $10 of ETH or the source asset
  4. Ensure that when entering an acceptable <= amount, you are greeted with a conversion preview screen. With a counter down from 30 seconds.
  5. Ensure that after thirty seconds have passed, that the quote expires and the conversion preview screen goes away.
  6. Ensure that trying again produces another preview screen, and that clicking on "confirm" leads to a successful conversion screen.
  7. Refresh intervals are every 30 seconds for balance, but conversion results take a few minutes. Ensure the widget conversion balance values are ultimately reflected with what displays in your binance.com dashboard.

Summary view:

  1. The BTC asset should be the first and most prominent asset, with the account value in Bitcoin and subsequent value in USD. In smaller, less prominent form, all respective assets with their totals and USD values should be listed.
  2. Clicking the "eye" to the right of the BTC item should obscure/unobscure all balances/values. This should persist upon reload.

Widget Menu.

Via the widget menu (ellipsis) while logged in, the following options should be available:

  1. Refresh: Clicking this should refresh account balances/ USD values at any time.
  2. Disconnect: Following this flow should log the user out of the advanced widget and bring them back to the initial un-authed buy view. Users should be able to re-connect the same way they initially did.
@srirambv
Copy link
Contributor

Verification notes on nightly build 1.9.21 and 1.9.24 is here for reference brave/brave-core#5160 (comment)

@srirambv
Copy link
Contributor

srirambv commented Apr 28, 2020

Verification passed on

Brave 1.8.85 Chromium: 81.0.4044.122 (Official Build) (64-bit)
Revision 44f4233f08910d83b146130c1938256a2e05b136-refs/branch-heads/4044@{#963}
OS Windows 10 OS Version 1809 (Build 17763.1158)
  • Verified test plan from Binance Version 2 Trading Widget #9118 (comment)
  • Verified able to successfully connect to Binance widget
  • Verified able to disconnect and reconnect to the widget
  • Verified able to successfully convert assets after connecting
  • Verified deposit balance shows up after specified amount of time
  • Verified widget state is not lost when browser is closed and relaunched
  • Verified asset address and QR code is shown correctly when available
  • Verified widget shows correct error messages when conversion fails
  • Verified preview conversion is auto-dismissed after 30sec
  • Verified manually able to refresh the balance via menu button
  • Verified visiting Binance page and logging out doesn't disconnect the widget state

Verification passed on

Brave 1.8.85 Chromium: 81.0.4044.122 (Official Build) (64-bit)
Revision 44f4233f08910d83b146130c1938256a2e05b136-refs/branch-heads/4044@{#963}
OS macOS Version 10.15.4 (Build 19E287)
  • Verified test plan from Binance Version 2 Trading Widget #9118 (comment)
  • Verified able to successfully connect to Binance widget
  • Verified able to disconnect and reconnect to the widget
  • Verified able to successfully convert assets after connecting
  • Verified deposit balance shows up after specified amount of time
  • Verified widget state is not lost when browser is closed and relaunched
  • Verified asset address and QR code is shown correctly when available
  • Verified widget shows correct error messages when conversion fails
  • Verified preview conversion is auto-dismissed after 30sec
  • Verified manually able to refresh the balance via menu button
  • Verified visiting Binance page and logging out doesn't disconnect the widget state

Verification passed on

Brave 1.8.85 Chromium: 81.0.4044.122 (Official Build) (64-bit)
Revision 44f4233f08910d83b146130c1938256a2e05b136-refs/branch-heads/4044@{#963}
OS Linux
  • Verified test plan from Binance Version 2 Trading Widget #9118 (comment)
  • Verified able to successfully connect to Binance widget
  • Verified able to disconnect and reconnect to the widget
  • Verified able to successfully convert assets after connecting
  • Verified deposit balance shows up after specified amount of time
  • Verified widget state is not lost when browser is closed and relaunched
  • Verified asset address and QR code is shown correctly when available
  • Verified widget shows correct error messages when conversion fails
  • Verified preview conversion is auto-dismissed after 30sec
  • Verified manually able to refresh the balance via menu button
  • Verified visiting Binance page and logging out doesn't disconnect the widget state

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment