Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

Add support for multiple Robinhood accounts #33

Open
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

superpowered
Copy link

@superpowered superpowered commented Jan 18, 2021

Adds support for multiple Robinhood accounts. (closes #16)

  • Should be able to Enable / Disable Multiple Accounts.
  • Should be able to Add rows of accounts.
  • Should be able to delete rows of accounts. (Excluding the first row)
  • Data should end up stored as an array of objects [{ robinHoodValue: '' }]
  • Data should be sanitized before output
  • Validations should fire on fields if they are blank. (more validations could probably be added here)
  • Should be prompted to set up after toggling Multiple Accounts on or off
  • After Setup of multiple, should be told to remove old single properties
  • After Setup of single, should be told to remove old multiple properties
  • Should only update 4 correct properties on update
  • Should prompt for setup if one or more properties expected is missing
  • Should throw up a warning if a property was found, but could not be updated with the data provided.

Other tidbits:

  • Moves urls & interfaces to constants folder
  • Removes .vscode/settings.json
  • Adds .vscode/settings.json.default so devs can opt in to the projects default settings but still overwrite if needed.
  • Adds .vscode/extensions.json recomending eslint as an extension.
  • lint:fix command added for quick linting.

…e accounts.

Data should end up stored as an array of objects `[{ robinHoodValue: '', mintValue: '' }]`
Currently does NOT sanitize data
Currently does NOT validate input
@pkmnct
Copy link
Owner

pkmnct commented Jan 18, 2021

Just a heads-up, I was thinking about scraping the Robinhood account username and using it as a name on the properties, as a way of allowing multiple accounts to be set up.

@superpowered
Copy link
Author

Okay. Definitely will need a bit of cleanup, but should be functional at this point.

.gitignore Outdated Show resolved Hide resolved
@pkmnct
Copy link
Owner

pkmnct commented Jan 21, 2021

I'm going to plan to take at look a this over the weekend!

@superpowered
Copy link
Author

I'm going to plan to take at look a this over the weekend!

Yeah, hopefully I'll get to look at it some more and clean it up before then. A bit more swamped than usual due to the shorter work week.

@superpowered superpowered changed the title WIP: Add Multiple Accounts to Settings page. Add Multiple Accounts to Settings page. Jan 22, 2021
@superpowered superpowered marked this pull request as ready for review January 22, 2021 04:02
<div class="mutiple-accounts-input-wrapper">
<label>
RobinHood Account Name
<input required type="text" class="setting-multipleAccounts-robinHoodInput" />
Copy link
Owner

Choose a reason for hiding this comment

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

Rather than having the user manually enter their account names, we can just scrape the account name every time we sync Robinhood. If the multiple account setting is not enabled, the value is ignored.

If it is enabled, we do a setup check (similar to the initial setup), where we check if this device has synced with the Robinhood account logged in. (These could be stored in an array in chrome.storage.sync). If the current device has not set up that account before, we can then trigger the property setup/check.

This would give users a more seamless experience, and reduce logic on the settings page since it would just be a checkbox.

Copy link
Author

Choose a reason for hiding this comment

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

Alright, latest push should accomplish this...
Need to probably test some of the flows and make sure the notifications seem correct in each one.

... Probably also need to add a delete script under the debug at some point, more just for convienence, since adding and deleting all these accounts is crazy tedious.

Changing the returnValue.accountName = accountNameElement.innerText; to a static value works well enough for testing to add new accounts.

@pkmnct pkmnct changed the title Add Multiple Accounts to Settings page. Add support for multiple Robinhood accounts Jan 27, 2021
…-accounts

# Conflicts:
#	package-lock.json
#	package.json
#	public/manifest.json
#	src/background/main.ts
#	src/content/mint/properties/update.ts
#	src/content/robinhood/main.ts
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for multiple Robinhood accounts
2 participants