Skip to content

feat(desktop): add GoodDollar deposit option - #790

Open
kotevcode wants to merge 1 commit into
mainfrom
feat/gooddollar-deposit
Open

feat(desktop): add GoodDollar deposit option#790
kotevcode wants to merge 1 commit into
mainfrom
feat/gooddollar-deposit

Conversation

@kotevcode

Copy link
Copy Markdown
Contributor

Adds a "Deposit with GoodDollar" option under More options in the Add Credits chooser, below Meridian.

  • Clicking it opens GoodDollar's hosted AI-credits page (https://aicredits.gooddollar.org/) in the browser with buyerAddress and operatorSignature query params.
  • The main process reads the buyer's current operator nonce from the Deposits contract and signs the EIP-712 SetOperator message authorizing GoodDollar's operator wallet (0x192288D921045aa96903e5286E116960e5fb4607), so their side can submit setOperator() and run the $G deposit without the buyer paying gas.
  • URL and operator address are overridable via payments.gooddollar.{url,operator} in the desktop config.
  • The row uses GoodDollar's official mark with a Celo network badge and a "Pay with $G" caption; the button disables while the signature is being prepared.

Note for the GoodDollar side: the signature only covers the initial setOperator() — if a buyer already has an operator set, the call reverts with OperatorAlreadySet and their page needs a transferOperator path instead.

CHANGELOG updated under Unreleased.

Adds a Deposit with GoodDollar row under More options. The main process signs an EIP-712 SetOperator authorization for GoodDollar's operator wallet at the buyer's current on-chain nonce and opens their hosted AI-credits page with buyerAddress and operatorSignature query params. URL and operator are overridable via payments.gooddollar config. The row uses GoodDollar's official mark with a Celo network badge.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant