mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Validate bitcoin's saved transaction priority
This commit is contained in:
@@ -21,22 +21,6 @@ class MoneroTransactionPriority extends TransactionPriority {
|
||||
static const fastest = MoneroTransactionPriority(title: 'Fastest', raw: 4);
|
||||
static const standard = slow;
|
||||
|
||||
|
||||
static List<MoneroTransactionPriority> forWalletType(WalletType type) {
|
||||
switch (type) {
|
||||
case WalletType.monero:
|
||||
return MoneroTransactionPriority.all;
|
||||
case WalletType.bitcoin:
|
||||
return [
|
||||
MoneroTransactionPriority.slow,
|
||||
MoneroTransactionPriority.automatic,
|
||||
MoneroTransactionPriority.fast
|
||||
];
|
||||
default:
|
||||
return [];
|
||||
}
|
||||
}
|
||||
|
||||
static MoneroTransactionPriority deserialize({required int raw}) {
|
||||
switch (raw) {
|
||||
case 0:
|
||||
@@ -50,7 +34,7 @@ class MoneroTransactionPriority extends TransactionPriority {
|
||||
case 4:
|
||||
return fastest;
|
||||
default:
|
||||
return automatic;
|
||||
throw Exception('Unexpected token: $raw for MoneroTransactionPriority deserialize');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user