fromJson static method
Deserializes a wallet transaction from JSON.
Implementation
static WalletTransaction fromJson(Map<String, dynamic> json) {
final walletType = WalletType.fromValue(json['walletType'] as String);
switch (walletType) {
case WalletType.CASHU:
return CashuWalletTransactionModel.fromJson(json);
case WalletType.NWC:
return NwcWalletTransactionModel.fromJson(json);
case WalletType.LNURL:
return LnurlWalletTransactionModel.fromJson(json);
}
}