hack to isolate Trocador exchange name

This commit is contained in:
julian 2023-04-28 14:40:36 -06:00
parent 73b7af77f6
commit 33ec3f5a25

View file

@ -24,6 +24,11 @@ abstract class Exchange {
case TrocadorExchange.exchangeName:
return TrocadorExchange.instance;
default:
final split = name.split(" ");
if (split.length >= 2) {
// silly way to check for 'Trocador ($providerName)'
return fromName(split.first);
}
throw ArgumentError("Unknown exchange name");
}
}