Skip to content

Commit

Permalink
Merge pull request #147 from OriginTrail/release/v6.5.2
Browse files Browse the repository at this point in the history
dkg.js v6.5.2 Release
  • Loading branch information
u-hubar authored Sep 10, 2024
2 parents 41f3c09 + 1fdaae6 commit b1b46f5
Show file tree
Hide file tree
Showing 11 changed files with 297 additions and 169 deletions.
3 changes: 3 additions & 0 deletions constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ const DEFAULT_PARAMETERS = {
GRAPH_LOCATION: GRAPH_LOCATIONS.LOCAL_KG,
GRAPH_STATE: GRAPH_STATES.CURRENT,
HANDLE_NOT_MINED_ERROR: false,
SIMULATE_TXS: false,
FORCE_REPLACE_TXS: false,
GAS_LIMIT_MULTIPLIER: 1,
};

const DEFAULT_GAS_PRICE = {
Expand Down
2 changes: 1 addition & 1 deletion dist/dkg.min.js

Large diffs are not rendered by default.

20 changes: 13 additions & 7 deletions managers/asset-operations-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,20 @@ const {
sleepForMilliseconds,
} = require('../services/utilities.js');
const {
ASSET_STATES,
CONTENT_TYPES,
OPERATIONS,
OPERATIONS_STEP_STATUS,
GET_OUTPUT_FORMATS,
OPERATION_STATUSES,
DEFAULT_GET_LOCAL_STORE_RESULT_FREQUENCY,
PRIVATE_ASSERTION_PREDICATE,
STORE_TYPES,
QUERY_TYPES,
OT_NODE_TRIPLE_STORE_REPOSITORIES,
ZERO_ADDRESS,
} = require('../constants.js');
const emptyHooks = require('../util/empty-hooks');
const { STORE_TYPES, ASSET_STATES } = require('../constants');

class AssetOperationsManager {
constructor(services) {
Expand Down Expand Up @@ -149,10 +150,14 @@ class AssetOperationsManager {
);
}

return {
transactionHash: receipt.transactionHash,
status: receipt.status,
};
if (receipt) {
return {
transactionHash: receipt.transactionHash,
status: receipt.status,
};
}

return { status: 'Skipped: Allowance is already equal to the requested amount.' };
}

/**
Expand Down Expand Up @@ -637,9 +642,10 @@ class AssetOperationsManager {
}

if (contentType !== CONTENT_TYPES.PUBLIC) {
const privateAssertionLinkTriple = publicAssertion.filter((element) =>
const filteredTriples = publicAssertion.filter((element) =>
element.includes(PRIVATE_ASSERTION_PREDICATE),
)[0];
);
const privateAssertionLinkTriple = filteredTriples.length > 0 ? filteredTriples[0] : null;

let queryPrivateOperationId;
let queryPrivateOperationResult = {};
Expand Down
2 changes: 2 additions & 0 deletions managers/paranet-operations-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class ParanetOperationsManager {
);

const receipt = await this.blockchainService.claimVoterReward(paranetId, blockchain);

return {
transactionHash: receipt.transactionHash,
status: receipt.status,
Expand Down Expand Up @@ -279,6 +280,7 @@ class ParanetOperationsManager {
);

const receipt = await this.blockchainService.claimOperatorReward(paranetId, blockchain);

return {
transactionHash: receipt.transactionHash,
status: receipt.status,
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dkg.js",
"version": "6.5.1",
"version": "6.5.2",
"description": "Javascript library for interaction with the OriginTrail Decentralized Knowledge Graph",
"main": "index.js",
"scripts": {
Expand Down
Loading

0 comments on commit b1b46f5

Please sign in to comment.