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


extension WalletAssetDTOMapper on WalletAssetDTO {
  WalletAsset toDomain() => WalletAsset(
    chain: chainNetworkFromValue(chain),
    tokenSymbol: tokenSymbol,
    contractAddress: contractAddress,
  );
}

extension WalletAssetMapper on WalletAsset {
  WalletAssetDTO toDTO() => WalletAssetDTO(
    chain: chainNetworkToValue(chain),
    tokenSymbol: tokenSymbol,
    contractAddress: contractAddress,
  );
}
