MultisigStorage.fromMap constructor

MultisigStorage.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory MultisigStorage.fromMap(Map<String, dynamic> map) {
  return MultisigStorage(
    timePoint: TimePoint(
      index: map['when']['index'],
      height: map['when']['height'],
    ),
    deposit: map['deposit'],
    depositor: Uint8List.fromList(map['depositor']),
    // approvals = List<List<int>>
    approvals: (map['approvals'] as List<List<int>>)
        .map((e) => Uint8List.fromList(e))
        .toList(),
  );
}