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

PR: pick & offer the single best virtual card to user #277

Merged
merged 50 commits into from
Sep 11, 2024

Conversation

EresDev
Copy link
Contributor

@EresDev EresDev commented Aug 15, 2024

Resolves #273

How to test the best card based on location?
You can either use a vpn to change your IP to see the result. Or, you can also use adblock like ublock origin to block ip location tracking, and fallback to your OS timezone. Change OS timezone to see results. Just so you know, permit amount also matters. If your location results in a mastercarad international, but your reward permit is too low for it to mint, you get a next option if any in the amount range.

QA

qa3-no.mp4

@EresDev EresDev linked an issue Aug 15, 2024 that may be closed by this pull request
@ubiquity-os-deployer
Copy link

ubiquity-os-deployer bot commented Aug 15, 2024

@0x4007
Copy link
Member

0x4007 commented Aug 27, 2024

Hey there, curious to know if you have any remarks on this project, and if there is anything we can do to speed things along? The development velocity is a bit slower than expected.

@EresDev
Copy link
Contributor Author

EresDev commented Aug 27, 2024

Hey there, curious to know if you have any remarks on this project, and if there is anything we can do to speed things along? The development velocity is a bit slower than expected.

True. The conversation reward plugin kept me occupied and I have been feeling a bit burned out.

This is going to finish in a day or two. Right now, I am updating the UI and removing everything unnecessary as we don't have lists of cards anymore. This PR gets you a virtual card feature that can be deployed. Here is how it looks right now.

image

@0x4007
Copy link
Member

0x4007 commented Aug 27, 2024

Lets definitely just make a page on dao.ubq.fi/card-minting to host all this information. Can you post the text here? I can make the page in a couple of minutes.

@EresDev
Copy link
Contributor Author

EresDev commented Aug 27, 2024

Lets definitely just make a page on dao.ubq.fi/card-minting to host all this information. Can you post the text here? I can make the page in a couple of minutes.

Card Minting

One of the ways to get paid in the DevPool is by minting a virtual Visa or Mastercard. These virtual cards offer convenience, security, and ease of use, allowing you to quickly access your funds once your contribution is accepted.

How It Works

When you contribute to DevPool and your pull request is accepted and merged, you’ll receive a reward permit URL. This URL will take you to the UbiquityPay webpage, where you can claim your reward through various options, including minting a virtual Visa or Mastercard.

If you choose to mint a virtual card, your full reward amount will be converted into a redeem code. Follow the provided instructions with the redeem code to activate and use your virtual card.

Types of Virtual Cards

Thanks to our partnership with Reloadly, we offer a variety of virtual Visa and Mastercard options. Our system selects the best card for you based on your location, card features, and availability. If a high-feature virtual card is unavailable, you’ll be offered the next best option.

Our top-tier virtual cards are tokenized Mastercards with international capabilities. These cards offer enhanced security and a superior user experience. If these cards are unavailable due to location or stock, you will be offered an international Visa card or a local Visa/Mastercard option. You can see the exact card you’re being offered when you visit UbiquityPay with your reward permit URL.

Fees & Discounts

Some virtual cards have associated fees and potential discounts. On the reward permit page, you’ll see a "Value" displayed for the card, which represents the amount available on the card after fees and discounts are applied. Currently, minting a virtual card consumes your entire reward, but in future updates, you’ll have the option to specify the exact amount you wish to load onto the card.

Limitations

Please note that virtual Visa and Mastercard cards are subject to regulations and may not be available in all countries. If your country isn’t supported, you’ll be notified when you visit the reward permit URL, and you’ll have the option to choose a different payment method.

It’s also important to exercise caution when minting a virtual card, as they may not be accepted by all merchants. Unfortunately, there are no refunds for virtual cards, and they are non-exchangeable.

Copy link
Member

@Keyrxng Keyrxng left a comment

Choose a reason for hiding this comment

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

I attempted to QA the logic locally but I wasn't able to get past the loading screen for some reason despite having QA'd the feature in the past.

The worker was repeatedly spamming two functions and I wasn't able to debug why I couldn't progress further after trying both the sandbox and production APIs and checking the original setup instructions I can only add a couple minor comments.

