Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Affiliate status messages #1675

Merged
merged 11 commits into from
Oct 26, 2021
Merged

Conversation

alongoni
Copy link
Contributor

@alongoni alongoni commented Oct 20, 2021

Summary

Closes #1343

Change status messages on Affiliate program.
image

To Test

Go to Profile page
Cases: (I Need help here to complete the steps to reproduce each case)

  1. Not connected: (complete steps). You should see the message: "Affiliate program: Please connect your wallet to participate."
  2. Own link: copy your referral link and paste it in the browser. You should see the message: "Affiliate program: Your affiliate code works! Any new user following this link would credit you their trading volume."
  3. Already traded: (complete steps). You should see the message: "Invalid affiliate code: The currently connected wallet has traded before or is already part of the affiliate program."
  4. Active: (complete steps). You should see the message: "Valid affiliate code: You can now do your first trade to join the program."
  5. Unsupported network. Change the network (different to Mainnet). You should see the message: "Affiliate program: Only Mainnet is supported. Please change the network to participate."
  6. Affiliate program error: Switch off the Internet, and follow a referral link. You should see the message: "There was an error validating existing trades. Please try again."
  7. Affiliate program error: (complete steps). You should see the message: "There was an error while uploading the referral document to IPFS. Please try again."

@alongoni alongoni added app:CowSwap CowSwap app Protofire Handled by Protofire development team labels Oct 20, 2021
@alongoni alongoni self-assigned this Oct 20, 2021
@github-actions
Copy link
Contributor

  • 🔭 GP Swap: Gnosis Protocol v2 Swap UI

@alongoni alongoni linked an issue Oct 20, 2021 that may be closed by this pull request
UNSUPPORTED_NETWORK: 'Only Mainnet is supported. Please change the network to participate',
NOT_CONNECTED: 'Please connect your wallet to participate.',
OWN_LINK: 'Your affiliate code works! Anyone new user following this link would credit you his trading volume.',
ALREADY_TRADED: 'Invalid affiliate code: Referral only valid for new accounts.',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alfetopito Maybe I'm a bit confused, but is this message ok? Not sure about "Invalid affiliate code".

Also I'll need some support from @elena-zh to test all cases.

Copy link
Contributor

Choose a reason for hiding this comment

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

What are you confused about? Do you think the message does not reflect the behaviour?

Messages are not 100% closed, feel free to suggest something different.
I'm sure when BD people review it they will ask for adjustments anyway hehe

Copy link
Contributor Author

@alongoni alongoni Oct 22, 2021

Choose a reason for hiding this comment

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

Thanks @alfetopito. I was referring to the comment Elena made later.

a user has already traded without a referral code
a user has already traded with a referral code?

For now I made the simplest way by adding the two cases in one sentence. If we want to split the messages, I can try it (surely with some help 😅 ).

@elena-zh
Copy link

Hey @alongoni , could you please mention 'special' cases I need to help you with?
Btw, I have retested existing changes. So here are some issues:

  1. it would be nice to remove 'Affiliate program:' from 2 banners
    need to remove
    remove2

  2. Then, the question to @alfetopito : do we need to separate cases for banners when

  • a user has already traded without a referral code
  • a user has already traded with a referral code?

IMHO, in order not to make it complicated, it would be nice to have 1 common message something like
Invalid affiliate code: The currently connected wallet has traded before or is already part of the affiliate program.
WDYT?

  1. As for invalid code message, I would suggest this one:
    Invalid affiliate code: please double check it and try again
    @alfetopito , does it work for you?

@alfetopito
Copy link
Contributor

Hey @alongoni , could you please mention 'special' cases I need to help you with? Btw, I have retested existing changes. So here are some issues:

  1. it would be nice to remove 'Affiliate program:' from 2 banners

👍

  1. Then, the question to @alfetopito : do we need to separate cases for banners when

    • a user has already traded without a referral code

    • a user has already traded with a referral code?

IMHO, in order not to make it complicated, it would be nice to have 1 common message something like Invalid affiliate code: The currently connected wallet has traded before or is already part of the affiliate program. WDYT?

On one hand, yes, both fall into the same case of "already traded".
On the other hand, if we can easily tell what's the reason (traded with a referral vs traded without) I don't see why not have 2 different messages for each case.

1. As for invalid code message, I would suggest this one:
   `Invalid affiliate code: please double check it and try again`
   @alfetopito , does it work for you?

👍

ACTIVE: 'Your affiliate link will be effective on next trade',
UNSUPPORTED_NETWORK: 'Only Mainnet is supported. Please change the network to participate',
NOT_CONNECTED: 'Please connect your wallet to participate.',
OWN_LINK: 'Your affiliate code works! Anyone new user following this link would credit you his trading volume.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
OWN_LINK: 'Your affiliate code works! Anyone new user following this link would credit you his trading volume.',
OWN_LINK: 'Your affiliate code works! Any new user following this link would credit you their trading volume.',

NOT_CONNECTED: 'Please connect your wallet to participate.',
OWN_LINK: 'Your affiliate code works! Anyone new user following this link would credit you his trading volume.',
ALREADY_TRADED: 'Invalid affiliate code: Referral only valid for new accounts.',
ACTIVE: 'Valid affiliate code: You can now do your first trade, to join the program.',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ACTIVE: 'Valid affiliate code: You can now do your first trade, to join the program.',
ACTIVE: 'Valid affiliate code: You can now do your first trade to join the program.',

@elena-zh
Copy link

elena-zh commented Oct 25, 2021

Changes look good to me, however, I was not able to check cases for an invalid affiliate link as validation is not yet implements (#1570). Also, I was not able to simulate an error with a failed IPFS upload.

For now, I think, It would be nice to add 'try again' to the 'There was an error validating existing trades' and 'There was an error while uploading the referral document to IPFS' messages
image

Also, it would be great to adjust test on banners in mobile views in order not to exceed the banner's area
mobile1
mobile

@elena-zh
Copy link

Hey @alongoni , notification text in banners look good to me in a mobile view.
But what about adding 'Try again' to the error banners?

@alongoni alongoni marked this pull request as ready for review October 26, 2021 12:42
Copy link

@elena-zh elena-zh left a comment

Choose a reason for hiding this comment

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

I managed to check the last error message. LGTM now
image

@alfetopito alfetopito added the Auto-merge PRs with this tag will be automatically merged when approved and CI succeeds label Oct 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:CowSwap CowSwap app Auto-merge PRs with this tag will be automatically merged when approved and CI succeeds Protofire Handled by Protofire development team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Affiliate status messages
3 participants