more price handling bugfixes

This commit is contained in:
Tim Olson
2023-11-18 16:26:51 -04:00
parent 7293c101f8
commit 1b670b1398
3 changed files with 6 additions and 8 deletions

View File

@@ -50,9 +50,7 @@ function gib() {
if( s.account ) {
disabled.value = true
socket.emit('faucet', s.chainId, s.account)
setTimeout(()=>disabled.value=false,
1000) // todo
// 60*1000)
setTimeout(()=>disabled.value=false, 60*1000)
}
}

View File

@@ -4,7 +4,7 @@
<script setup>
import {useStore} from "@/store/store";
import {subPrices, unsubPrices} from "@/blockchain/prices.js";
import {subPrices, unsubPrices, WIDE_PRICE_FORMAT} from "@/blockchain/prices.js";
import {computed, onBeforeUnmount} from "vue";
import {FixedNumber} from "ethers";
@@ -24,7 +24,7 @@ const price = computed(()=>{
console.log('pool price is',typeof p, p)
if( !p )
return ''
p = FixedNumber.fromString(p).toUnsafeFloat()
p = FixedNumber.fromString(p, WIDE_PRICE_FORMAT).toUnsafeFloat()
if( props.inverted )
p = 1/p
return p.toPrecision(props.precision)