From d6593e1dd6482243000009f0cb0ec75db51ebc31 Mon Sep 17 00:00:00 2001 From: Abner Tudtud <114082473+enjinabner@users.noreply.github.com> Date: Tue, 11 Jul 2023 19:57:38 +0800 Subject: [PATCH] Limit event data (#17) --- src/Events/Substrate/MultiTokens/TokenMinted.php | 2 +- src/Events/Substrate/MultiTokens/TokenTransferred.php | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Events/Substrate/MultiTokens/TokenMinted.php b/src/Events/Substrate/MultiTokens/TokenMinted.php index d92fc703..c13268ae 100644 --- a/src/Events/Substrate/MultiTokens/TokenMinted.php +++ b/src/Events/Substrate/MultiTokens/TokenMinted.php @@ -31,7 +31,7 @@ public function __construct(Model $token, Model $issuer, Model $recipient, strin new Channel($token->collection->owner->address), new Channel("collection;{$this->broadcastData['collectionId']}"), new Channel("token;{$this->broadcastData['tokenId']}"), - new Channel($recipient), + new Channel($recipient->address), new PlatformAppChannel(), ]; } diff --git a/src/Events/Substrate/MultiTokens/TokenTransferred.php b/src/Events/Substrate/MultiTokens/TokenTransferred.php index 7f5df082..967af0a7 100644 --- a/src/Events/Substrate/MultiTokens/TokenTransferred.php +++ b/src/Events/Substrate/MultiTokens/TokenTransferred.php @@ -20,8 +20,8 @@ public function __construct(Model $token, Model $from, Model $recipient, string 'idempotencyKey' => $transaction?->idempotency_key, 'collectionId' => $token->collection->collection_chain_id, 'tokenId' => $token->token_chain_id, - 'from' => $from, - 'recipient' => $recipient, + 'from' => $from->address, + 'recipient' => $recipient->address, 'amount' => $amount, ]; @@ -29,8 +29,8 @@ public function __construct(Model $token, Model $from, Model $recipient, string new Channel($token->collection->owner->address), new Channel("collection;{$token->collection->collection_chain_id}"), new Channel("token;{$this->broadcastData['tokenId']}"), - new Channel($from), - new Channel($recipient), + new Channel($from->address), + new Channel($recipient->address), new PlatformAppChannel(), ]; }