File tree 5 files changed +15
-3
lines changed
5 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,10 @@ that can be found in the LICENSE file. -->
4
4
5
5
# Changelog
6
6
7
+ ## 1.0.0-dev.32
8
+
9
+ - Make parsable big number string as covariant of Fixed classes.
10
+
7
11
## 1.0.0-dev.31
8
12
9
13
- Treat parsable big number string as a covariant of the ` Nat ` class.
Original file line number Diff line number Diff line change 1
1
name : agent_dart
2
- version : 1.0.0-dev.31
2
+ version : 1.0.0-dev.32
3
3
4
4
description : |
5
5
An agent library built for Internet Computer,
Original file line number Diff line number Diff line change @@ -636,6 +636,9 @@ class FixedIntClass extends PrimitiveType {
636
636
} else if (x is int ) {
637
637
final v = BigInt .from (x);
638
638
return v >= min && v <= max;
639
+ } else if (x is String && BigInt .tryParse (x) != null ) {
640
+ final v = BigInt .parse (x);
641
+ return v >= min && v <= max;
639
642
} else {
640
643
return false ;
641
644
}
@@ -696,6 +699,11 @@ class FixedNatClass extends PrimitiveType<dynamic> {
696
699
} else if (x is int && x >= 0 ) {
697
700
final v = BigInt .from (x);
698
701
return v < max;
702
+ } else if (x is String &&
703
+ BigInt .tryParse (x) != null &&
704
+ BigInt .parse (x) >= BigInt .zero) {
705
+ final v = BigInt .parse (x);
706
+ return v < max;
699
707
} else {
700
708
return false ;
701
709
}
Original file line number Diff line number Diff line change 1
1
name : agent_dart_base
2
- version : 1.0.0-dev.31
2
+ version : 1.0.0-dev.32
3
3
4
4
description : The Dart plugin that bridges Rust implementation for agent_dart.
5
5
repository : https://github.com/AstroxNetwork/agent_dart
Original file line number Diff line number Diff line change 1
1
name : agent_dart_ffi
2
- version : 1.0.0-dev.31
2
+ version : 1.0.0-dev.32
3
3
4
4
description : The FFI plugin that bridges Rust implementation for agent_dart.
5
5
repository : https://github.com/AstroxNetwork/agent_dart
You can’t perform that action at this time.
0 commit comments