Commit 91c2cc07 authored by Ben Hayward's avatar Ben Hayward

Update for feedback

1 merge request!396[Sprint/RollingRabbit](fix): Wallet balance caching #1115
Pipeline #96659974 failed with stages
in 3 minutes and 16 seconds
......@@ -62,7 +62,7 @@ class Balance
$balance = $this->token->balanceOf($address);
if ($balance === null) {
throw new \Exception('Unable to retrieve balance');
return null;
}
$this->cache->set($cacheKey, serialize($balance), 60);
......
......@@ -90,6 +90,6 @@ class BalanceSpec extends ObjectBehavior
$this->setUser($user);
$this->shouldThrow(new \Exception("Unable to retrieve balance"))->duringGet();
$this->get()->shouldReturn(null);
}
}
Please register or to comment