Agoric / dapp-inter

User application for Agoric Inter Protocol—Vaults, BLD Boost, Liquidations, etc.
2 stars 7 forks source link

Update dapp-inter smart wallet provisioning UX to accommodate auto-wallet provisioning change #214

Closed otoole-brendan closed 6 months ago

otoole-brendan commented 7 months ago

What is the Problem Being Solved?

In preparation for auto wallet provisioning where absent (https://github.com/Agoric/agoric-sdk/issues/8558) - there are dapp-inter changes we can make to accommodate this new flow/UX.

In current flow, a user is prompted with the 'You need to provision a wallet dialog that will cost 10BLD' if they connect Keplr on the app and no wallet is detected.

Description of the Design

Once #8558 is deployed - the desired flow will change to:

  1. User visits app.inter.trade
  2. User connects Keplr
  3. User configures new vault
  4. User clicks 'Create Vault'
  5. User is prompted with dialog that they will need 1IST in order to provision the wallet before being able to create the vault. They can opt to 'Proceed' (which will attempt to send the txn and should succeed if they have the IST required to provision and fail if they do not (Question @samsiegart can we customize the 'you don't have enough IST to provision a wallet' error message?)) , 'Get IST' or 'Cancel'. 'Get IST' brings up the Leap Elements modal to enable them to easily onboard IST. Hitting Cancel returns them to vault setup view.

Dialog Text + Design:

Title: 'Smart Wallet Required' 'To interact with contracts on the Agoric chain, a smart wallet must be created for your account. As an anti-spam measure, you will need 1 IST to fund its provision which will be deposited into the community fund. Click 'Proceed' to provision wallet and submit transaction.'

Security Considerations

N/A

Test Plan

Will be smoke tested

### Tasks
mhofman commented 7 months ago

In preparation for auto wallet provisioning where absent (Agoric/agoric-sdk#8558) - dapp-inter changes are required in order to accommodate this new flow/UX.

To be clear, the changes are not needed before auto-provisioning is deployed. The current manual provisioning should still work. It actually is likely simpler to only deploy the UI change after auto-provision is deployed.

otoole-brendan commented 7 months ago

Yep - apologies, I was aware of that having discussed with Sam yesterday. 'Required' is too strong...will update