Clear transaction data on transaction resign (#788)

This commit is contained in:
Eddie Wang 2018-01-11 02:07:39 -05:00 committed by Daniel Ternyak
parent 418b186642
commit db4dc516e2
1 changed files with 3 additions and 3 deletions

View File

@ -14,8 +14,8 @@ const INITIAL_STATE: State = {
pending: false pending: false
}; };
const signLocalTransactionRequested = (state: State): State => ({ const signLocalTransactionRequested = (): State => ({
...state, ...INITIAL_STATE,
pending: true pending: true
}); });
@ -48,7 +48,7 @@ const reset = () => INITIAL_STATE;
export const sign = (state: State = INITIAL_STATE, action: SignAction | ResetAction) => { export const sign = (state: State = INITIAL_STATE, action: SignAction | ResetAction) => {
switch (action.type) { switch (action.type) {
case TK.SIGN_LOCAL_TRANSACTION_REQUESTED: case TK.SIGN_LOCAL_TRANSACTION_REQUESTED:
return signLocalTransactionRequested(state); return signLocalTransactionRequested();
case TK.SIGN_LOCAL_TRANSACTION_SUCCEEDED: case TK.SIGN_LOCAL_TRANSACTION_SUCCEEDED:
return signLocalTransactionSucceeded(state, action); return signLocalTransactionSucceeded(state, action);
case TK.SIGN_WEB3_TRANSACTION_SUCCEEDED: case TK.SIGN_WEB3_TRANSACTION_SUCCEEDED: