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

Profile - Withdraw option #1421

Closed
jonsnowpt opened this issue Jun 27, 2023 · 5 comments
Closed

Profile - Withdraw option #1421

jonsnowpt opened this issue Jun 27, 2023 · 5 comments
Assignees
Labels
🌟 [A] enhancement New feature or request 📣 [A] high priority Something that needs attention and accelerated resolving

Comments

@jonsnowpt
Copy link
Contributor

jonsnowpt commented Jun 27, 2023

📝 DESCRIPTION

We are adding a Withdraw option on the profile user section and a few methods that will allow users to withdraw funds from the Betarena platform.

Image


📱 TARGET PLATFORMS

This option will be available on all platform versions.


🎬 LINK

https://scores.betarena.com/u/withdraw/pt


ℹ️ OTHER CONDITIONS (& RELEVANT INFO)

All withdrawal options have a form associated so that we can collect user information to be able to associate the request of funds with the user account and to be able to have access to the information needed to send user funds.

We need a preloader for this and other sections; we can use the following using Black instead of blue:

https://lottiefiles.com/73801-preloader-animation

Initial withdrawal options:

  • Paypal
  • Skrill
  • Remessa Online
  • Revolut
  • Wired Transfer
  • Wise
  • Cryptocurrency

Since all information is coming from the DB, this means that we can add new withdrawal options without the need to change the front end.


Versions:

All theme variations are supported.


💠 DATA

Hasura

table columns
withdraw_options id + type + form_id + provider_logo + blacklist
forms id + type + type_id + form_fields_step_1 + form_fields_step_2 + gateway + form_fields_success

Fields description:

withdraw_options

id  = The ID of each withdrawal option
type = Gateway
form_id = The Form ID associated with this Gateway, available on forms
provider_logo = Gateway logo
blacklist = GEO countries where it's not available

===

**forms**

id = Form ID that allows us to associate the withdraw option with the correct Form
type = Description of what kind of form it is
type_id = Type of the form, withdraw, deposit, or others
form_fields_step_1 = Content and Fields of the form, including the type of field
form_fields_step_2 = In the case of multi-step form, here is where the second step data is available
gateway = What type of Gateway is associated with this form
form_fields_success = Content of the success message associated with the form

===

Sending the Data:

After filling up the form, the data should be sent to the DB:

Hasura

table columns
transaction_history id + date + asset + quantity + amount + description + type + status + Gateway + first_name + last_name + payment_email + iban + bic_swift + wallet_address_erc20 + uid + payment_processor_fee
id = unique identifier for each transaction.
date = Date when the transaction occurred.
asset = Specifies whether it involves fiat currency or cryptocurrency.
quantity = The quantity or amount involved in the transaction (e.g., fiat currency amount, crypto amount).
amount = The corresponding amount in BTA tokens.
description = Brief description of the transaction.
type = Indicates whether it is a deposit or withdrawal request.
status = Current status of the transaction (Completed, Pending, Processing, Canceled,  [DEFAULT STATUS PENDING]))
Gateway = Payment processor or platform used for the transaction (e.g., Stripe, Coinbase, Wise).
first_name = User First Name if available
last_name = User Last Name if available
payment_email = Email associated with the Gateway
iban = IBAN associated with the Gateway
bic_swift = BIC/SWIFT CODE associated with the payment Gateway
wallet_address_erc20 = For withdrawals, the wallet address where the funds are being or has been sent.
uid = User Unique UID
payment_processor_fee = Fee charged by the payment processor for the transaction.

🎏 TRANSLATIONS

Translations endpoint

Within the specific Schema:

table columns
forms

The translations are included in the form json.


⚡️ CACHE

Unavailable.


🔎 SEO

Unavailable.


Placeholder when there is no content:

Defined preloader on top.


Resources

Figma Design:

https://www.figma.com/file/4SlIPyxRBX2qg1eLaPUk9U/BetArena-%2F-Desktop?type=design&node-id=32%3A1635&t=wLX73xuz9lYHGwZ7-1

@jonsnowpt jonsnowpt converted this from a draft issue Jun 27, 2023
@jonsnowpt jonsnowpt self-assigned this Jun 27, 2023
@jonsnowpt jonsnowpt added 🌟 [A] enhancement New feature or request 📣 [A] high priority Something that needs attention and accelerated resolving labels Jun 27, 2023
@jonsnowpt jonsnowpt moved this to Backlog in Betarena Scores Jun 27, 2023
@jonsnowpt jonsnowpt moved this from Backlog to Icebox in Betarena Scores Jul 2, 2023
@jonsnowpt jonsnowpt moved this from Icebox to Todo in Betarena Scores Jul 24, 2023
@jonsnowpt jonsnowpt moved this from Todo to Icebox in Betarena Scores Jul 24, 2023
@jonsnowpt jonsnowpt moved this from Icebox to Todo in Betarena Scores Jul 24, 2023
@jonsnowpt jonsnowpt assigned migbash and unassigned jonsnowpt Jul 24, 2023
@migbash migbash moved this from Todo to In Progress in Betarena Scores Jul 25, 2023
@migbash
Copy link
Collaborator

