mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-06-28 20:39:51 +00:00
Add fallback for tx status [skip ci]
This commit is contained in:
parent
66e1745ad9
commit
6b95b7c6ac
1 changed files with 2 additions and 2 deletions
|
@ -41,8 +41,8 @@ class TradeState extends EnumerableItem<String> with Serializable<String> {
|
||||||
static const exchanging = TradeState(raw: 'exchanging', title: 'Exchanging');
|
static const exchanging = TradeState(raw: 'exchanging', title: 'Exchanging');
|
||||||
static const sending = TradeState(raw: 'sending', title: 'Sending');
|
static const sending = TradeState(raw: 'sending', title: 'Sending');
|
||||||
static const success = TradeState(raw: 'success', title: 'Success');
|
static const success = TradeState(raw: 'success', title: 'Success');
|
||||||
static TradeState deserialize({required String raw}) {
|
|
||||||
|
|
||||||
|
static TradeState deserialize({required String raw}) {
|
||||||
switch (raw) {
|
switch (raw) {
|
||||||
case '1':
|
case '1':
|
||||||
return unpaid;
|
return unpaid;
|
||||||
|
@ -138,7 +138,7 @@ class TradeState extends EnumerableItem<String> with Serializable<String> {
|
||||||
case 'awaiting':
|
case 'awaiting':
|
||||||
return awaiting;
|
return awaiting;
|
||||||
default:
|
default:
|
||||||
throw Exception('Unexpected token: $raw in TradeState deserialize');
|
return TradeState(raw: raw, title: raw);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue