We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1762837 commit f7664deCopy full SHA for f7664de
tests/WalletFloatTest.php
@@ -347,4 +347,27 @@ public function testBitcoin(): void
347
}
348
349
350
+ /**
351
+ * Case from @ucanbehack
352
+ * @see https://github.com/bavix/laravel-wallet/issues/149
353
+ */
354
+ public function testBitcoin2(): void
355
+ {
356
+ if (app(Mathable::class) instanceof BCMath) {
357
358
+ * @var User $user
359
360
+ $user = factory(User::class)->create();
361
+ $this->assertEquals($user->balance, 0);
362
+
363
+ $user->wallet->decimal_places = 8;
364
+ $user->wallet->save();
365
366
+ $user->depositFloat(0.09699977);
367
368
+ $this->assertEquals($user->balanceFloat, 0.09699977);
369
+ $this->assertEquals($user->balance, 9699977);
370
+ }
371
372
373
0 commit comments