diff --git a/src/Models/Transaction.php b/src/Models/Transaction.php index 563e72a..cc53831 100644 --- a/src/Models/Transaction.php +++ b/src/Models/Transaction.php @@ -43,14 +43,14 @@ protected function addAmountTransactedToWalletSatoshiAttribute() } return Cache::rememberForever("tpenaranda-bcoin:amount-in-satoshi-transacted-tx_hash:{$this->hash}-wallet_id:{$this->wallet_id}", function () { - if (empty($this->inputs[0]->coin) || empty($transaction->fee)) { - $this->hydrate($this->getDataFromBlockchain()); - } - if (empty($this->block)) { return null; } + if (empty($this->inputs[0]->coin) || empty($transaction->fee)) { + $this->hydrate($this->getDataFromBlockchain()); + } + $total_inputs_own_wallet = $total_outputs_own_wallet = 0; foreach ($this->inputs as $input) {