mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-13 20:08:56 +00:00
rename constant
This commit is contained in:
parent
5df872eec1
commit
b30c303d5a
@ -15,7 +15,7 @@ export type PendingTxAction = {
|
||||
tx: PendingTx,
|
||||
receipt?: Object,
|
||||
} | {
|
||||
type: typeof PENDING.TX_NOT_FOUND,
|
||||
type: typeof PENDING.TX_REJECTED,
|
||||
tx: PendingTx,
|
||||
} | {
|
||||
type: typeof PENDING.TX_TOKEN_ERROR,
|
||||
|
@ -139,7 +139,7 @@ export const resolvePendingTransactions = (network: string): PromiseAction<void>
|
||||
const status = await instance.web3.eth.getTransaction(tx.id);
|
||||
if (!status) {
|
||||
dispatch({
|
||||
type: PENDING.TX_NOT_FOUND,
|
||||
type: PENDING.TX_REJECTED,
|
||||
tx,
|
||||
});
|
||||
} else {
|
||||
|
@ -4,5 +4,5 @@
|
||||
export const FROM_STORAGE: 'pending__from_storage' = 'pending__from_storage';
|
||||
export const ADD: 'pending__add' = 'pending__add';
|
||||
export const TX_RESOLVED: 'pending__tx_resolved' = 'pending__tx_resolved';
|
||||
export const TX_NOT_FOUND: 'pending__tx_not_found' = 'pending__tx_not_found';
|
||||
export const TX_REJECTED: 'pending__tx_rejected' = 'pending__tx_rejected';
|
||||
export const TX_TOKEN_ERROR: 'pending__tx_token_error' = 'pending__tx_token_error';
|
@ -65,7 +65,7 @@ export default function pending(state: State = initialState, action: Action): St
|
||||
// return add(state, action.payload);
|
||||
case PENDING.TX_RESOLVED:
|
||||
return remove(state, action.tx.id);
|
||||
case PENDING.TX_NOT_FOUND:
|
||||
case PENDING.TX_REJECTED:
|
||||
return reject(state, action.tx.id);
|
||||
|
||||
case PENDING.FROM_STORAGE:
|
||||
|
@ -110,9 +110,12 @@ const LocalStorageService: Middleware = (api: MiddlewareAPI) => (next: Middlewar
|
||||
|
||||
case SEND.TX_COMPLETE:
|
||||
case PENDING.TX_RESOLVED:
|
||||
case PENDING.TX_NOT_FOUND:
|
||||
case PENDING.TX_REJECTED:
|
||||
save(api.dispatch, api.getState);
|
||||
break;
|
||||
|
||||
default:
|
||||
return action;
|
||||
}
|
||||
|
||||
return action;
|
||||
|
Loading…
Reference in New Issue
Block a user