File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ public function incrementBalance($transaction)
5858 throw new Exception ('Increment balance expects parameter to be a float or a WalletTransaction object. ' );
5959 }
6060
61- $ this ->increment ('raw_balance ' , $ transaction ->getAmount ());
61+ $ this ->increment ('raw_balance ' , $ transaction ->getAmount () * pow ( 10 , $ this -> walletType -> decimals ) );
6262
6363 // Record in ledger
6464 $ this ->createWalletLedgerEntry ($ transaction , $ this ->raw_balance );
@@ -85,7 +85,7 @@ public function decrementBalance($transaction)
8585 throw new Exception ('Decrement balance expects parameter to be a number or a WalletTransaction object. ' );
8686 }
8787
88- $ this ->decrement ('raw_balance ' , $ transaction ->getAmount ());
88+ $ this ->decrement ('raw_balance ' , $ transaction ->getAmount () * pow ( 10 , $ this -> walletType -> decimals ) );
8989
9090 // Record in ledger
9191 $ this ->createWalletLedgerEntry ($ transaction , $ this ->raw_balance , 'decrement ' );
You can’t perform that action at this time.
0 commit comments