line build fixes; symbol name update
This commit is contained in:
@@ -106,12 +106,13 @@ export function feelessTickerKey(ticker) {
|
||||
|
||||
function addSymbol(chainId, p, base, quote, inverted) {
|
||||
const symbol = base.s + '/' + quote.s
|
||||
const exchange = ['UNIv2', 'UNIv3'][p.e]
|
||||
const fee = `${(p.f/10000).toFixed(2)}%`
|
||||
const exchange = ['Uniswap v2', 'Uniswap v3'][p.e] + ' ' + fee
|
||||
const full_name = exchange + ':' + symbol // + '%' + formatFee(fee)
|
||||
const ticker = tickerKey(chainId, p.e, base.a, quote.a, p.f)
|
||||
// add the search index only if this is the natural, noninverted base/quote pair
|
||||
log('addSymbol', p, base, quote, inverted, ticker)
|
||||
const description = `${base.n} / ${quote.n} ${(p.f/10000).toFixed(2)}%`
|
||||
const description = `${base.n} / ${quote.n}`
|
||||
const type = 'swap'
|
||||
const decimals = inverted ? -p.d : p.d
|
||||
const symbolInfo = {
|
||||
|
||||
@@ -14,11 +14,18 @@
|
||||
/
|
||||
</span>
|
||||
<suspense>
|
||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenIn" :amount="item.order.amount"/>
|
||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenIn" :amount="item.order.amount" :raw="true"/>
|
||||
</suspense>
|
||||
</span>
|
||||
<span v-else>
|
||||
<suspense>
|
||||
<pulse :touch="item.filledIn">
|
||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenIn" :amount="item.filledIn" :raw="true"/>
|
||||
</pulse>
|
||||
</suspense>
|
||||
</span>
|
||||
<suspense>
|
||||
<token-symbol :addr="item.order.tokenIn" v-if="!item.order.amountIsInput"/>
|
||||
<token-symbol :addr="item.order.tokenIn"/>
|
||||
</suspense>
|
||||
</template>
|
||||
<template v-slot:item.output="{ item }">
|
||||
@@ -31,9 +38,19 @@
|
||||
</suspense>
|
||||
/
|
||||
</span>
|
||||
<suspense>
|
||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenOut" :amount="item.order.amount" :raw="true"/>
|
||||
</suspense>
|
||||
</span>
|
||||
<span v-else>
|
||||
<suspense>
|
||||
<pulse :touch="item.filledOut">
|
||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenOut" :amount="item.filledOut" :raw="true"/>
|
||||
</pulse>
|
||||
</suspense>
|
||||
</span>
|
||||
<suspense>
|
||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenOut" :amount="item.order.amount"/>
|
||||
<token-symbol :addr="item.order.tokenOut"/>
|
||||
</suspense>
|
||||
</template>
|
||||
<!--
|
||||
@@ -69,7 +86,7 @@
|
||||
<v-chip v-if="item.state===OrderState.Canceled" prepend-icon="mdi-cancel" color="red">Canceled</v-chip>
|
||||
<v-chip v-if="item.state===OrderState.Filled" prepend-icon="mdi-check-circle-outline" color="green">Completed
|
||||
</v-chip>
|
||||
<v-chip v-if="item.state===OrderState.Expired" prepend-icon="mdi-progress-check" color="grey-darken-1">Expired
|
||||
<v-chip v-if="item.state===OrderState.Expired" prepend-icon="mdi-progress-check" color="grey-darken-1">Partial
|
||||
</v-chip>
|
||||
<v-chip v-if="item.state===OrderState.Underfunded" prepend-icon="mdi-alert" color="warning">Underfunded</v-chip>
|
||||
<v-chip v-if="item.state===OrderState.Error" prepend-icon="mdi-alert" color="error">Error</v-chip>
|
||||
@@ -339,7 +356,7 @@ const orders = computed(()=>{
|
||||
// elaborate
|
||||
for (const st of result) {
|
||||
let low, high;
|
||||
console.log('elab', st.order)
|
||||
// console.log('elab', st.order)
|
||||
const buy = st.order.tokenIn > st.order.tokenOut;
|
||||
if (buy) {
|
||||
low = st.order.tokenOut
|
||||
@@ -352,7 +369,7 @@ const orders = computed(()=>{
|
||||
st.base = st.order.inverted ? high : low;
|
||||
st.quote = st.order.inverted ? low : high;
|
||||
st.minIsLimit = buy !== st.order.inverted // whether limit/breakout is flipped
|
||||
console.log('elaborated', st.order)
|
||||
// console.log('elaborated', st)
|
||||
}
|
||||
result.sort((a,b)=>b.startTime-a.startTime)
|
||||
// console.log('orders', result)
|
||||
|
||||
@@ -81,7 +81,7 @@ function buildTranches() {
|
||||
console.log('buildTranches', builder, order, tranches)
|
||||
const ps = prices.value
|
||||
const ws = weights.value
|
||||
for(let i=0; i<ps.length; i++) {
|
||||
for(let i=ps.length-1; i>=0; i--) { // reverse
|
||||
let p = ps[i]
|
||||
const w = ws[i]
|
||||
const t = newTranche({
|
||||
|
||||
@@ -8,7 +8,7 @@ import Color from "color";
|
||||
|
||||
|
||||
export const MIN_EXECUTION_TIME = 60 // give at least one full minute for each tranche to trigger
|
||||
export const DEFAULT_SLIPPAGE = 0.0010;
|
||||
export const DEFAULT_SLIPPAGE = 0.0030;
|
||||
|
||||
|
||||
// Builders are data objects which store a configuration state
|
||||
@@ -155,9 +155,9 @@ function applyLine(tranche, symbol, buy, intercept, slope=0, breakout=false) {
|
||||
let b = intercept * scale
|
||||
m = encodeIEE754(m)
|
||||
b = encodeIEE754(b)
|
||||
const isMax = (buy !== symbol.inverted) !== breakout // buy XOR inverted XOR breakout
|
||||
console.log('apply line point isMax?', buy?'buy':'sell', symbol.inverted, breakout, isMax)
|
||||
console.log('applyLine current line value', isMax?'max':'min', m*timestamp()+b, 1./(m*timestamp()+b))
|
||||
const isMax = buy !== breakout // buy XOR inverted XOR breakout
|
||||
// console.log('apply line point isMax?', buy?'buy':'sell', symbol.inverted, breakout, isMax)
|
||||
// console.log('applyLine current line value', isMax?'max':'min', slope*timestamp()+intercept, 1./(slope*timestamp()+intercept))
|
||||
if (isMax) {
|
||||
tranche.maxLine.intercept = b;
|
||||
tranche.maxLine.slope = m;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// these must also be set in vuetify.js for the "theme"
|
||||
@use 'sass:color';
|
||||
|
||||
// OFFICIAL DEXORDER PALETTE
|
||||
$green: #35D721;
|
||||
@@ -15,8 +16,8 @@ $arbitrum-color: #12aaff;
|
||||
$uniswap-color: #ff007a;
|
||||
|
||||
$primary: $green;
|
||||
$primary-50: transparentize($primary,0.5);
|
||||
$primary-25: transparentize($primary,0.75);
|
||||
$primary-50: color.adjust($primary, $alpha: -0.5);
|
||||
$primary-25: color.adjust($primary, $alpha: -0.75);
|
||||
|
||||
$theme: (
|
||||
background: $white,
|
||||
|
||||
Reference in New Issue
Block a user