Skip to content

Commit

Permalink
use orderHash as sfn execution name
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm committed May 4, 2023
1 parent 8a504c5 commit 788aefa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/handlers/post-order/handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export class PostOrderHandler extends APIGLambdaHandler<
},
})
await this.kickoffOrderTrackingSfn(
{ orderHash: id, chainId: chainId, orderStatus: ORDER_STATUS.UNVERIFIED, quoteId: quoteId ?? `undefined-${id}` },
{ orderHash: id, chainId: chainId, orderStatus: ORDER_STATUS.UNVERIFIED, quoteId: quoteId ?? '' },
stateMachineArn,
log
)
Expand All @@ -121,7 +121,7 @@ export class PostOrderHandler extends APIGLambdaHandler<
const startExecutionCommand = new StartExecutionCommand({
stateMachineArn: stateMachineArn,
input: JSON.stringify(sfnInput),
name: sfnInput.quoteId,
name: sfnInput.orderHash,
})
log?.info(startExecutionCommand, 'Starting state machine execution')
await sfnClient.send(startExecutionCommand)
Expand Down
2 changes: 1 addition & 1 deletion test/handlers/post-order.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ describe('Testing post order handler.', () => {
new StartExecutionCommand({
stateMachineArn: MOCK_ARN,
input: JSON.stringify(sfnInput),
name: sfnInput.quoteId,
name: sfnInput.orderHash,
}).input
)
})
Expand Down

0 comments on commit 788aefa

Please sign in to comment.