message: add notification data to notify-merchant-claim
diff: @@ -7,25 +7,40 @@ import * as Sentry from '@sentry/node';
  import NotificationPreferenceService from '../services/push-notifications/preferences';
  import { PushNotificationData } from './send-notifications';
  import { generateContractEventNotificationId } from '../utils/notifications';
  +import omit from 'lodash/omit';
  export interface PrepaidCardPaymentsQueryResult {
  data: {
  prepaidCardPayments: {
  - prepaidCardOwner: {
  id: string;
  + timestamp: string;
  + spendAmount: string;
  + issuingTokenAmount: string;
  + issuingTokenUSDPrice: string;
  + issuingToken: {
  + id: string;
  + symbol: string;
  + name: string;
  };
  - merchantSafe: {
  + prepaidCard: {
  id: string;
  - infoDid: string | undefined;
  + customizationDID?: string;
  };
  - merchant: {
  + merchantSafe: {
  id: string;
  + infoDid?: string;
  };
  + transaction: {
  + merchantFeePayments: {
  + feeCollected: string;
  issuingToken: {
  symbol: string;
  };
  - issuingTokenAmount: string;
  - spendAmount: string;
  + }[];
  + };
  + merchant: {
  + id: string;
  + };
  }[];
  };
  }
  @@ -34,21 +49,35 @@ const { network } = config.get('web3') as { network: 'sokol' | 'xdai' };
  const prepaidCardPaymentsQuery = `
  query($txn: String!) {
  prepaidCardPayments(where: { transaction: $txn }) {
  - prepaidCardOwner {
  id
  + timestamp
  + spendAmount
  + issuingTokenAmount
  + issuingTokenUSDPrice
  + issuingToken {
  + id
  + symbol
  + name
  }
  - merchantSafe {
  + prepaidCard {
  id
  - infoDid
  + customizationDID
  }
  - merchant {
  + merchantSafe {
  id
  + infoDid
  }
  + transaction {
  + merchantFeePayments {
  + feeCollected
  issuingToken {
  symbol
  }
  - issuingTokenAmount
  - spendAmount
  + }
  + }
  + merchant {
  + id
  + }
  }
  }
  `;
  @@ -119,6 +148,7 @@ export default class NotifyCustomerPayment {
  pushClientId,
  notificationBody,
  notificationType: 'customer_payment',
  + notificationData: omit(result, 'merchant'),
  };
  await this.workerClient.addJob('send-notifications', notification, {
  jobKey: notification.notificationId,
  