Skip to content

Commit

Permalink
fetch multisigmessage in the fetch endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosQ96 committed Oct 21, 2023
1 parent 83b2cc0 commit 15a4547
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/routes/v1/multisigAuthenticationRouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 15a4547

Please sign in to comment.