migbash commented Jul 27, 2023

  • @jonsnowpt It appears, that provider_logo_dark, same as from deposit_options is missing from withdraw_options. Needs to be added in.
  • @jonsnowpt Missing data for necessary paragraphing in betarena_general_data/transaltions/withdraw data table, like in translations/deposit, to show correctly text in the Please note: section of the widget, as per design.

@jonsnowpt Data sent to the DB to transaction_history should be of status: Pending ?


  • @jonsnowpt Original cryptocurrency logo just showing the letters, and missing the Bitcoin, for the withdraw_options.

  • @jonsnowpt Invalid provider_logo_dark for the cryptocurrency withdraw option, showing as Coinbase, for the withdraw_options.


@jonsnowpt Should cryptocurrency withdraw option have the Withdraw all available funds option ? not currently visible on the design.

@jonsnowpt
Copy link
Contributor Author

jonsnowpt commented Jul 27, 2023

@jonsnowpt Data sent to the DB to transaction_history should be of status: Pending ?

@migbash should be status: Pending.

@migbash migbash moved this from In Progress to Staging in Betarena Scores Jul 28, 2023
@jonsnowpt
Copy link
Contributor Author

@jonsnowpt Original cryptocurrency logo just showing the letters, and missing the Bitcoin, for the withdraw_options.

@migbash Yes, I removed the BTC icon to avoid being misunderstood.

@jonsnowpt
Copy link
Contributor Author

@jonsnowpt Invalid provider_logo_dark for the cryptocurrency withdraw option, showing as Coinbase, for the withdraw_options.

@migbash available now.

@jonsnowpt
Copy link
Contributor Author

@jonsnowpt Should cryptocurrency withdraw option have the Withdraw all available funds option ? not currently visible on the design.

@migbash it should, probably a mistake.

migbash added a commit that referenced this issue Jul 28, 2023
@migbash migbash moved this from Staging to Testing in Betarena Scores Jul 28, 2023
migbash added a commit that referenced this issue Aug 9, 2023
* feat: #1421; new Withdraw Widget-Main + Modal;

* feat: #1421; new Withdraw assets;

* feat: #1421; new Withdraw Widget ref +page.svelte;

* chore: clean store/user-settings.ts;

* doc: OpenApi adjust for Tx to DB action endpoint;

* feat: #1421; new balance Firebase upd func; clean;

* feat: #1421; endpoint /api/data/profile POST add;

* update: app.css for global form > input; clean;

* feat: #1421; add Withdraw-Widget Profile/Menu-Opt;

* feat: #1421; endpoint /api/data/profile; cont;

* pkg: @scores-lib ➤ 1.4.0;

* issue: #1483;

* pkg: ibantools 4.3.3;

* pkg: @scores-lib ➤ 1.4.1;

* issue: #1483; withdraw-fixes; cont;

* issue: #1486;

* issue: #1485;

* issue: #1486; cont;

* issue: #1488;

* issue: #1491;

* issue: #1497; #1489; #1495;

* issue: #1497; cont;

* issue: #1504;

* issue: #1506;

* issue: #1507; #1502;

* issue: #1508;

* issue: #1497;

* issue: #1497; cont;

* issue: #1497; cont;

* pkg: @scores-lib ➤ 1.4.4;

* issue: #1491;

* pkg: @scores-lib ➤ 1.4.5;

* issue: #1491; adjust show more action text;

* issue: #1498;

* pkg: @scores-lib ➤ 1.4.6;

* issue: #1498; types update;

* chore: firebase secrets;

* chore: firebase secrets;
jonsnowpt pushed a commit that referenced this issue Aug 10, 2023
* chore: add vscode/snippets.code-snippets;

* chore: Footer re-structure;

* chore: app.css comments + clean;

* update: +layout Footer re-structure;

* chore: components/home/leagues-list -> v6;

* chore: components/home/leagues-table -> v6;

* chore: components/home/seo-block -> v6;

* upd: +layout league-list; league-table; seo-block;

* update: vscode/snippets.code-snippets;

* update: Makefile;

* update: Makefile;

* update: package.json > scripts;

* update: package.json > scripts;

* update: package.json;

* update: vscode/snippets.code-snippets;

