@@ -706,7 +706,7 @@ Transaction.prototype.apply = function (trs, block, sender, cb) {
706706 return cb ( senderBalance . error ) ;
707707 }
708708
709- amount = amount . toNumber ( ) ;
709+ amount = parseInt ( amount . toFixed ( ) , 10 ) ;
710710
711711 this . scope . account . merge ( sender . address , {
712712 balance : - amount ,
@@ -739,7 +739,7 @@ Transaction.prototype.apply = function (trs, block, sender, cb) {
739739//
740740Transaction . prototype . undo = function ( trs , block , sender , cb ) {
741741 var amount = bignum ( trs . amount . toString ( ) ) ;
742- amount = amount . plus ( trs . fee . toString ( ) ) . toNumber ( ) ;
742+ amount = parseInt ( amount . plus ( trs . fee . toString ( ) ) . toFixed ( ) , 10 ) ;
743743
744744 this . scope . account . merge ( sender . address , {
745745 balance : amount ,
@@ -783,7 +783,7 @@ Transaction.prototype.applyUnconfirmed = function (trs, sender, requester, cb) {
783783 return cb ( senderBalance . error ) ;
784784 }
785785
786- amount = amount . toNumber ( ) ;
786+ amount = parseInt ( amount . toFixed ( ) , 10 ) ;
787787
788788 this . scope . account . merge ( sender . address , { u_balance : - amount } , function ( err , sender ) {
789789 if ( err ) {
@@ -808,7 +808,7 @@ Transaction.prototype.applyUnconfirmed = function (trs, sender, requester, cb) {
808808//
809809Transaction . prototype . undoUnconfirmed = function ( trs , sender , cb ) {
810810 var amount = bignum ( trs . amount . toString ( ) ) ;
811- amount = amount . plus ( trs . fee . toString ( ) ) . toNumber ( ) ;
811+ amount = parseInt ( amount . plus ( trs . fee . toString ( ) ) . toFixed ( ) , 10 ) ;
812812
813813 this . scope . account . merge ( sender . address , { u_balance : amount } , function ( err , sender ) {
814814 if ( err ) {
0 commit comments