Code Monkey home page Code Monkey logo

fuels-portal's Introduction

fuels-portal's People

Contributors

danielbate avatar luizasfight avatar luizstacio avatar matt-user avatar rubyt0x avatar tomiiide 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  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

fuels-portal's Issues

Create E2E test to tx list when fuel wallet changes

Objective:

make sure transaction list reacts well when account is changed inside fuel wallet
In order to reach this we want to think on scenarios that could tested making sure UX is good and stable.

Implementation:

this is my suggestion, but other scenarios can be introduced:

  • When setup the test env, create 2 more accounts in the fuel wallet
  • When connect to fuel wallet, connect only account 1 and account 2
  • Keep executing all tests and transactions in account 1
  • On this way we have:
    • account 1 - connected and has transactions
    • account 2 - connected but has no transactions
    • account 3 - not connected
  • After finishing other tests (deposit, withdraw etc..), add this last test:
    • test.step("Check if transaction list reacts well to fuel wallet changes")
      • should change between accounts in the wallet and check transaction list response
        • change to account 1 should enable loading + show transactions made before
        • change to account 2 should enable loading + show empty feedback
        • change to account 3 should show "connect your wallet" (but without going to loading)

fix: rate limit

For users with multiple (many) txs they hit the rate limit of 10 requests/s for each IP. We need to implement a way to replace fetch with something that has a rate limit to queue the requests, with minimal changes.

Create E2E tests for covering more scenarios and improve stability

Objective

Ensure UX experience is good and stable

Implementation

  • assets showing even if accounts are disconnected
  • Internal loading of dialog
  • select withdraw, go to transactions, and go back to the bridge. Validate withdraw is showing correctly
  • Stepper (Time left showing)
  • Loading status of tx items (avoid blinking)
  • data is cached correctly (done status)
  • wallet still connected after refreshing

Bridge UI

I think the second image looks better than the first (current) one. It's subjective but putting up the suggestion.

Current

2

Suggestion

Note:

  • Header content is slightly further to the sides
  • No bridge name / heading
  • Bridge / History toggle is centered
  • Overall bridge menu is lower on the page

1

Refactor and improve wallet test-utils

We need to refactor the test-utils package in the wallet so it can be used in other frontend projects.

Improvements:

  • refactor the package to make it class based instead of a file of functions?
  • add account
  • add network
  • make the functions more robust (ex: work even when the wallet page is not at the default page)

Create connect Fuel Wallet Component

This issue should;

  • Create a connect button to connect to Fuel Wallet
  • Open a modal to select the wallet provider
  • Add hooks to work with the data from the connected accounts

ETH Network Component

FRO-5

User Story: As an end user, I shall be able to connect my Ethereum account(s) and switch between them to easily interact with the platform using my preferred wallet provider and account.

Acceptance Criteria:

  1. If no account is connected, a "Connect Wallet" button should be displayed.
  2. When the "Connect Wallet" button is clicked, a popup should appear listing the main Ethereum wallet providers.
  3. Users should be able to select a wallet provider and connect multiple accounts.
  4. After connecting an account, the "Connect Wallet" button should be replaced with a button displaying the current address.
  5. When the current address button is clicked, a popup should open, allowing users to switch between connected accounts.
  6. The popup should also include a button to connect more accounts.
  7. The ETH Network Component should utilize the Wagmi library to support multiple wallet providers simultaneously.
  8. The base component should abstract the layout to be reused for the Fuel Network Component.

ConnectNetwork/idle - Fuel Portal Product Board (Figma)

improve erc20 deposit error message

If a user attempts to deposit an erc20 token to fuel with no eth on the fuel side they will get an error "not enough resources to fit…". The error message instead should be something like "Error: erc20 deposit requires eth on Fuel. Please faucet/deposit eth into your fuel wallet.

Refresh history page, get stuck on a empty screen

I started to experience an issue on the current version, with an account connected with a transaction on the history already cached, if I refresh the page the history is not loaded and the screen is stuck empty.

UX Feedback: To Many Connect Buttons

On the bridge deposit and withdrawal there are too many first action buttons.

Problem:

As a user I'm confused which one to click first (as there are three highlighted potential actions).

Potential Solution:

Highlight the first connect button for each flow, then disable the others until the first required connect action is completed.

