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

[Affiliate] Referral address is removed from the local storage after successful Wrap/Approve transaction #1869

Closed
elena-zh opened this issue Nov 17, 2021 · 7 comments · Fixed by #2484
Assignees
Labels
app:CowSwap CowSwap app Bug Something isn't working Medium Severity indicator. It causes some undesirable behavior, but the system is still functional Protofire Handled by Protofire development team

Comments

@elena-zh
Copy link

elena-zh commented Nov 17, 2021

  1. Share a referral code
  2. Open the referral code by a user
  3. Run successful Wrap/Approve transaction

AR: referral code is removed from the local stirage
https://watch.screencastify.com/v/yz12UmrqgX2y2MIodjOQ

ER: referral code should not be removed after Wrap/Approve transaction
(only after a successful order)

@elena-zh elena-zh added app:CowSwap CowSwap app Protofire Handled by Protofire development team Medium Severity indicator. It causes some undesirable behavior, but the system is still functional Bug Something isn't working labels Nov 17, 2021
@elena-zh elena-zh changed the title [Affiliate] Referral address is removed from the local storage after successful Wrap/Unwrap/Approve transaction [Affiliate] Referral address is removed from the local storage after successful Wrap/Approve transaction Nov 17, 2021
@elena-zh
Copy link
Author

  1. I shared a referral link https://cowswap.staging.gnosisdev.com/#/?referral=0xFF714b8b0e2700303eC912BD40496C3997ceEa2b to the 0x7a4d4872Bdad98DAC4BF4276186FBD0959DAA07F account.

  2. I got the 'valid affiliate code' message.

  3. Then, I did a wrap transaction --> referral address was removed from my local storage

  4. I did several Expired transaction, then I was able to get a successful sell transaction: https://protocol-explorer.staging.gnosisdev.com/address/0x7a4d4872bdad98dac4bf4276186fbd0959daa07f

  5. Total trades section was updated accordingly.

  6. But I do not see referral info for the account 0xFF714b8b0e2700303eC912BD40496C3997ceEa2b
    image

@josojo
Copy link

josojo commented Nov 17, 2021

0x7a4d4872Bdad98DAC4BF4276186FBD0959DAA07F was first referred by another user:

image

@elena-zh
Copy link
Author

More than strange to see this message then
image

However, I might assume that this referral address was shared to the account when testing in a Dev server, as the account has a successful trade there
https://protocol-explorer.dev.gnosisdev.com/address/0x7a4d4872Bdad98DAC4BF4276186FBD0959DAA07F

Anyways, if a referral address from the Dev is valid for Prod, we should not show 'valid referral address' message

@elena-zh
Copy link
Author

0x7a4d4872Bdad98DAC4BF4276186FBD0959DAA07F was first referred by another user:

image

And yes, I see on UI the referral data for this account...
image

@elena-zh
Copy link
Author

I reported a separate issue for the case when referral data from prod server was added to referral address in dev server #1871

The current issue will be related to data removal from a local storage after transactions.

@alfetopito
Copy link
Contributor

Yes, this sounds like a new bug, but it's unrelated to the changes made.
I expect you should be able to reproduce this on production.

Given that the fix is only dealing with visibility, I'd say we can release without it and address is in another release/hotfix

@ramirotw ramirotw self-assigned this Nov 18, 2021
@elena-zh
Copy link
Author

The issue is still reproducible.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
app:CowSwap CowSwap app Bug Something isn't working Medium Severity indicator. It causes some undesirable behavior, but the system is still functional Protofire Handled by Protofire development team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants