-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(synapse-interface): post transaction balances (#2079)
* Track when transaction receipt error occurs * isTransactionReceiptError util, fetch origin balances if error is transaction receipt * Bump timeout to 60s * Create more robust error handling for checking if transaction receipt error * Clean, revert back to 60s timeout * Log when isTransactionReceiptError * Refetch pool data after withdraw tx * Update pool balances after Deposit * Add isFetching prop to PoolDataState to track initial load, separate fetching from mount * Add stakedBalance to poolUserData slice * Refetch pool token balances after withdraw * Post deposit + withdraw updates all pool data including user * onSuccessWithdraw() * onSuccessDeposit() * Trim lp balance in Stake pool * Set initial stakedBalance amount/reward to bigint * Update User pool token staked balance on individual pool body * Refactor; use poolUserData slice to display staked balance in individual pool page * Update Pool LP balances after stake/unstake so pools page shows accurate balances * Remove isFetching, use isLoading for fetched pool attributes instead * Add pools convenience store hooks * Use pools state hooks to replace useSelector instances * Remove unused imports * Clean + organize imports * Update User LP staked balances when navigating to new pool * Use isLoading to display loading dots on pool data * isTransactionUserRejectedError * Throw error if transaction is rejected by User, ensure depositTxn() finally sets isLoading to false * Apply User rejected flow in withdrawTxn() * Update isTransactionReceiptError to also check for TransactionNotFoundError * Update balances on Swap after transacion receipt returned * onSuccessSwap * Clear swap input after successful swap executed * Rename withdraw/deposit reset function * getUserStakedBalance() * Update claim flow to refetch staked balance after tx executes * resetUserStakeData() * Refactor; getUserLpTokenAllowance, clean up useEffects with refactored fns * Remove unused tx state * Clarify function that catches error in Stake * Clean imports on StakeCard * Refetch allowances after allowance tx executes * Improve error handling * Remove unnecessary prop for LoadingDots --------- Co-authored-by: abtestingalpha <[email protected]>
- Loading branch information
1 parent
4fd4eea
commit 2a95040
Showing
24 changed files
with
458 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.