It would be awesome if you could setup a dedicated README or add a section to the main one with any setup that is different from development and anything else that is relevant please, I don't feel as sure-footed about what to expect and I expect new contributors will feel the same.

functions/get-order.ts Show resolved Hide resolved
static/scripts/rewards/gift-cards/index.ts Show resolved Hide resolved
functions/helpers.ts Outdated Show resolved Hide resolved
@EresDev
Copy link
Contributor Author

EresDev commented Sep 5, 2024

@Keyrxng

I attempted to QA the logic locally but I wasn't able to get past the loading screen for some reason despite having QA'd the feature in the past.

This probably happens when anvil gets stuck. Why anvil gets stuck sometimes, I am not sure. Maybe the RPC it gets is slow or becomes slower later.

For now, you can just restart anvil. If you want to check if anvil is working correctly, then transfer some test token using anvil, if you don't get confirmatino, then the problems is anvil, and just restart anvil.

It would be awesome if you could setup a dedicated README or add a section to the main one with any setup that is different from development and anything else that is relevant please, I don't feel as sure-footed about what to expect and I expect new contributors will feel the same.

The readme is mostly up to date:

yarn
yarn test:anvil
yarn test:fund
yarn build
yarn start

This is the sequence of commands

One thing that is missing in the readme is wrangler.toml file config. Just add correct api keys, and in this config

USE_RELOADLY_SANDBOX = "true"

Here, true or false value is string in quotes.

I will add the info about wrangler in readme.

So give it a try and let me know how it goes.

Also, maybe your keys are not correct as we had some changes at Reloadly account. Send me message on telegram and I will give you new keys. If I remember correctly, sandbox keys are still the old ones and they haven't changed.

@EresDev
Copy link
Contributor Author

EresDev commented Sep 6, 2024

It would be awesome if you could setup a dedicated README or add a section to the main one with any setup that is different from development and anything else that is relevant please, I don't feel as sure-footed about what to expect and I expect new contributors will feel the same.

I have added information to readme.

@EresDev
Copy link
Contributor Author

EresDev commented Sep 9, 2024

Hey team, can I go ahead and merge this into beta branch? We have new things from other PRs and I want this merged.
@0x4007 @Keyrxng

Copy link
Member

@0x4007 0x4007 left a comment

Choose a reason for hiding this comment

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

There's some minor stuff. Once addressed you can merge.

@0x4007
Copy link
Member

0x4007 commented Sep 9, 2024

QA video looks pretty solid. Just minor cosmetic improvements I see I will need to address at some point after trying it out in production.

When can we start using?

Also soon we should only support ubiquity dollars for card minting to boost its utility.

EresDev and others added 7 commits September 12, 2024 00:37
Co-authored-by: アレクサンダー.eth <[email protected]>
Co-authored-by: アレクサンダー.eth <[email protected]>
Co-authored-by: アレクサンダー.eth <[email protected]>
Co-authored-by: アレクサンダー.eth <[email protected]>
Co-authored-by: アレクサンダー.eth <[email protected]>
Co-authored-by: アレクサンダー.eth <[email protected]>
Co-authored-by: アレクサンダー.eth <[email protected]>
@EresDev
Copy link
Contributor Author

EresDev commented Sep 11, 2024

When can we start using?

You can start using it now, but it would be nice to have this #291 implemented

Also soon we should only support ubiquity dollars for card minting to boost its utility.

Here, it should be as simple as replacing the token address of WXDAI in the constants for this feature. However, it assumes the following

  • we are also using ubiquity dollars for permit generation
  • ubiquity dollars == USD and we don't need to take care of variable exchange rates.

@EresDev
Copy link
Contributor Author

EresDev commented Sep 11, 2024

@0x4007
I have also recharged Reloadly with 50$ in testing with Reloadly production.
image

I got some redeem codes during testing that you can use if you want. I have added those redeem codes to Gift cards file in google docs that I have shared with you previously on your email.

@EresDev EresDev merged commit bb5ec42 into ubiquity:beta Sep 11, 2024
3 checks passed
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.

Pick & offer the single best virtual card to user
3 participants