This way the user has less to think about when they come to the flow.

Further Idea:

The last connect button should just be the final deposit / withdraw button disabled, having it as a third connect button in the initial state seems confusing.

Screen Shot 2023-06-22 at 2 46 26 PM Screen Shot 2023-06-22 at 2 45 46 PM

Deposit Processing Steps Component

FRO-12

User Story: As a user, I shall be able to track the progress of my deposit through a series of processing steps, so that I am aware of the status of my deposit until it is completed.

Acceptance Criteria:

  1. Each processing step should have three statuses: open, pending, and complete.
  2. The following steps should be displayed with their respective statuses:
    1. Receiving Deposit:
      1. Open: Before the deposit is submitted.
      2. Pending: When the transaction is pending confirmations on the ETH Network.
      3. Complete: Transaction has confirmations on the ETH Network.
    2. Settlement:
      1. Open: Before the previous step is complete.
      2. Pending: When the previous step is complete, and now we are in the 15-minute waiting period.
      3. Complete: When the message is received on the Fuel Network side.
    3. Confirm transaction (Automatic):
      1. Open: Before the previous step is complete.
      2. Pending: After the previous step is complete.
      3. Complete: After the message is relayed on the Fuel Network and the assets are transferred to the receiver account on Fuel.
    4. Receive funds (Automatic):
      1. Open: Before the previous step is complete.
      2. Pending: After the previous step is complete.
      3. Complete: When the amount is received in the account on Fuel.

Additional Requirements:

  1. For tracking ETH transactions, use the ETH provider to query events and transaction IDs, as well as the ETH Account address.
  2. For tracking Fuel transactions, use the Fuel Network GraphQL or, if needed, build an indexer.

Frame 34321 - Fuel Portal Product Board (Figma)

fix: tx cache miss

The tx machine is skipping over getReceipts bc the tx is marked as done.

Assembly ETH Withdraw Feature

FRO-13

User Story: As a user, I shall be able to withdraw ETH to the Ethereum Network, so that I can move my assets out of the Fuel ecosystem and utilize them elsewhere.

Acceptance Criteria:

  1. The button on the form should display different states based on the form's current status: a. Connect Fuel Wallet: When no Fuel account is connected. b. Connect ETH Wallet: When no ETH account is connected. c. Pick Asset and Amount: When no Asset or Amount is inserted. d. Insufficient Funds: When the inserted amount is bigger than the Fuel Account balance. e. Withdraw Asset: When all requirements are met.
  2. The withdrawal script should be executed with the user-selected amount upon clicking withdraw.
  3. Display a warning below the amount input: "You will need to have ETH on the Account on Ethereum Network to pay for the confirmation transaction."
  4. After user approval, the Withdraw Processing Steps Component should be displayed.
  5. Users should see a warning below the entire form with the text: "Withdraw can take up to 7 days to be available back to Ethereum. Learn more about our architecture and security in our docs."

Frame 106 - Fuel Portal Product Board (Figma)

feat: deposit page

Preview deposit tx details.

  • estimate gas from ETH
  • amount received on Fuel
  • eta of transfer (start with 10min hardcode)

Should change the stepper text after completion

Assembly ETH Deposit Feature

FRO-10

User Story: As a user, I shall be able to deposit ETH on the Fuel network so that I can utilize my assets within the Fuel ecosystem.

Acceptance Criteria:

  1. The button on the form should display different texts based on the form's current state:

    a. Connect ETH Wallet: When no ETH account is connected.

    b. Connect Fuel Wallet: When no Fuel account is connected.

    c. Pick Asset and Amount: When no Asset or Amount is inserted.

    d. Insufficient Funds: When the inserted amount is bigger than the ETH Account balance.

    e. Bridge Asset: When all requirements are met.

  2. Upon clicking deposit, a transaction should be created to the FuelPortal contract, executing the deposit script with the user-selected amount.

  3. After user approval, the Processing Steps Component should be displayed.

  4. Users should see a warning below the form with the text: "Any assets deposited to Fuel takes 7 days to withdraw back to Ethereum. Learn more about our architecture and security in our docs."

Additional Requirements:

  1. The deposit script can be found in the scripts folder; all contract IDs should be placed in environment variables.
  2. If possible, gas cost estimation should use ETH gas estimation; if not, this part can be removed.

