implemented backend wallet service connection
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

This commit is contained in:
Stephan D
2025-11-26 00:48:00 +01:00
parent 68f0a1048f
commit 48ccbb1c82
24 changed files with 420 additions and 37 deletions

View File

@@ -0,0 +1,20 @@
import 'package:json_annotation/json_annotation.dart';
part 'asset.g.dart';
@JsonSerializable()
class WalletAssetDTO {
final String chain;
final String tokenSymbol;
final String contractAddress;
const WalletAssetDTO({
required this.chain,
required this.tokenSymbol,
required this.contractAddress,
});
factory WalletAssetDTO.fromJson(Map<String, dynamic> json) => _$WalletAssetDTOFromJson(json);
Map<String, dynamic> toJson() => _$WalletAssetDTOToJson(this);
}

View File

@@ -0,0 +1,24 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:pshared/data/dto/wallet/money.dart';
part 'balance.g.dart';
@JsonSerializable()
class WalletBalanceDTO {
final MoneyDTO? available;
final MoneyDTO? pendingInbound;
final MoneyDTO? pendingOutbound;
final String? calculatedAt;
const WalletBalanceDTO({
required this.available,
required this.pendingInbound,
required this.pendingOutbound,
required this.calculatedAt,
});
factory WalletBalanceDTO.fromJson(Map<String, dynamic> json) => _$WalletBalanceDTOFromJson(json);
Map<String, dynamic> toJson() => _$WalletBalanceDTOToJson(this);
}

View File

@@ -0,0 +1,18 @@
import 'package:json_annotation/json_annotation.dart';
part 'money.g.dart';
@JsonSerializable()
class MoneyDTO {
final String amount;
final String currency;
const MoneyDTO({
required this.amount,
required this.currency,
});
factory MoneyDTO.fromJson(Map<String, dynamic> json) => _$MoneyDTOFromJson(json);
Map<String, dynamic> toJson() => _$MoneyDTOToJson(this);
}

View File

@@ -0,0 +1,34 @@
import 'package:json_annotation/json_annotation.dart';
import 'package:pshared/data/dto/wallet/asset.dart';
part 'wallet.g.dart';
@JsonSerializable()
class WalletDTO {
final String walletRef;
final String organizationRef;
final String ownerRef;
final WalletAssetDTO asset;
final String depositAddress;
final String status;
final Map<String, String>? metadata;
final String? createdAt;
final String? updatedAt;
const WalletDTO({
required this.walletRef,
required this.organizationRef,
required this.ownerRef,
required this.asset,
required this.depositAddress,
required this.status,
this.metadata,
this.createdAt,
this.updatedAt,
});
factory WalletDTO.fromJson(Map<String, dynamic> json) => _$WalletDTOFromJson(json);
Map<String, dynamic> toJson() => _$WalletDTOToJson(this);
}