Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add input_amount to events #451

Open
wants to merge 4 commits into
base: staging
Choose a base branch
from

Conversation

gianfra-t
Copy link
Contributor

@gianfra-t gianfra-t commented Feb 5, 2025

Addresses #371 and #412

Changes

  • Adds the parameter input_amount to wallet_connect, amount_type and form_error events.
  • We use the current amount on the form for these events. For amount_type we need to delay a few seconds to avoid the amount to just be 0 or the default. If the interaction with the form is with the tokens, then the initial default amount will be sent.
  • For wallet_connect a new minimal storage is added, to avoid passing props to the context.
  • For Add network_selected parameter #412, we add the the network id to the event with parameter name network_selected.

Tag manager

Adds a new variable {{DLV | input_amount}} and link it to wallet_connect, amount_type and form_error.
Adds a new variable {{DLV | network_selected}}, and link it to wallet_connect.

Tested on the preview of tag manager and all events now register this new parameter.

@gianfra-t gianfra-t linked an issue Feb 5, 2025 that may be closed by this pull request
Copy link

netlify bot commented Feb 5, 2025

Deploy Preview for pendulum-pay ready!

Name Link
🔨 Latest commit 7c32c67
🔍 Latest deploy log https://app.netlify.com/sites/pendulum-pay/deploys/67a5034e961d1c0008a3ff68
😎 Deploy Preview https://deploy-preview-451--pendulum-pay.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@gianfra-t gianfra-t marked this pull request as ready for review February 5, 2025 18:43
@gianfra-t gianfra-t changed the title Add input_amount to events [IN-PROGRESS] Add input_amount to events Feb 5, 2025
@gianfra-t gianfra-t changed the title [IN-PROGRESS] Add input_amount to events Add input_amount to events Feb 6, 2025
@@ -0,0 +1,37 @@
import { create } from 'zustand';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pendulum-chain/devs let me know if you like the addition of this state, if you prefer it to be more minimal (only fromAmount) or to avoid this altogether.

Although it adds extra code, I found it less confusing than passing fromAmount to the event context.

@gianfra-t gianfra-t requested a review from a team February 6, 2025 14:02
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.

Add parameter to the amount_type event on GA
1 participant