Skip to content

Commit 70f21eb

Browse files
authored
Add flow_id to IApplicationState (#19)
1 parent 02ba8c7 commit 70f21eb

File tree

4 files changed

+6
-1
lines changed

4 files changed

+6
-1
lines changed

src/state/setApplicationState.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export function setApplicationState({
3232
currency,
3333
display_currency,
3434
display_exchange_rate,
35+
flow_id,
3536
}: IApplicationState): void {
3637
setCustomer(customer);
3738
setAddresses(addresses);
@@ -52,4 +53,5 @@ export function setApplicationState({
5253
applicationState.resumable_link = resumable_link;
5354
applicationState.created_via = created_via;
5455
applicationState.is_processed = is_processed;
56+
applicationState.flow_id = flow_id;
5557
}

src/types/apiInterfaces.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -554,6 +554,7 @@ export interface IApplicationState {
554554
is_processed: boolean;
555555
created_via: string;
556556
fees: Array<IFees>;
557+
flow_id: string | null;
557558
}
558559

559560
export interface IOrderMetaData {

src/variables/mocks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ export const applicationStateMock: IApplicationState = {
276276
display_exchange_rate: 1,
277277
is_processed: false,
278278
created_via: 'checkout',
279-
fees: [feesMock]
279+
fees: [feesMock],
280+
flow_id: 'mock_flow',
280281
};
281282

282283
export const selectShippingLineArrayMock: Array<IShippingLine> = [

src/variables/variables.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ export const applicationState: IApplicationState = {
191191
created_via: '',
192192
is_processed: false,
193193
fees,
194+
flow_id: null
194195
};
195196

196197
export const orderInitialData: IOrderInitialData = {

0 commit comments

Comments
 (0)