|
|
@@ -153,7 +153,7 @@ const calcTotalProfit = async () => {
|
|
|
const parseIorKey = (iorKey) => {
|
|
|
const [, type, accept, side, , ratioString] = iorKey.match(/^ior_(r|ou|m|wm|ot|os)(a?)(h|c|n)?(_([\d-]+))?$/);
|
|
|
let ratio = 0;
|
|
|
- if (ratioString?.includes('-')) {
|
|
|
+ if (type === 'ot' || type === 'os') {
|
|
|
ratio = ratioString;
|
|
|
}
|
|
|
else if (ratioString) {
|
|
|
@@ -256,6 +256,27 @@ const formatEvents = (events, cprKeys) => {
|
|
|
ratioKey = ratio;
|
|
|
index = 1;
|
|
|
}
|
|
|
+ else if (type === 'ot') {
|
|
|
+ console.log('ot ratio', ratio);
|
|
|
+ switch (ratio) {
|
|
|
+ case '0':
|
|
|
+ ratioKey = '0-1';
|
|
|
+ index = 0;
|
|
|
+ break;
|
|
|
+ case '1':
|
|
|
+ ratioKey = '0-1';
|
|
|
+ index = 2;
|
|
|
+ break;
|
|
|
+ case '2':
|
|
|
+ ratioKey = '2-3';
|
|
|
+ index = 0;
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ ratioKey = '2-3';
|
|
|
+ index = 2;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (typeof (ratioKey) == 'number') {
|
|
|
if (ratioKey > 0) {
|
|
|
ratioKey = `+${ratioKey}`;
|