File tree Expand file tree Collapse file tree 5 files changed +15
-3
lines changed
Expand file tree Collapse file tree 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. -->
44
55# Changelog
66
7+ ## 1.0.0-dev.32
8+
9+ - Make parsable big number string as covariant of Fixed classes.
10+
711## 1.0.0-dev.31
812
913- Treat parsable big number string as a covariant of the ` Nat ` class.
Original file line number Diff line number Diff line change 11name : agent_dart
2- version : 1.0.0-dev.31
2+ version : 1.0.0-dev.32
33
44description : |
55 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 {
636636 } else if (x is int ) {
637637 final v = BigInt .from (x);
638638 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;
639642 } else {
640643 return false ;
641644 }
@@ -696,6 +699,11 @@ class FixedNatClass extends PrimitiveType<dynamic> {
696699 } else if (x is int && x >= 0 ) {
697700 final v = BigInt .from (x);
698701 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;
699707 } else {
700708 return false ;
701709 }
Original file line number Diff line number Diff line change 11name : agent_dart_base
2- version : 1.0.0-dev.31
2+ version : 1.0.0-dev.32
33
44description : The Dart plugin that bridges Rust implementation for agent_dart.
55repository : https://github.com/AstroxNetwork/agent_dart
Original file line number Diff line number Diff line change 11name : agent_dart_ffi
2- version : 1.0.0-dev.31
2+ version : 1.0.0-dev.32
33
44description : The FFI plugin that bridges Rust implementation for agent_dart.
55repository : https://github.com/AstroxNetwork/agent_dart
You can’t perform that action at this time.
0 commit comments