mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 09:57:46 +00:00
6378d052ac
* add sideshift exchange provider * add secret key * Fix issues * Fix issues * refactor code * add permission checks to side shift * fix formatting issues
31 lines
878 B
Dart
31 lines
878 B
Dart
import 'package:cw_core/enumerable_item.dart';
|
|
|
|
class ExchangeProviderDescription extends EnumerableItem<int>
|
|
with Serializable<int> {
|
|
const ExchangeProviderDescription({String title, int raw})
|
|
: super(title: title, raw: raw);
|
|
|
|
static const xmrto = ExchangeProviderDescription(title: 'XMR.TO', raw: 0);
|
|
static const changeNow =
|
|
ExchangeProviderDescription(title: 'ChangeNOW', raw: 1);
|
|
static const morphToken =
|
|
ExchangeProviderDescription(title: 'MorphToken', raw: 2);
|
|
|
|
static const sideShift =
|
|
ExchangeProviderDescription(title: 'SideShift', raw: 3);
|
|
|
|
static ExchangeProviderDescription deserialize({int raw}) {
|
|
switch (raw) {
|
|
case 0:
|
|
return xmrto;
|
|
case 1:
|
|
return changeNow;
|
|
case 2:
|
|
return morphToken;
|
|
case 3:
|
|
return sideShift;
|
|
default:
|
|
return null;
|
|
}
|
|
}
|
|
}
|