@@ -706,7 +706,7 @@ Transaction.prototype.apply = function (trs, block, sender, cb) {
706
706
return cb ( senderBalance . error ) ;
707
707
}
708
708
709
- amount = amount . toNumber ( ) ;
709
+ amount = parseInt ( amount . toFixed ( ) , 10 ) ;
710
710
711
711
this . scope . account . merge ( sender . address , {
712
712
balance : - amount ,
@@ -739,7 +739,7 @@ Transaction.prototype.apply = function (trs, block, sender, cb) {
739
739
//
740
740
Transaction . prototype . undo = function ( trs , block , sender , cb ) {
741
741
var amount = bignum ( trs . amount . toString ( ) ) ;
742
- amount = amount . plus ( trs . fee . toString ( ) ) . toNumber ( ) ;
742
+ amount = parseInt ( amount . plus ( trs . fee . toString ( ) ) . toFixed ( ) , 10 ) ;
743
743
744
744
this . scope . account . merge ( sender . address , {
745
745
balance : amount ,
@@ -783,7 +783,7 @@ Transaction.prototype.applyUnconfirmed = function (trs, sender, requester, cb) {
783
783
return cb ( senderBalance . error ) ;
784
784
}
785
785
786
- amount = amount . toNumber ( ) ;
786
+ amount = parseInt ( amount . toFixed ( ) , 10 ) ;
787
787
788
788
this . scope . account . merge ( sender . address , { u_balance : - amount } , function ( err , sender ) {
789
789
if ( err ) {
@@ -808,7 +808,7 @@ Transaction.prototype.applyUnconfirmed = function (trs, sender, requester, cb) {
808
808
//
809
809
Transaction . prototype . undoUnconfirmed = function ( trs , sender , cb ) {
810
810
var amount = bignum ( trs . amount . toString ( ) ) ;
811
- amount = amount . plus ( trs . fee . toString ( ) ) . toNumber ( ) ;
811
+ amount = parseInt ( amount . plus ( trs . fee . toString ( ) ) . toFixed ( ) , 10 ) ;
812
812
813
813
this . scope . account . merge ( sender . address , { u_balance : amount } , function ( err , sender ) {
814
814
if ( err ) {
0 commit comments