mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-18 02:07:37 +00:00
17 lines
488 B
Dart
17 lines
488 B
Dart
|
enum TransactionDirection { incoming, outgoing }
|
||
|
|
||
|
TransactionDirection parseTransactionDirectionFromInt(int raw) {
|
||
|
switch (raw) {
|
||
|
case 0: return TransactionDirection.incoming;
|
||
|
case 1: return TransactionDirection.outgoing;
|
||
|
default: return null;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
TransactionDirection parseTransactionDirectionFromNumber(String raw) {
|
||
|
switch (raw) {
|
||
|
case "0": return TransactionDirection.incoming;
|
||
|
case "1": return TransactionDirection.outgoing;
|
||
|
default: return null;
|
||
|
}
|
||
|
}
|