Skip to content

Commit fbe2ca0

Browse files
committed
Widget with eth operations.
1 parent d891fb4 commit fbe2ca0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

api/widget.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ ethplorerWidget.Type['tokenHistory'] = function(element, options, templates){
475475
};
476476

477477
this.getRequestParams = function(additionalParams){
478-
var requestOptions = ['limit', 'address', 'timestamp'];
478+
var requestOptions = ['limit', 'address', 'timestamp', 'showEth'];
479479
var params = {
480480
apiKey: 'ethplorer.widget',
481481
type: 'transfer'
@@ -614,6 +614,10 @@ ethplorerWidget.Type['tokenHistory'] = function(element, options, templates){
614614
tr.tokenInfo.symbol = tr.tokenInfo.name;
615615
}
616616
var k = Math.pow(10, tr.tokenInfo.decimals);
617+
if(tr.isEth){
618+
k = 1;
619+
tr.tokenInfo = {symbol: "ETH", decimals: 18, address: '0x0000000000000000000000000000000000000000'};
620+
}
617621
var amount = ethplorerWidget.Utils.formatNum(tr.value / k, true, parseInt(tr.tokenInfo.decimals), true);
618622

619623
var hash = tr.priority ? tr.priority : false;

0 commit comments

Comments
 (0)