-
Notifications
You must be signed in to change notification settings - Fork 4
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
Allow passing referral in the URL for dApp #679
Conversation
DApp should detect by which partner it was opened. As a result, we will be able to customize the solutions depending on the partner.
✅ Deploy Preview for acre-dapp ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for acre-dapp-testnet ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
The application should be blocked when a user provides an intentionally incorrect referral.
When referral is set it should be a constant parameter in the URL. Therefore, a special hook was created to set this parameter in the navigate function.
I opened the dApp with no referral parameter https://deploy-preview-679--acre-dapp-testnet.netlify.app/. |
Fixed in 13de34b. |
We should not allow to open other modal windows when the global error modal is displayed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed and tested.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good on a QA side.
Closes #566
Acre will support the referral program. The referral value will be specified in the
ref
parameter in the URL. So when the user opens the dApp from the link https://stake.acre.fi/?ref=48450, the referral in the deposit flow should be set to the same value: 48450. The value of the referral was saved inlocalStorage
. Some basic requirements:ref
parameter should allow numbers only up to max uint16.ref
parameter is not specified in the URL, the referral should be set to 0.null
and show a special modal window with an error. Navigation as well as the button to connect the account should be disabled from use.https://stake.acre.fi/?ref=48450
, the referral in the deposit flow should be set to the same value:48450
.Testing
ref
parameter is detected and set correctly inlocalStorage
.0
.null
.