Skip to content

Pay modal

Emiliano Balbuena requested to merge feat/pay-modal into master

Summary

Switches Wire modal for Pay branded modal using 2020 designs.

Closes #2735 (closed).

Steps to test

These are basic test steps procedures using OffChain tokens. Since Pay is complex (multiple points of access, currencies, etc), it'll require a detailed test plan on a staging-like server before any releases.

Preparation

For these tests, you'll need 3 users:

  • User A: Normal user, not an admin and should have tokens
  • User B: Normal user, should have at least an activity posted and Wire rewards set (both currencies)
  • User C: Pro user, should have at least an activity posted and Wire rewards set (both currencies)

Direct channel Wire, daily limit and balance

  • Log in with A
  • Write down your OffChain balance displayed on Wallet page
  • Go to B's channel
  • Press the big WIRE ME button
  • Check the Wallet Balance displayed matches what you saw on the Wallet page. It might take a couple of seconds to load.
  • Type 9999999999999 in the amount field
  • Ensure you see a Cannot spend more than <X> tokens today error and Send button is disabled
  • Type a number that's beyond your balance, but less that the daily limit you saw in the above assertion in the amount field. If that's not possible (your balance is bigger than the daily limit), just move on to the next case.
  • Ensure you see a Cannot spend more than <X> tokens error and Send button is disabled
  • Type 0.001 in the amount field, ensure currency is set to Tokens and toggle is pointing to Off-Chain
  • Press Send
  • Go to your Wallet page and ensure the amount got deducted.

Direct Pro channel Wire

  • Log in with A
  • Write down your OffChain balance displayed on Wallet page
  • Go to B's pro channel
  • Press the Wire nav entry
  • Type 0.001 in the amount field, ensure currency is set to Tokens and toggle is pointing to Off-Chain
  • Press Send
  • Go to your Wallet page and ensure the amount got deducted.

Indirect channel Wire through an Activity

  • Log in with A
  • Write down your OffChain balance displayed on Wallet page
  • Go to B's channel
  • On the feed, click on the lightning bolt on any activity
  • Type 0.001 in the amount field ensure currency is set to Tokens and toggle is pointing to Off-Chain
  • Press Send
  • Go to your Wallet page and ensure the amount got deducted.

Activity paywall

  • Log in with B
  • Create a new activity with using the Monetization feature (using 0.002 as value)
  • Log in with A
  • Write down your OffChain balance displayed on Wallet page
  • Go to B's channel and find the new activity, click on the lightning bolt
  • Click on the Unlock button, Pay modal should show up with the amount and currency pre-filled
  • Press Send
  • Go to your Wallet page and ensure the amount got deducted.

Note: It looks like the new activity component doesn't support paywalls yet.

Channel Rewards (subscription tiers) pre-fill based on channel widget

  • Log in with A
  • Go to B's channel
  • Click on the lightning bolt on all rewards, ensure the Pay modal is pre-filled accordingly (currency, amount and Repeat checkbox)
  • Check that all the rewards are being correctly pre-filled. No need to press Send.

Estimated Regression Scope

This feature affects Wire frontend functionality: Modal components, validations, building the server request payload. It also changes how Wire modal displayed and its response outputted, so there might be old (v1) Wire modal functionality regressions.

Edited by Emiliano Balbuena

Merge request reports