import 'package:pshared/data/dto/payment/managed_wallet.dart';
import 'package:pshared/data/mapper/payment/asset.dart';
import 'package:pshared/models/payment/methods/managed_wallet.dart';


extension ManagedWalletPaymentMethodMapper on ManagedWalletPaymentMethod {
  ManagedWalletEndpointDTO toDTO() => ManagedWalletEndpointDTO(
    managedWalletRef: managedWalletRef,
    asset: asset?.toDTO(),
  );
}

extension ManagedWalletDataDTOMapper on ManagedWalletEndpointDTO {
  ManagedWalletPaymentMethod toDomain() => ManagedWalletPaymentMethod(
    managedWalletRef: managedWalletRef,
    asset: asset?.toDomain(),
  );
}
