File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
packages/tfchain_client/lib Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -45,7 +45,11 @@ class ProposalInfo {
45
45
if (entry.value == null ) {
46
46
args[entry.key] = entry.value;
47
47
} else {
48
- args[entry.key] = String .fromCharCodes (entry.value);
48
+ try {
49
+ args[entry.key] = String .fromCharCodes (entry.value);
50
+ } catch (e) {
51
+ args[entry.key] = entry.value;
52
+ }
49
53
}
50
54
}
51
55
}
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ class QueryDao {
101
101
final total = totalAyeWeight + totalNayeWeight;
102
102
if (total > 0 ) {
103
103
if (typeAye) {
104
- return ((totalAyeWeight / total) * 100 ).toInt ();
104
+ return ((totalAyeWeight / total) * 100 ).round ();
105
105
}
106
106
107
- return ((totalNayeWeight / total) * 100 ).toInt ();
107
+ return ((totalNayeWeight / total) * 100 ).round ();
108
108
}
109
109
return 0 ;
110
110
}
You can’t perform that action at this time.
0 commit comments