order page updates

This commit is contained in:
Tim
2024-03-27 22:05:56 -04:00
parent 6a01e5bab8
commit 9e884f57ac
7 changed files with 63 additions and 23 deletions

View File

@@ -1,7 +1,7 @@
<template>
<span>
{{adjValue}}
<btn v-if="showBtn && adjValue!==null" size="small" variant="plain" @click="invert()">{{pair?pair.toPrecision(5):''}}</btn>
<btn v-if="showBtn && adjValue!==null" size="small" variant="plain" @click="invert()">{{pair.value?pair.value.toPrecision(5):''}}</btn>
</span>
<!-- todo optional pair label and inversion button -->
</template>
@@ -26,7 +26,7 @@ function invert() {
prefs.inverted[k] = !prefs.inverted[k]
}
const adjValue = computed(() => props.value === null || props.value === undefined || !base.value || !quote.value ? null : pairPrice(base.value, quote.value, props.value, props.decimals))
const adjValue = computed(() => props.value === null || props.value === undefined || !base.value || !quote.value ? null : pairPrice(s.chainId, base.value, quote.value, props.value, props.decimals))
const pair = computed(() => {
const inToken = props.baseToken ? props.baseToken : token(s.chainId, props.baseAddr)