Files
sendico/frontend/pshared/lib/models/wallet/wallet.dart
Stephan D 48ccbb1c82
Some checks failed
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed
implemented backend wallet service connection
2025-11-26 00:48:00 +01:00

63 lines
1.4 KiB
Dart

import 'package:pshared/models/wallet/balance.dart';
import 'package:pshared/models/wallet/money.dart';
class WalletAsset {
final String chain;
final String tokenSymbol;
final String contractAddress;
const WalletAsset({
required this.chain,
required this.tokenSymbol,
required this.contractAddress,
});
}
class WalletModel {
final String walletRef;
final String organizationRef;
final String ownerRef;
final WalletAsset asset;
final String depositAddress;
final String status;
final Map<String, String>? metadata;
final DateTime? createdAt;
final DateTime? updatedAt;
final WalletBalance? balance;
final WalletMoney? availableMoney;
const WalletModel({
required this.walletRef,
required this.organizationRef,
required this.ownerRef,
required this.asset,
required this.depositAddress,
required this.status,
this.metadata,
this.createdAt,
this.updatedAt,
this.balance,
this.availableMoney,
});
WalletModel copyWith({
WalletBalance? balance,
WalletMoney? availableMoney,
}) {
return WalletModel(
walletRef: walletRef,
organizationRef: organizationRef,
ownerRef: ownerRef,
asset: asset,
depositAddress: depositAddress,
status: status,
metadata: metadata,
createdAt: createdAt,
updatedAt: updatedAt,
balance: balance ?? this.balance,
availableMoney: availableMoney ?? this.availableMoney,
);
}
}