From 15a45479ea042379eed2bcd3d1e3c95f3affd3c6 Mon Sep 17 00:00:00 2001 From: Carlos Date: Sat, 21 Oct 2023 14:09:55 -0500 Subject: [PATCH] fetch multisigmessage in the fetch endpoint --- src/routes/v1/multisigAuthenticationRouter.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/routes/v1/multisigAuthenticationRouter.ts b/src/routes/v1/multisigAuthenticationRouter.ts index f94cec8..0a94355 100644 --- a/src/routes/v1/multisigAuthenticationRouter.ts +++ b/src/routes/v1/multisigAuthenticationRouter.ts @@ -8,6 +8,7 @@ import { MultisigStatuses, } from '@/src/entities/multisigSession'; import moment from 'moment'; +import { fetchSafeMessage } from '@/src/services/safeServices'; export const multisigAuthenticationRouter = express.Router(); const multisigAuthenticationController = new MultisigAuthenticationController(); @@ -53,6 +54,16 @@ multisigAuthenticationRouter.get( Number(network), ); + if (multisigSession) { + const safeMessage = await fetchSafeMessage( + multisigSession.safeMessageHash, + multisigSession.network, + ); + + await multisigSession.multisigStatus(safeMessage); + await multisigSession.reload(); + } + res.send({ status: multisigSession ? multisigSession.status