Skip to content

Commit

Permalink
[PLA-2068] Fix event should go to public key channels (#286)
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Custodio <[email protected]>
  • Loading branch information
leonardocustodio committed Nov 7, 2024
1 parent 227386a commit b241506
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/Events/Global/TransactionCreated.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ public function __construct($event, ?Model $transaction = null, ?array $extra =
'idempotencyKey' => $transaction->idempotency_key,
];

$address = $transaction->wallet?->address ?? Account::daemon()->address;
$publicKey = $transaction->wallet?->public_key ?? Account::daemonPublicKey();

if ($address == null) {
if ($publicKey == null) {
return;
}

$this->broadcastChannels = [
new Channel($address),
new Channel($publicKey),
];
}
}
6 changes: 3 additions & 3 deletions src/Events/Global/TransactionUpdated.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ public function __construct($event, ?Model $transaction = null, ?array $extra =
'idempotencyKey' => $transaction->idempotency_key,
];

$address = $transaction->wallet?->address ?? Account::daemon()->address;
$publicKey = $transaction->wallet?->public_key ?? Account::daemonPublicKey();

if ($address == null) {
if ($publicKey == null) {
return;
}

$this->broadcastChannels = [
new Channel($address),
new Channel($publicKey),
];
}
}

0 comments on commit b241506

Please sign in to comment.