Skip to content

Faulty logic for item unlink/relink #1

@ruffCode

Description

@ruffCode

When an item is unlinked,it is marked as such in the db, everything associated with it is deleted, and it is removed via Plaid. The only reason to keep a record of the item itself is
to keep track of how many times it has been unliked to curb possible abuse. This happens automatically via a db trigger. Once the count reaches 3, it can no longer be relinked.

When an item is "relinked" Plaid generates a new id, which was being inserted in to the db and creating a "duplicate". The relink logic now includes updating the plaidItemId.

The was also an issue with transaction deletion when unlinking, fixed by deleting accounts and lettings the transactons cascade.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions