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


extension PaymentAssetMapper on PaymentAsset {
  AssetDTO toDTO() => AssetDTO(
    chain: chainNetworkToValue(chain),
    tokenSymbol: tokenSymbol,
    contractAddress: contractAddress,
  );
}

extension AssetDTOMapper on AssetDTO {
  PaymentAsset toDomain() => PaymentAsset(
    chain: chainNetworkFromValue(chain),
    tokenSymbol: tokenSymbol,
    contractAddress: contractAddress,
  );
}
