Set block condition to BigNumber in MethodDecoding (#5592)

* Set block condition to BigNumber in MethodDecoding

* Add gt(0)
This commit is contained in:
Nicolas Gotchac 2017-05-10 14:41:52 +02:00 committed by Jaco Greeff
parent 518b6e647b
commit 860d6c01ed
1 changed files with 5 additions and 2 deletions

View File

@ -14,6 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import BigNumber from 'bignumber.js';
import { CircularProgress } from 'material-ui';
import moment from 'moment';
import React, { Component, PropTypes } from 'react';
@ -177,10 +178,12 @@ class MethodDecoding extends Component {
return null;
}
if (condition.block && condition.block.gt(0)) {
const blockCondition = new BigNumber(condition.block || 0);
if (blockCondition.gt(0)) {
const blockNumber = (
<span className={ styles.highlight }>
#{ condition.block.toFormat(0) }
#{ blockCondition.toFormat(0) }
</span>
);