Skip to content

Commit

Permalink
fix: need result
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHeal committed Sep 22, 2023
1 parent 639b965 commit d27d9b9
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nftgo/gotrading",
"version": "1.0.8",
"version": "1.0.9",
"main": "dist/index.js",
"module": "dist/index.esm.js",
"types": "dist/index.d.ts",
Expand Down
10 changes: 5 additions & 5 deletions src/modules/utils/action/processor/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ export class AggregateActionProcessor implements ActionProcessor {
throw new Error('txData is required');
}
if (name === 'nft-approval') {
await signInfo(txData, this.utils.sendTransaction);
return await signInfo(txData, this.utils.sendTransaction);
} else if (name === 'accept-listing') {
if (safeMode) {
await signInfo(txData, this.utils.sendSafeModeTransaction);
return await signInfo(txData, this.utils.sendSafeModeTransaction);
} else {
await signInfo(txData, this.utils.sendTransaction);
return await signInfo(txData, this.utils.sendTransaction);
}
// other name case: currency-wrapping currency-approval
} else {
await signInfo(txData, this.utils.sendTransaction);
return await signInfo(txData, this.utils.sendTransaction);
}
}

Expand All @@ -63,7 +63,7 @@ export class AggregateActionProcessor implements ActionProcessor {
throw new Error('action signature is required');
}
const { payload, endpoint } = data;
const postOrderResult = this.postOrderHandler.handle(payload, params.signature, endpoint);
const postOrderResult = await this.postOrderHandler.handle(payload, params.signature, endpoint);
return postOrderResult;
}
return Promise.resolve({
Expand Down
3 changes: 1 addition & 2 deletions src/modules/utils/action/task/pass-through.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ export class PassThroughActionTask extends ActionTaskTemplate<ActionKind.PassThr
const result = pre.result as ProcessPassThroughActionParams;
const needThisSignature = this.action.data.orderIndexes.every(index => orderIndexes.includes(index));
if (needThisSignature) {
await this.processor.processPassThroughAction(this.action, result);
return null;
return await this.processor.processPassThroughAction(this.action, result);
}
}
pre = pre.pre;
Expand Down
4 changes: 1 addition & 3 deletions src/modules/utils/action/task/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ import { ActionTaskTemplate } from './template';

export class TransactionActionTask extends ActionTaskTemplate<ActionKind.Transaction> {
protected run = async () => {
await this.processor.processTransactionAction(this.action);

return null;
return await this.processor.processTransactionAction(this.action);
};
}

0 comments on commit d27d9b9

Please sign in to comment.