Skip to content

Commit

Permalink
use quoteId 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 c34cb82 commit 8a504c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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 ?? '' },
{ orderHash: id, chainId: chainId, orderStatus: ORDER_STATUS.UNVERIFIED, quoteId: quoteId ?? `undefined-${id}` },
stateMachineArn,
log
)
Expand All @@ -121,6 +121,7 @@ export class PostOrderHandler extends APIGLambdaHandler<
const startExecutionCommand = new StartExecutionCommand({
stateMachineArn: stateMachineArn,
input: JSON.stringify(sfnInput),
name: sfnInput.quoteId,
})
log?.info(startExecutionCommand, 'Starting state machine execution')
await sfnClient.send(startExecutionCommand)
Expand Down
1 change: 1 addition & 0 deletions test/handlers/post-order.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,7 @@ describe('Testing post order handler.', () => {
new StartExecutionCommand({
stateMachineArn: MOCK_ARN,
input: JSON.stringify(sfnInput),
name: sfnInput.quoteId,
}).input
)
})
Expand Down

0 comments on commit 8a504c5

Please sign in to comment.