From 41059c1e8ef2f56f14fde865b8ea514a24bf1325 Mon Sep 17 00:00:00 2001 From: Mikhail Mikheev Date: Tue, 11 Aug 2020 14:59:28 +0400 Subject: [PATCH] fix crash when opening a mocked transaction --- src/routes/safe/store/actions/createTransaction.ts | 1 + src/routes/safe/store/actions/processTransaction.ts | 1 + .../safe/store/actions/transactions/utils/transactionHelpers.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/src/routes/safe/store/actions/createTransaction.ts b/src/routes/safe/store/actions/createTransaction.ts index c3ab58cb..ddece725 100644 --- a/src/routes/safe/store/actions/createTransaction.ts +++ b/src/routes/safe/store/actions/createTransaction.ts @@ -202,6 +202,7 @@ const createTransaction = ({ confirmations: [], // this is used to determine if a tx is pending or not. See `calculateTransactionStatus` helper value: txArgs.valueInWei, safeTxHash: generateSafeTxHash(safeAddress, txArgs), + submissionDate: new Date().toISOString(), } const mockedTx = await mockTransaction(txToMock, safeAddress, state) diff --git a/src/routes/safe/store/actions/processTransaction.ts b/src/routes/safe/store/actions/processTransaction.ts index c5ff2e94..34e6a34e 100644 --- a/src/routes/safe/store/actions/processTransaction.ts +++ b/src/routes/safe/store/actions/processTransaction.ts @@ -108,6 +108,7 @@ const processTransaction = ({ ...txArgs, confirmations: [], // this is used to determine if a tx is pending or not. See `calculateTransactionStatus` helper value: txArgs.valueInWei, + submissionDate: new Date().toISOString(), } const mockedTx = await mockTransaction(txToMock, safeAddress, state) diff --git a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts index eca0a64d..a1c0922b 100644 --- a/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts +++ b/src/routes/safe/store/actions/transactions/utils/transactionHelpers.ts @@ -314,6 +314,7 @@ export type TxToMock = TxArgs & { confirmations: [] safeTxHash: string value: string + submissionDate: string } export const mockTransaction = (tx: TxToMock, safeAddress: string, state: AppReduxState): Promise => {