mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-17 05:41:29 +02:00
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.
25 lines
880 B
Dart
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');
|
|
}
|
|
}
|
|
}
|