-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
React.jsIssue inherent to React.jsIssue inherent to React.jsenhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested
Description
Problem
- The 'analyzing your data' prompt from FirstLinkDrawer.js statically waits 5 seconds
- The number of subscriptions found at state=2 does not reflect the actual number
Approach
- Move the this.props.setState at the beginning of handleOnSuccess from PlaidLinkFirst.js to when the transaction response data actually arrives
await API.get("plaidhandler", "/transactions", {})
.then((res) => {
this.setState({ transactions: res.transactions.transactions });
this.setState({ accounts: res.transactions.accounts });
console.log("Transactions Update Successful!");
//HERE!
console.log("transactions", res.transactions);
this.props.setState();
})
.catch((error) => {
console.log("transactions err", error);
});
- Add a new API call "transactions2service" to FirstLinkDrawer.js instead of the 5 second static waiting. And setState(2) after the response for no. of subscription has been retrieved
await API.post(
"transaction2service",
"/extract/subscription",
{
body: {
userid: user,sub,
},
}
).then(async (response) => {
console.log("transaction2service", response);
});
- Apply the same changes to the PlaidLinkSecond.js component
Question
- Where is PlaidLink.js currently used? Should the above be applied to PlaidLink.js as well?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
React.jsIssue inherent to React.jsIssue inherent to React.jsenhancementNew feature or requestNew feature or requestquestionFurther information is requestedFurther information is requested