* Feature/1421/user-profile-withdraw (#1479)

* feat: #1421; new Withdraw Widget-Main + Modal;

* feat: #1421; new Withdraw assets;

* feat: #1421; new Withdraw Widget ref +page.svelte;

* chore: clean store/user-settings.ts;

* doc: OpenApi adjust for Tx to DB action endpoint;

* feat: #1421; new balance Firebase upd func; clean;

* feat: #1421; endpoint /api/data/profile POST add;

* update: app.css for global form > input; clean;

* feat: #1421; add Withdraw-Widget Profile/Menu-Opt;

* feat: #1421; endpoint /api/data/profile; cont;

* pkg: @scores-lib ➤ 1.4.0;

* issue: #1483;

* pkg: ibantools 4.3.3;

* pkg: @scores-lib ➤ 1.4.1;

* issue: #1483; withdraw-fixes; cont;

* issue: #1486;

* issue: #1485;

* issue: #1486; cont;

* issue: #1488;

* issue: #1491;

* issue: #1497; #1489; #1495;

* issue: #1497; cont;

* issue: #1504;

* issue: #1506;

* issue: #1507; #1502;

* issue: #1508;

* issue: #1497;

* issue: #1497; cont;

* issue: #1497; cont;

* pkg: @scores-lib ➤ 1.4.4;

* issue: #1491;

* pkg: @scores-lib ➤ 1.4.5;

* issue: #1491; adjust show more action text;

* issue: #1498;

* pkg: @scores-lib ➤ 1.4.6;

* issue: #1498; types update;

* chore: firebase secrets;

* chore: firebase secrets;

* Issue/1278/pre load css js (#1510)

* issue: #1278

* issue: #1278; cont;

* issue: #1278; cont;

* issue: #1278; cont;

* issue: #1278; cont;

* issue: #1278; cont;

* issue: #1278; cont;

* issue: #1278; cont; dynamic svg import;

* issue: #1278; cont; dynamic home-page comp import;

* issue: #1278; cont; dynamic home-page comp import;

* chore: Makefile; package.json; update;

* doc: vite.config.ts;

* issue: #1478; Test Header; logic; mobile-first;

* issue: #1478; Test CSS-Js variable communication;

* issue: #1478; vite.config.ts update;

* update: #1478; all-css-chunk.css;

* Revert to e92886 -> home/Layout.svelte;

* update: #1478; all-css-chunk.css;

* update: #1278; empty preloadStrategy;

* update: #1278; preloadStrategy -> preload-js;

* update: #1278; preloadStrategy -> preload-js;

* upd: #1278; preloadStrategy -> preload-js; cont;

* upd: #1278; preloadStrategy -> preload-mjs; cont;

* upd: #1278; build::manualChunks homepage single;

* upd: #1278; build::manualChunks cont;

* upd: #1278; preloadStrategy -> modulepreload;

* upd: #1278; build::manualChunks cont; cssJsChunk;

* upd: #1278; build::manualChunks cont;

* upd: #1278; src/app.html hardcode all CSS;

* revert to ab873 -> vite.config.ts;

* doc: svelte.config.js; vite.config.js;

* update: +layout.server.ts revamp;

* update: +layout.svelte revamp;

* del: +layout.ts in favour of .server.ts;

* doc: [[lang=lang]]/+page.ts;

* chore: remove firebase/common.ts;

* feat: sessionStore add deviceType;

* chore: app.html clean;

* chore: utils/debug.ts clean;

* chore: utils/dates.ts clean;

* chore: utils/platform-functions.ts clean;

* chore: utils/languages.ts clean;

* chore: api/utils.ts clean;

* chore: u/[view]/[lang=lang] page.server.ts;

* update: all homepage widgets entry .svelte;

* update: homepage main Layout.svelte;

* chore: update debug logs on few components;

* issue: #1478; vite.config.ts update;

* update: src/hooks.server.ts;

* update: Auth_Widget.svelte;

* pkg: ua-parser-js; mansory-layout; device-dete-js;

* chore: svelte.config.ts;

* issue: #1478; vite.config.ts update; compression;

* update: +layout.svelte add SplashScreen;

* update: Makefile;

* update: +layout.svelte revert SplashScreen;

* update: +layout.server.ts add setHeaders(..);

* update: svelte.config.ts; add pre-compress;

* update: Makefile;

* update: Makefile;

* issue: #1478; vite.config.ts update; minfication;

* issue: #1478; homepage widgets (some) dynamicload;

* issue: #1478; homepage widgets (cont) dynamicload;

* issue: #1478; single-chunk and in-head css;

* chore: add analytics to app.html;

* doc: svelte.config.ts;

* issue: #1278; adjusting dynamic importing v6.5

* issue: #1278; home/Layout.svelte dynamic v6.5;

* chore: Email-Sub; Offline-Alert; Plat-Alert v6.5;

* chore: Makefile update;

* chore: package.json update;

* chore: translation.ts ;

* chore: +layout.svelte v6.5;

* chore: [[lang=lang]]/+page.svelte v6.5;

* chore: [[lang=lang]]/+page.ts v6.5;

* chore: fix merge errors;

* fix: adjust hardcoded CSS;

* (empty commit);

* fix: adjust vite.config.ts;

* chore: firebase secrets;

* github: workflow secrets;

* github: workflow secrets;
@github-project-automation github-project-automation bot moved this from Testing to Done in Betarena Scores Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌟 [A] enhancement New feature or request 📣 [A] high priority Something that needs attention and accelerated resolving
Projects
Archived in project
Development

No branches or pull requests

2 participants