mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-25 05:58:42 +01:00
fix: only throw on deserialize if kDebugMode is true (#2976)
This closes #2972, in debug mode we will still catch these issues but if somehow that happens on production it will fallback to safe default
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import 'package:cw_core/transaction_priority.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
|
||||
class MoneroTransactionPriority extends TransactionPriority {
|
||||
const MoneroTransactionPriority({required String title, required int raw})
|
||||
@@ -30,7 +31,10 @@ class MoneroTransactionPriority extends TransactionPriority {
|
||||
case 4:
|
||||
return fastest;
|
||||
default:
|
||||
throw Exception('Unexpected token: $raw for MoneroTransactionPriority deserialize');
|
||||
if (kDebugMode) {
|
||||
throw Exception('Unexpected token: $raw for MoneroTransactionPriority deserialize');
|
||||
}
|
||||
return medium;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user