Coder Social home page Coder Social logo

seng468-goblin-trade's Introduction

SENG468-Goblin-Trade

Setup guide

  • install dep if outdated
    • make install
  • run app
    • make web
  • clean app
    • make clean

Issue with Make

Windows Setup (after npm install make)

1. Run PowerShell as Admin
2. Set-ExecutionPolicy RemoteSigned
3. Y

seng468-goblin-trade's People

Contributors

stephenneale avatar kjartane avatar agamkamran02 avatar chaosfries avatar crippsben avatar

Stargazers

 avatar

Watchers

 avatar

seng468-goblin-trade's Issues

Users see all recently placed stock transactions

Found an issue to address:

All users add to the same stock transactions list when placing an order. Additionally, all users can see this unified stock transaction list when viewing their stock transaction history.

Steps to reproduce:

  1. Re-build and run all portions of the app. make clean, then make install, then make in the main directory.
  2. Log in as any user
  3. Navigate to Place Order and place any stock order.
  4. Navigate to the user's stock transaction history. "Stock Details">"Transaction History". Observe the recently placed transaction in history table.
    image
  5. Log out and sign in as a different user.
  6. Navigate to the different user's stock transaction history. "Stock Details">"Transaction History". Observe that this different user can see the same transaction placed by the previous user.

The process is repeatable. Orders placed by any user account will be visible by all accounts.

Possible fix:

Currently the backend only returns a list of all stock transactions placed by all users. This logic can be seen in the function getStockTransactions() used in order.routes.ts and order.controller.ts. We need to implement a filter in this logic to only find stock transactions placed by the currently signed in user. The desired functionality can be seen in stock.routes.ts and stock.controller.ts for the getStockPortfolio() function. Using the user's auth key in a similar way we can find stock transactions per user.

Important Notes

If the database already has a separate stock transaction history table for each user, then a fix for this is pretty straightforward as outlined above. Otherwise, if the backend is just storing all stock transactions into one table in the database, then logic must be implemented to create a table for each user, or add a user_name to each entry.

A separate transaction table for each user will probably be faster? If there was only one table then the backend would have to comb through the entire table and pick out only the currently logged in user's transactions, which would be wasteful when the table gets large. Any additional thoughts on the matter is appreciated.

Originally posted by @stephenneale in #22 (comment)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.