Enable SendMax to top up debit card
This commit is contained in:
parent
c9bad23b20
commit
28ef9a22dc
5 changed files with 81 additions and 15 deletions
|
|
@ -184,5 +184,13 @@ angular.module('copayApp.services').factory('txFormatService', function($filter,
|
|||
};
|
||||
};
|
||||
|
||||
root.satToUnit = function(amount) {
|
||||
var config = configService.getSync().wallet.settings;
|
||||
var unitToSatoshi = config.unitToSatoshi;
|
||||
var satToUnit = 1 / unitToSatoshi;
|
||||
var unitDecimals = config.unitDecimals;
|
||||
return parseFloat((amount * satToUnit).toFixed(unitDecimals));
|
||||
};
|
||||
|
||||
return root;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue