Skip to content

Commit

Permalink
Merge branch 'master' into fix-139
Browse files Browse the repository at this point in the history
  • Loading branch information
wa0x6e committed Aug 28, 2023
2 parents 80aa16e + 40f9780 commit 4c75a33
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ updates:
interval: "daily"
allow:
# Allow updates for snapshot.js only
- dependency-name: "@snapshot-labs/snapshot.js"
- dependency-name: "@snapshot-labs/*"
10 changes: 9 additions & 1 deletion src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,17 @@ router.post('/', async (req, res) => {
});
}

let address;
try {
address = getAddress(req.body.address);
} catch (e: any) {
return res.status(400).json({
error: 'Invalid address'
});
}

try {
const msgHash = snapshot.utils.getHash(req.body.data);
const address = getAddress(req.body.address);
const env = 'livenet';
let network = env === 'livenet' ? '1' : '5';
if (!req.body.data.types.Space && !msg.settings)
Expand Down
5 changes: 4 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"noImplicitAny": false,
"resolveJsonModule": true,
"moduleResolution": "Node",
"skipLibCheck": true
"skipLibCheck": true,
"sourceMap": true,
"inlineSources": true,
"sourceRoot": "/"
}
}

0 comments on commit 4c75a33

Please sign in to comment.