-
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.
Fe/move pending bridge transactions (#1546)
* Move `pendingBridgeTransactions` actions to `transactions` * Move `pendingBridgeTransactions` reducers to `transactions` * Update `resetTransactionsState` reducer to reset `pendingBridgeTransactions` and `fallbackQueryHistoricalTransactions` * Replace all instances of `pendingBridgeTransactions` to updated * Update version tracking to reset cache * Remove bridge from `persistedReducers` * Update `pendingBridgeTransactions` instance * Clean imports * ... * Update actions naming * cf --------- Co-authored-by: Jonah Lin <[email protected]>
- Loading branch information
1 parent
c1cd08d
commit 925a11a
Showing
12 changed files
with
121 additions
and
143 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,12 @@ | ||
import { createAction } from '@reduxjs/toolkit' | ||
|
||
import { Chain, Token } from '@/utils/types' | ||
|
||
export interface PendingBridgeTransaction { | ||
id: number | ||
originChain: Chain | ||
originToken: Token | ||
originValue: string | ||
destinationChain: Chain | ||
destinationToken: Token | ||
transactionHash?: string | ||
timestamp: number | ||
isSubmitted: boolean | ||
estimatedTime: number | ||
bridgeModuleName: string | ||
} | ||
|
||
export const addPendingBridgeTransaction = | ||
createAction<PendingBridgeTransaction>('bridge/addPendingBridgeTransaction') | ||
export const updatePendingBridgeTransaction = createAction<{ | ||
id: number | ||
timestamp: number | ||
transactionHash: string | ||
isSubmitted: boolean | ||
}>('bridge/updatePendingBridgeTransaction') | ||
export const removePendingBridgeTransaction = createAction<number>( | ||
'bridge/removePendingBridgeTransaction' | ||
) | ||
export const updatePendingBridgeTransactions = createAction< | ||
PendingBridgeTransaction[] | ||
>('bridge/updatePendingBridgeTransactions') | ||
export const resetBridgeInputs = createAction<void>('bridge/resetBridgeInputs') | ||
export const resetFetchedBridgeQuotes = createAction<void>( | ||
'bridge/resetFetchedBridgeQuotes' | ||
) | ||
export const updateDebouncedFromValue = createAction<string>( | ||
'bridge/updateDebouncedFromValue' | ||
) | ||
export const updateDebouncedToTokensFromValue = createAction<string>( | ||
'bridge/updateDebouncedToTokensFromValue' | ||
) | ||
export const resetBridgeInputs = createAction<void>('bridge/resetBridgeInputs') | ||
export const resetFetchedBridgeQuotes = createAction<void>( | ||
'bridge/resetFetchedBridgeQuotes' | ||
) |
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.