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) {
|
function addSymbol(chainId, p, base, quote, inverted) {
|
||||||
const symbol = base.s + '/' + quote.s
|
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 full_name = exchange + ':' + symbol // + '%' + formatFee(fee)
|
||||||
const ticker = tickerKey(chainId, p.e, base.a, quote.a, p.f)
|
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
|
// add the search index only if this is the natural, noninverted base/quote pair
|
||||||
log('addSymbol', p, base, quote, inverted, ticker)
|
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 type = 'swap'
|
||||||
const decimals = inverted ? -p.d : p.d
|
const decimals = inverted ? -p.d : p.d
|
||||||
const symbolInfo = {
|
const symbolInfo = {
|
||||||
|
|||||||
@@ -14,11 +14,18 @@
|
|||||||
/
|
/
|
||||||
</span>
|
</span>
|
||||||
<suspense>
|
<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>
|
</suspense>
|
||||||
</span>
|
</span>
|
||||||
<suspense>
|
<suspense>
|
||||||
<token-symbol :addr="item.order.tokenIn" v-if="!item.order.amountIsInput"/>
|
<token-symbol :addr="item.order.tokenIn"/>
|
||||||
</suspense>
|
</suspense>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:item.output="{ item }">
|
<template v-slot:item.output="{ item }">
|
||||||
@@ -31,9 +38,19 @@
|
|||||||
</suspense>
|
</suspense>
|
||||||
/
|
/
|
||||||
</span>
|
</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>
|
</span>
|
||||||
<suspense>
|
<suspense>
|
||||||
<token-amount :chain-id="item.chainId" :addr="item.order.tokenOut" :amount="item.order.amount"/>
|
<token-symbol :addr="item.order.tokenOut"/>
|
||||||
</suspense>
|
</suspense>
|
||||||
</template>
|
</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.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-if="item.state===OrderState.Filled" prepend-icon="mdi-check-circle-outline" color="green">Completed
|
||||||
</v-chip>
|
</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-chip v-if="item.state===OrderState.Underfunded" prepend-icon="mdi-alert" color="warning">Underfunded</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>
|
<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
|
// elaborate
|
||||||
for (const st of result) {
|
for (const st of result) {
|
||||||
let low, high;
|
let low, high;
|
||||||
console.log('elab', st.order)
|
// console.log('elab', st.order)
|
||||||
const buy = st.order.tokenIn > st.order.tokenOut;
|
const buy = st.order.tokenIn > st.order.tokenOut;
|
||||||
if (buy) {
|
if (buy) {
|
||||||
low = st.order.tokenOut
|
low = st.order.tokenOut
|
||||||
@@ -352,7 +369,7 @@ const orders = computed(()=>{
|
|||||||
st.base = st.order.inverted ? high : low;
|
st.base = st.order.inverted ? high : low;
|
||||||
st.quote = st.order.inverted ? low : high;
|
st.quote = st.order.inverted ? low : high;
|
||||||
st.minIsLimit = buy !== st.order.inverted // whether limit/breakout is flipped
|
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)
|
result.sort((a,b)=>b.startTime-a.startTime)
|
||||||
// console.log('orders', result)
|
// console.log('orders', result)
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ function buildTranches() {
|
|||||||
console.log('buildTranches', builder, order, tranches)
|
console.log('buildTranches', builder, order, tranches)
|
||||||
const ps = prices.value
|
const ps = prices.value
|
||||||
const ws = weights.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]
|
let p = ps[i]
|
||||||
const w = ws[i]
|
const w = ws[i]
|
||||||
const t = newTranche({
|
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 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
|
// 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
|
let b = intercept * scale
|
||||||
m = encodeIEE754(m)
|
m = encodeIEE754(m)
|
||||||
b = encodeIEE754(b)
|
b = encodeIEE754(b)
|
||||||
const isMax = (buy !== symbol.inverted) !== breakout // buy XOR inverted XOR breakout
|
const isMax = buy !== breakout // buy XOR inverted XOR breakout
|
||||||
console.log('apply line point isMax?', buy?'buy':'sell', symbol.inverted, breakout, isMax)
|
// 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))
|
// console.log('applyLine current line value', isMax?'max':'min', slope*timestamp()+intercept, 1./(slope*timestamp()+intercept))
|
||||||
if (isMax) {
|
if (isMax) {
|
||||||
tranche.maxLine.intercept = b;
|
tranche.maxLine.intercept = b;
|
||||||
tranche.maxLine.slope = m;
|
tranche.maxLine.slope = m;
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// these must also be set in vuetify.js for the "theme"
|
// these must also be set in vuetify.js for the "theme"
|
||||||
|
@use 'sass:color';
|
||||||
|
|
||||||
// OFFICIAL DEXORDER PALETTE
|
// OFFICIAL DEXORDER PALETTE
|
||||||
$green: #35D721;
|
$green: #35D721;
|
||||||
@@ -15,8 +16,8 @@ $arbitrum-color: #12aaff;
|
|||||||
$uniswap-color: #ff007a;
|
$uniswap-color: #ff007a;
|
||||||
|
|
||||||
$primary: $green;
|
$primary: $green;
|
||||||
$primary-50: transparentize($primary,0.5);
|
$primary-50: color.adjust($primary, $alpha: -0.5);
|
||||||
$primary-25: transparentize($primary,0.75);
|
$primary-25: color.adjust($primary, $alpha: -0.75);
|
||||||
|
|
||||||
$theme: (
|
$theme: (
|
||||||
background: $white,
|
background: $white,
|
||||||
|
|||||||
Reference in New Issue
Block a user