Frame 106 - Fuel Portal Product Board (Figma)

Bridge: connecting wallets (bug)

As a new user that wants to use the bridge I must install 2 non-custodial wallets.

  • A wallet of my choice for Ethereum (MetaMask)
  • A wallet of my choice for Fuel (official Fuel wallet)

Upon successful installation of the wallets I would like to connect the wallets to the bridge.
In order to connect I click the respective "connect <wallet>" buttons.

The same pop-up to install wallets comes up because the site has not recognized that I have installed the wallets. In order to make the feature work as expected I had to refresh the page.

Upon refreshing the page clicking the "connect <wallet>" button prompted the pop-ups requesting connection and thus behaving as expected.

Ecosystem Page: Adapt the UI to the new JSON structure

Each project should have, if specified a link to twitter/X and Discord, and should have a Status (Building, Beta-3, Beta-4), etc.
// "isLive": false,
// "name": "Acumen Microfinance",
// "tags": "DeFi,Lending,Real World Assets",
// "description": "Bridging DeFi and Real-world assets on Fuel Network",
// "image": "acumen",
// "website url": "https://acumen.network/",
// "twitter url": "https://twitter.com/acumenofficial",
// "discord url": "https://discord.gg/vnUPngfB5D",
// "status": "Building"

Add Asset button to AmountInput on fuel-ui

The current AmountInput does not support showing the asset information. The idea here is to add a button inside the input to enable the feature the click on the button to open a selector.

The Input should follow the swayswap style;

Screenshot 2023-03-21 at 16 59 08

Add to the button;

  • Button with icon and symbol
  • If not asset is passed not show the button
  • If the Input is disabled, the button should be disabled
  • If not onClickAsset is passed, the button is disabled
  • Add props to the component
    • onClickAsset?:
    • asset?:

feat: withdraw page

Preview tx details

  • estimate gas on fuel
  • amount received on eth
  • estimate gas on eth
  • eta transfer (start with hardcoded estimate 10min)

Should change stepper text after completion

Create connect ETH Wallets Component

This issue should;

  • Create a connect button to connect to ETH wallets
  • Use wagmi as a lib for connecting multiple accounts
  • Open a modal to select the wallet provider
  • Add hooks to work with the data from the connected accounts

feat: address input

Show the current address selected for the operation
Have an arrow dropdown that enables to switch to other accounts - on the bottom show the link to connect other accounts

Bridge: History inaccurate message for user

One word adjustment.

The text says that the wallet is not "detected" which has a different implication from not being "connected".

I think it would be better to change "detected" to "connected" here.

1

Withdraw Processing Steps Component

FRO-14

User Story: As a user, I shall be able to track the progress of my withdrawal through a series of processing steps so that I am aware of the status of my withdraw until it is completed.

Acceptance Criteria:

  1. Each processing step should have three statuses: open, pending, and complete.
  2. The following steps should be displayed with their respective statuses:
    1. Submit Withdrawal:
      • Open: Before the withdrawal is submitted.
      • Pending: When the transaction is pending confirmations on the Fuel Network.
      • Complete: Transaction has confirmations on the Fuel Network.
    2. Withdrawal Settlement:
      • Open: Before the previous step is complete.
      • Pending: When the previous step is complete, we are in the 7-day waiting period.
      • Complete: When the message is received on the ETH Network side.
    3. Confirm transaction (Manual):
      • Open: Before the previous step is complete.
      • Pending: After the previous step is complete, the user must manually confirm the transaction.
      • Complete: After the message is relayed on the ETH Network, the assets are transferred to the receiver account on ETH.
      • User Interaction: When the Confirm transaction step is open, the user should be able to click on a "Confirm transaction" button that will execute the relay transaction on the Ethereum Network.
    4. Receive funds (Automatic):
      • Open: Before the previous step is complete.
      • Pending: After the previous step is complete and the transaction for confirmation is pending confirmation.
      • Complete: When the transaction is confirmed, and the amount is received in the account on ETH.

Additional Requirements:

  1. For tracking ETH transactions, use the ETH provider to query events and transaction IDs, as well as the ETH Account address.
  2. For tracking Fuel transactions, use the Fuel Network GraphQL or, if needed, build an indexer.

Frame 34321 - Fuel Portal Product Board (Figma)

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.