Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show pending transaction as the item in the order/history tables #959

Closed
5 tasks done
creed-victor opened this issue Apr 29, 2021 · 0 comments · Fixed by #1008
Closed
5 tasks done

Show pending transaction as the item in the order/history tables #959

creed-victor opened this issue Apr 29, 2021 · 0 comments · Fixed by #1008
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@creed-victor
Copy link
Collaborator

creed-victor commented Apr 29, 2021

  • margin trading open positions table
  • swap history table

When user confirms transaction, pending transaction must appear in the table related by action (margin trade -> open positions table, swap -> swap history table).

  • Pending transactions must be always first on the list
  • Only show transactions with state pending or failed, completed transactions will be shown directly from the blockchain
  • Do not show failed transaction if user canceled transaction (meaning only transactions with txHash must be shown)

You can get list of user sent transactions using this selector:

export const selectTransactionArray = createSelector([selectDomain], state =>
Object.values(state.transactions),
);

Transaction types are visible here:

export enum TxType {
NONE = 'none',
APPROVE = 'approve',
LEND = 'lend',
UNLEND = 'unlend',
TRADE = 'trade',
CLOSE_WITH_DEPOSIT = 'close_with_deposit',
CLOSE_WITH_SWAP = 'close_with_swap',
BORROW = 'borrow',
ADD_LIQUIDITY = 'add_liquidity',
REMOVE_LIQUIDITY = 'remove_liquidity',
DEPOSIT_COLLATERAL = 'deposit_collateral',
CONVERT_BY_PATH = 'convert_by_path', // swap
OTHER = 'other',
SALE_BUY_SOV = 'sale_buy_sov',
SOV_REIMBURSE = 'sov_reimburse',
SOV_CONVERT = 'sov_convert',
SOV_ORIGIN_CLAIM = 'sov_origin_claim',
SOV_WITHDRAW_VESTING = 'sov_withdraw_vesting',
}

@creed-victor creed-victor added the enhancement New feature or request label Apr 29, 2021
@creed-victor creed-victor added this to the Dapp Redesign milestone Apr 29, 2021
@rick23p rick23p linked a pull request May 3, 2021 that will close this issue
@soulBit soulBit closed this as completed May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants