Skip to content

Commit e5cefa9

Browse files
committed
feat(paynym): add P2TR (taproot) payment address support
1 parent 7899229 commit e5cefa9

File tree

2 files changed

+142
-142
lines changed

2 files changed

+142
-142
lines changed

lib/models/paynym/paynym_account_lite.dart

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,29 @@ class PaynymAccountLite {
1313
final String nymName;
1414
final String code;
1515
final bool segwit;
16+
final bool taproot;
1617

1718
PaynymAccountLite(
1819
this.nymId,
1920
this.nymName,
2021
this.code,
21-
this.segwit,
22-
);
22+
this.segwit, {
23+
this.taproot = false,
24+
});
2325

2426
PaynymAccountLite.fromMap(Map<String, dynamic> map)
2527
: nymId = map["nymId"] as String,
2628
nymName = map["nymName"] as String,
2729
code = map["code"] as String,
28-
segwit = map["segwit"] as bool;
30+
segwit = map["segwit"] as bool,
31+
taproot = map["taproot"] as bool? ?? false;
2932

3033
Map<String, dynamic> toMap() => {
3134
"nymId": nymId,
3235
"nymName": nymName,
3336
"code": code,
3437
"segwit": segwit,
38+
"taproot": taproot,
3539
};
3640

3741
@override

0 commit comments

Comments
 (0)