Skip to content

Commit

Permalink
fix: cancel offer params
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Sep 2, 2022
1 parent a44759a commit da4a7cc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/controllers/offer.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
assertStagingTableNotEmpty,
} from '../utils/data-assertions';

import datalayer from '../datalayer/persistance';
import * as datalayer from '../datalayer/persistance';

export const generateOfferFile = async (req, res) => {
try {
Expand Down
4 changes: 3 additions & 1 deletion src/datalayer/persistance.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ const addMirror = async (storeId, url, forceAddMirror = false) => {
body: JSON.stringify({
id: storeId,
urls: [url],
amount: _.get(CONFIG, 'MIRROR_FEE', 1000000000 /* 1 billion mojos */),
amount: _.get(CONFIG, 'DEFAULT_FEE', 1000000000 /* 1 billion mojos */),
}),
};

Expand Down Expand Up @@ -519,6 +519,8 @@ const cancelOffer = async (tradeId) => {
url: `${CONFIG.DATALAYER_URL}/cancel_offer `,
body: JSON.stringify({
trade_id: tradeId,
secure: true,
fee: _.get(CONFIG, 'DEFAULT_FEE', 1000000000 /* 1 billion mojos */),
}),
};

Expand Down
2 changes: 1 addition & 1 deletion src/utils/defaultConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"API_KEY": null,
"CHIA_NETWORK": "mainnet",
"IS_GOVERNANCE_BODY": false,
"MIRROR_FEE": 1000000000
"DEFAULT_FEE": 1000000000
},
"GOVERNANCE": {
"GOVERANCE_BODY_ID": "a8eadac331c82f896d6851a032fd8777605a5c60fc523b0edf7eb75adaf3ba81"
Expand Down

0 comments on commit da4a7cc

Please sign in to comment.