brainblocks
Advanced tools
Comparing version 1.0.6 to 1.0.7
@@ -14,5 +14,10 @@ | ||
if (props.payment.currency === 'rai') { | ||
var hasRai = function hasRai(num) { | ||
num = parseInt(num) / 1000; | ||
return num > Math.floor(num); | ||
}; | ||
currency = ''; | ||
amount = props.payment.amount >= 1000 ? (props.payment.amount / 1000000).toFixed(3) : (props.payment.amount / 1000000).toFixed(6); | ||
amount = hasRai(props.payment.amount) ? (parseInt(props.payment.amount) / 1000000).toFixed(6) : (parseInt(props.payment.amount) / 1000000).toFixed(3); | ||
} | ||
@@ -19,0 +24,0 @@ return jsxDom( |
{ | ||
"name": "brainblocks", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Javascript module template.", | ||
@@ -5,0 +5,0 @@ "main": "dist/brainblocks.js", |
@@ -14,5 +14,10 @@ /* @flow */ | ||
amount = (props.payment.amount >= 1000) | ||
? (props.payment.amount / 1000000).toFixed(3) | ||
: (props.payment.amount / 1000000).toFixed(6); | ||
function hasRai(num) { | ||
num = parseInt(num) / 1000; | ||
return num > Math.floor(num) | ||
} | ||
amount = hasRai(props.payment.amount) | ||
? (parseInt(props.payment.amount) / 1000000).toFixed(6) | ||
: (parseInt(props.payment.amount) / 1000000).toFixed(3); | ||
} | ||
@@ -19,0 +24,0 @@ return ( |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
715322
8871