You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cake_wallet/lib/monero/subaddress.dart

23 lines
703 B

import 'package:cw_monero/structs/subaddress_row.dart';
class Subaddress {
Subaddress({this.id, this.address, this.label});
Subaddress.fromMap(Map map)
: this.id = map['id'] == null ? 0 : int.parse(map['id'] as String),
this.address = (map['address'] ?? '') as String,
this.label = (map['label'] ?? '') as String;
Subaddress.fromRow(SubaddressRow row)
: this.id = row.getId(),
this.address = row.getAddress(),
this.label = row.getId() == 0 &&
row.getLabel().toLowerCase() == 'Primary account'.toLowerCase()
? 'Primary address'
: row.getLabel();
final int id;
final String address;
final String label;
}