Skip to content

Commit

Permalink
✨ New object extra attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
gdaguin authored and redDwarf03 committed Sep 28, 2023
1 parent 0f37aed commit 4b4ebf8
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions lib/src/utils/notification_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ mixin NotificationUtil {
required String notifBackendBaseUrl,
required Map<String, PushNotification> pushNotification,
required String transactionType,
dynamic extra,
}) async {
for (final listenAddress in notification.listenAddresses) {
final signature = uint8ListToHex(
Expand All @@ -43,13 +44,16 @@ mixin NotificationUtil {
),
);

final body = jsonEncode({
'txAddress': notification.notificationRecipientAddress,
'txChainGenesisAddress': listenAddress,
'payloadSignature': signature,
'pushNotification': pushNotification,
'type': transactionType
});
final body = jsonEncode(
{
'txAddress': notification.notificationRecipientAddress,
'txChainGenesisAddress': listenAddress,
'payloadSignature': signature,
'pushNotification': pushNotification,
'type': transactionType,
'extra': extra,
},
);
log('Sending notification. $body');
await http.post(
Uri.parse('$notifBackendBaseUrl/transactionSent'),
Expand Down

0 comments on commit 4b4ebf8

Please sign in to comment.