feat(payment): add chat support discounts and gratitude
Docker Image / Build and Push Docker Image (push) Successful in 2m14s
Docker Image / Build and Push Docker Image (push) Successful in 2m14s
(cherry picked from commit ef9b79bc83)
This commit is contained in:
@@ -29,8 +29,14 @@ function initializeCatalogState(
|
||||
planCatalog === "tip"
|
||||
? (event.characterId ?? context.giftCharacterId)
|
||||
: null;
|
||||
const supportCharacterId =
|
||||
planCatalog === "default"
|
||||
? (event.characterId ?? context.supportCharacterId)
|
||||
: null;
|
||||
const catalogChanged = planCatalog !== context.planCatalog;
|
||||
const characterChanged = giftCharacterId !== context.giftCharacterId;
|
||||
const characterChanged =
|
||||
giftCharacterId !== context.giftCharacterId ||
|
||||
supportCharacterId !== context.supportCharacterId;
|
||||
const selectionChanged =
|
||||
planCatalog === "tip"
|
||||
? (event.category ?? null) !== context.selectedGiftCategory ||
|
||||
@@ -49,6 +55,7 @@ function initializeCatalogState(
|
||||
planCatalog,
|
||||
...(event.payChannel ? { payChannel: event.payChannel } : {}),
|
||||
giftCharacterId,
|
||||
supportCharacterId,
|
||||
commercialOfferId,
|
||||
chatActionId,
|
||||
requestedGiftCategory:
|
||||
@@ -228,6 +235,7 @@ export const loadingCachedPlansState =
|
||||
input: ({ context }) => ({
|
||||
catalog: context.planCatalog,
|
||||
commercialOfferId: context.commercialOfferId,
|
||||
supportCharacterId: context.supportCharacterId,
|
||||
}),
|
||||
onDone: [
|
||||
{
|
||||
@@ -244,9 +252,10 @@ export const loadingCachedPlansState =
|
||||
export const loadingPlansState = catalogMachineSetup.createStateConfig({
|
||||
invoke: {
|
||||
src: "refreshPlans",
|
||||
input: ({ context }) => ({
|
||||
catalog: context.planCatalog,
|
||||
commercialOfferId: context.commercialOfferId,
|
||||
input: ({ context }) => ({
|
||||
catalog: context.planCatalog,
|
||||
commercialOfferId: context.commercialOfferId,
|
||||
supportCharacterId: context.supportCharacterId,
|
||||
}),
|
||||
onDone: {
|
||||
target: "ready",
|
||||
@@ -265,6 +274,7 @@ export const refreshingPlansState = catalogMachineSetup.createStateConfig({
|
||||
input: ({ context }) => ({
|
||||
catalog: context.planCatalog,
|
||||
commercialOfferId: context.commercialOfferId,
|
||||
supportCharacterId: context.supportCharacterId,
|
||||
}),
|
||||
onDone: {
|
||||
target: "ready",
|
||||
|
||||
Reference in New Issue
Block a user