Skip to content

Convert buy G$ to a goodwidget #94

Description

@sirpy

Short description of the new GoodWidget

The widget should enable the user to buy G$ using fiat.
It is primarily based on onramper widget that buys a stable token on Celo into a user owned smart contract.
Then the smart contract converts it to G$ and sends it back to the user wallet.

Which repos and packages the AI should work with

use @gooddollar/web3-sdkv2 for the buy G$ sdk

The wrapper which provides the basic layout and UI for the widget is here:
https://github.com/GoodDollar/GoodProtocolUI/blob/faf0c5c9a9a4c98d89de00a0db3d272893fba63d/src/pages/gd/BuyGD/index.tsx

The widget itself is in the good-design package here:
https://github.com/GoodDollar/GoodWeb3-Mono/tree/2c29a24130f1152830222da41a6d15992ff6bdef/packages/good-design/src/apps/onramp

The code for the web3-sdkv2 for buy G$
https://github.com/GoodDollar/GoodWeb3-Mono/blob/2c29a24130f1152830222da41a6d15992ff6bdef/packages/sdk-v2/src/sdk/buygd/react.tsx

UI implementation reference

Use the UI from the above goodprotocolui and good-design repos as reference.
Use GoodWidget components to implement the UI.

User flows, states and behaviours

Make UX friendly

Create the plan (keep this section in the issue body)

Create the plan

Based on the above description create an execution plan in a new sub-issue and preserve the original issue content unchanged.
Do not execute the plan until given instructions to do so.

Sub-issue requirements:

  • Title format: [DRAFT][PLAN] <what issue is being planned>
  • Type: Task
  • Description must start with: <sub-issue title>
  • Link the sub-issue back to this parent issue.

Instructions when creating the plan:

  • Map relevant files that are too be used as reference from all repos mentioned
  • import existing @GoodDollar packages
  • Map new components that should be created. Assess when a new component should be created in the new savings widget package or made part of the reusable packages/ui

Plan specification required sections:

  • Required states, flows, and behaviors
  • Execution plan
  • acceptance criteria
  • human-reviewer checklist

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status
    Prepare AI Task

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions