| catapult::observers::DEFINE_OBSERVER (SourceChange, model::SourceChangeNotification, [](const auto ¬ification, auto &context) { if(NotifyMode::Commit !=context.Mode) return;auto &statementBuilder=context.StatementBuilder();model::ReceiptSource newSource(notification.PrimaryId, notification.SecondaryId);const auto ¤tSource=statementBuilder.source();if(model::SourceChangeNotification::SourceChangeType::Relative==notification.PrimaryChangeType) newSource.PrimaryId+=currentSource.PrimaryId;if(model::SourceChangeNotification::SourceChangeType::Relative==notification.SecondaryChangeType) newSource.SecondaryId+=currentSource.SecondaryId;statementBuilder.setSource(newSource);}) |