Files
hash-wallet/lib/buy/buy_provider_description.dart
jwinterm ef895994ae Remove Wyre buy-provider integration (shut down 2023)
Delete the WyreBuyProvider + WyreOrderProviderAdapter source files,
strip imports and call sites from buy/order view models and the
buy webview, force isBitcoinBuyEnabled = false in di.dart, and drop
the three wyreSecretKey/wyreApiKey/wyreAccountId entries from
tool/utils/secret_key.dart.

BuyProviderDescription.wyre (raw: 0) is kept as a no-op legacy entry
so any old Hive-persisted order with that raw value still deserializes
without throwing. Don't wire it back to UI/services.
2026-05-17 08:22:08 -04:00

25 lines
880 B
Dart

import 'package:cw_core/enumerable_item.dart';
class BuyProviderDescription extends EnumerableItem<int> with Serializable<int> {
const BuyProviderDescription({required String title, required int raw, required this.image})
: super(title: title, raw: raw);
final String image;
// raw: 0 was Wyre, removed (provider shut down 2023). Kept the constant
// for legacy Hive deserialization; do not wire it back into UI/services.
static const wyre = BuyProviderDescription(title: 'Wyre', raw: 0, image: '');
static const moonPay = BuyProviderDescription(title: 'MoonPay', raw: 1, image: '');
static BuyProviderDescription deserialize({required int raw}) {
switch (raw) {
case 0:
return wyre;
case 1:
return moonPay;
default:
throw Exception('Incorrect token $raw for BuyProviderDescription deserialize');
}
}
}