diff --git a/dlt-connector/src/config/schema.ts b/dlt-connector/src/config/schema.ts index 45ef83831..3abb84f6a 100644 --- a/dlt-connector/src/config/schema.ts +++ b/dlt-connector/src/config/schema.ts @@ -84,7 +84,7 @@ export const configSchema = v.object({ v.string('The version of the DLT node server, for example: 0.9.0'), v.regex(/^\d+\.\d+\.\d+$/), ), - '0.9.1', + '0.9.2', ), DLT_GRADIDO_NODE_SERVER_HOME_FOLDER: v.optional( v.string('The home folder for the gradido dlt node server'), diff --git a/dlt-connector/src/migrations/db-v2.7.0_to_blockchain-v3.5/database.ts b/dlt-connector/src/migrations/db-v2.7.0_to_blockchain-v3.5/database.ts index 8f198b5c8..581405207 100644 --- a/dlt-connector/src/migrations/db-v2.7.0_to_blockchain-v3.5/database.ts +++ b/dlt-connector/src/migrations/db-v2.7.0_to_blockchain-v3.5/database.ts @@ -104,23 +104,23 @@ export async function loadTransactions( return result.map((row: any) => { // console.log(row) - // check for consistent data beforehand - const userCreatedAt = new Date(row.user.createdAt) - const linkedUserCreatedAd = new Date(row.linkedUser.createdAt) - const balanceDate = new Date(row.transaction.balanceDate) - if ( - userCreatedAt.getTime() > balanceDate.getTime() || - linkedUserCreatedAd.getTime() > balanceDate.getTime() - ) { - logger.error(`table row: `, row) - throw new Error('at least one user was created after transaction balance date, logic error!') - } - - let amount = GradidoUnit.fromString(row.transaction.amount) - if (row.transaction.typeId === TransactionTypeId.SEND) { - amount = amount.mul(new GradidoUnit(-1)) - } try { + // check for consistent data beforehand + const userCreatedAt = new Date(row.user.createdAt) + const linkedUserCreatedAd = new Date(row.linkedUser.createdAt) + const balanceDate = new Date(row.transaction.balanceDate) + if ( + userCreatedAt.getTime() > balanceDate.getTime() || + linkedUserCreatedAd.getTime() > balanceDate.getTime() + ) { + logger.error(`table row: `, row) + throw new Error('at least one user was created after transaction balance date, logic error!') + } + + let amount = GradidoUnit.fromString(row.transaction.amount) + if (row.transaction.typeId === TransactionTypeId.SEND) { + amount = amount.mul(new GradidoUnit(-1)) + } return v.parse(transactionDbSchema, { ...row.transaction, transactionLinkCode: row.transactionLink ? row.transactionLink.code : null, @@ -128,8 +128,8 @@ export async function loadTransactions( linkedUser: row.linkedUser, }) } catch (e) { + logger.error(`table row: ${JSON.stringify(row, null, 2)}`) if (e instanceof v.ValiError) { - logger.error(`table row: ${JSON.stringify(row, null, 2)}`) logger.error(v.flatten(e.issues)) } throw e diff --git a/docker-compose.override.yml b/docker-compose.override.yml index 3898f9991..8c3d06b39 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -199,6 +199,7 @@ services: - debug environment: - PMA_ARBITRARY=1 + - UPLOAD_LIMIT=200M #restart: always ports: - 8074:80 diff --git a/inspector b/inspector index 36045150d..0c14b7eea 160000 --- a/inspector +++ b/inspector @@ -1 +1 @@ -Subproject commit 36045150da1d6c9d9a568d801f327cee40176646 +Subproject commit 0c14b7eea29b8911cbe3cb303f5b0b61ce9bf6f4