| |
@@ -104,6 +120,7 @@ import NewOrder from "@/components/NewOrder.vue";
import PairPrice from "@/components/PairPrice.vue";
const TokenAmount = defineAsyncComponent(()=>import('./TokenAmount.vue'))
+const TokenSymbol = defineAsyncComponent(()=>import('./TokenSymbol.vue'))
const s = useStore()
const props = defineProps(['vault'])
@@ -127,11 +144,11 @@ const datatableHeaders = [
{title: 'Date', align: 'start', key: 'start'},
{title: 'Input', align: 'end', key: 'input'},
{title: 'Output', align: 'end', key: 'output'},
- {title: 'Remaining', align: 'end', key: 'remaining'},
- {title: 'Filled', align: 'end', key: 'filled'},
+ // {title: 'Remaining', align: 'end', key: 'remaining'},
+ // {title: 'Filled', align: 'end', key: 'filled'},
{title: 'Avg Price', align: 'end', key: 'avg'},
{title: 'Status', align: 'end', key: 'status'},
- {title: '', align: 'end', key: 'action'},
+ // {title: '', align: 'end', key: 'action'},
];
const orders = computed(()=>{
@@ -236,16 +253,17 @@ function describeTrancheTime(st, isStart, t) {
function describeTrancheLine(st, isMin, b, m) {
// todo make this a PairPrice
if( b===0 && m===0 ) return ''
+ const chainId = useStore().chainId
console.log('tranche line', isMin, b, m)
const inverted = st.order.tokenIn > st.order.tokenOut
const t0 = inverted ? st.order.tokenIn : st.order.tokenOut
const t1 = !inverted ? st.order.tokenIn : st.order.tokenOut
if( m !== 0 ) {
const limit = b + m * s.clock
- const price = pairPriceAddr(t0, t1, limit);
+ const price = pairPriceAddr(chainId, t0, t1, limit);
return 'diagonal ' + (price === null ? null : price.toPrecision(5))
}
- const price = pairPriceAddr(t0, t1, b)
+ const price = pairPriceAddr(chainId, t0, t1, b)
return (isMin === st.order.amountIsInput ? 'dont-chase ' : 'limit ') + (price === null ? null : price.toPrecision(5))
}
diff --git a/src/components/PairPrice.vue b/src/components/PairPrice.vue
index 2fccf98..68fc70f 100644
--- a/src/components/PairPrice.vue
+++ b/src/components/PairPrice.vue
@@ -1,7 +1,7 @@
{{adjValue}}
- {{pair?pair.toPrecision(5):''}}
+ {{pair.value?pair.value.toPrecision(5):''}}
@@ -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)
diff --git a/src/components/TokenChip.vue b/src/components/TokenChip.vue
index dd78033..ae598fd 100644
--- a/src/components/TokenChip.vue
+++ b/src/components/TokenChip.vue
@@ -1,7 +1,7 @@
- {{token.symbol}} {{token.name}}
+ {{token.s}} {{token.n}}
diff --git a/src/components/TokenSymbol.vue b/src/components/TokenSymbol.vue
new file mode 100644
index 0000000..74e623d
--- /dev/null
+++ b/src/components/TokenSymbol.vue
@@ -0,0 +1,17 @@
+
+ {{token.s}}
+
+
+
+
+
diff --git a/src/components/Vault.vue b/src/components/Vault.vue
index 5608dc3..621f1dc 100644
--- a/src/components/Vault.vue
+++ b/src/components/Vault.vue
@@ -49,11 +49,11 @@
-
- Your Deposit Address {{ s.vaults.length > 1 ? '#' + (num + 1) : '' }}
-
+
+
+
- {{addr}}
+ Deposit Address {{addr}}