Skip to content

Add the ability to exit offers to agoricWalletConnection in web-components #44

@WietzeSlagman

Description

@WietzeSlagman

What is the Problem Being Solved?

Dapp developers want their dapp users to be able to exit their offers through their own UI to give users a seamless experience, this us hard to develop at the moment and would require either of 2 solutions, which both have their own drawbacks and are not ideal.

1: dapp developers create a cancel offer function on their own contracts, which requires one of the 2 addiotnal things:

  • dapp developers have an exit subscriber that listens to offer exits that are transacted through wallet-app
  • dapp developers pass waived: null flag to their offers (currently breaks wallet-app)

2: dapp developers create their own interactive signer based on examples from wallet-app/ui-kit

Description of the Design

2 possible solutions:
1: add a method of exitOffer to makeAgoricWalletConnection

  • keeps the functionality more restricted and less error prone for the end-user
  • less freedom for dapp developers to create spendactions themselves

2: expose submitSpendAction(JSON.stringify(spendAction)) more freely

  • more freedom for dapp-developers (pro and a con)
  • smaller/cleaner code base

Security Considerations

Scaling Considerations

Test Plan

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions