Skip to content

Commit

Permalink
Merge pull request #160 from Chia-Network/develop
Browse files Browse the repository at this point in the history
release: 1.3.9
  • Loading branch information
MichaelTaylor3D authored Sep 20, 2023
2 parents 05e15f7 + 46a031a commit 7715c99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 3 additions & 1 deletion middleware.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { hasUnconfirmedTransactions } = require("./chia/wallet");

export const assertNoPendingTransactions = async (req, res, next) => {
const assertNoPendingTransactions = async (req, res, next) => {
const hasPendingTransactions = await hasUnconfirmedTransactions();

if (hasPendingTransactions) {
Expand All @@ -12,3 +12,5 @@ export const assertNoPendingTransactions = async (req, res, next) => {

next();
};

module.exports = { assertNoPendingTransactions };
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "climate-tokenization-engine",
"version": "1.3.8",
"version": "1.3.9",
"bin": "./server.js",
"description": "",
"main": "proxy.js",
Expand Down
3 changes: 1 addition & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const cors = require("cors");
const os = require("os");
const formData = require("express-form-data");
const scheduler = require("./tasks");
const { assertNoPendingTransactions } = require("./middleware");

const { getHomeOrgUid } = require("./utils/coreRegApi");

Expand Down Expand Up @@ -417,7 +416,7 @@ const confirmTokenCreationWithTransactionId = async (
return false;
};

app.post("/tokenize", validator.body(tokenizeUnitSchema), assertNoPendingTransactions(), async (req, res) => {
app.post("/tokenize", validator.body(tokenizeUnitSchema), async (req, res) => {
try {
console.log({
token: {
Expand Down

0 comments on commit 7715c99

Please sign in to comment.