Merge branch 'master' into ui-2
This commit is contained in:
@@ -182,10 +182,11 @@ export default class Contract {
|
||||
log.params = {};
|
||||
log.event = event.name;
|
||||
|
||||
decoded.params.forEach((param) => {
|
||||
decoded.params.forEach((param, index) => {
|
||||
const { type, value } = param.token;
|
||||
const key = param.name || index;
|
||||
|
||||
log.params[param.name] = { type, value };
|
||||
log.params[key] = { type, value };
|
||||
});
|
||||
|
||||
return log;
|
||||
|
||||
@@ -93,6 +93,16 @@ export function outChainStatus (status) {
|
||||
}
|
||||
|
||||
export function outDate (date) {
|
||||
if (typeof date.toISOString === 'function') {
|
||||
return date;
|
||||
}
|
||||
|
||||
try {
|
||||
if (typeof date === 'string' && (new Date(date)).toISOString() === date) {
|
||||
return new Date(date);
|
||||
}
|
||||
} catch (error) {}
|
||||
|
||||
return new Date(outNumber(date).toNumber() * 1000);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user