mirror of
https://github.com/bitcoinresearchkit/brk.git
synced 2026-06-11 23:43:32 -07:00
global: fix: bugs
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@
|
||||
"unplugin-auto-import": "^0.18.2",
|
||||
"unplugin-icons": "^0.19.0",
|
||||
"vite": "^5.3.5",
|
||||
"vite-plugin-pwa": "^0.20.0",
|
||||
"vite-plugin-pwa": "^0.20.1",
|
||||
"vite-plugin-solid": "^2.10.2",
|
||||
"workbox-window": "^7.1.0",
|
||||
"wrangler": "^3.66.0"
|
||||
|
||||
Generated
+32
-8
@@ -71,8 +71,8 @@ devDependencies:
|
||||
specifier: ^5.3.5
|
||||
version: 5.3.5
|
||||
vite-plugin-pwa:
|
||||
specifier: ^0.20.0
|
||||
version: 0.20.0(vite@5.3.5)(workbox-build@7.1.1)(workbox-window@7.1.0)
|
||||
specifier: ^0.20.1
|
||||
version: 0.20.1(vite@5.3.5)(workbox-build@7.1.1)(workbox-window@7.1.0)
|
||||
vite-plugin-solid:
|
||||
specifier: ^2.10.2
|
||||
version: 2.10.2(solid-js@1.8.19)(vite@5.3.5)
|
||||
@@ -1974,7 +1974,7 @@ packages:
|
||||
call-me-maybe: 1.0.2
|
||||
cross-spawn: 7.0.3
|
||||
string-argv: 0.3.2
|
||||
type-detect: 4.0.8
|
||||
type-detect: 4.1.0
|
||||
dev: true
|
||||
|
||||
/@leeoniya/ufuzzy@1.0.14:
|
||||
@@ -3403,6 +3403,17 @@ packages:
|
||||
pend: 1.2.0
|
||||
dev: true
|
||||
|
||||
/fdir@6.2.0(picomatch@4.0.2):
|
||||
resolution: {integrity: sha512-9XaWcDl0riOX5j2kYfy0kKdg7skw3IY6kA4LFT8Tk2yF9UdrADUy8D6AJuBLtf7ISm/MksumwAHE3WVbMRyCLw==}
|
||||
peerDependencies:
|
||||
picomatch: ^3 || ^4
|
||||
peerDependenciesMeta:
|
||||
picomatch:
|
||||
optional: true
|
||||
dependencies:
|
||||
picomatch: 4.0.2
|
||||
dev: true
|
||||
|
||||
/filelist@1.0.4:
|
||||
resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==}
|
||||
dependencies:
|
||||
@@ -4595,6 +4606,11 @@ packages:
|
||||
engines: {node: '>=8.6'}
|
||||
dev: true
|
||||
|
||||
/picomatch@4.0.2:
|
||||
resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==}
|
||||
engines: {node: '>=12'}
|
||||
dev: true
|
||||
|
||||
/pify@2.3.0:
|
||||
resolution: {integrity: sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -5547,6 +5563,14 @@ packages:
|
||||
resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==}
|
||||
dev: true
|
||||
|
||||
/tinyglobby@0.2.0:
|
||||
resolution: {integrity: sha512-+clyYQfAnNlt5a1x7CCQ6RLuTIztDfDAl6mAANvqRUlz6sVy5znCzJOhais8G6oyUyoeeaorLopO3HptVP8niA==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
dependencies:
|
||||
fdir: 6.2.0(picomatch@4.0.2)
|
||||
picomatch: 4.0.2
|
||||
dev: true
|
||||
|
||||
/to-fast-properties@2.0.0:
|
||||
resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -5582,8 +5606,8 @@ packages:
|
||||
resolution: {integrity: sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==}
|
||||
dev: true
|
||||
|
||||
/type-detect@4.0.8:
|
||||
resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==}
|
||||
/type-detect@4.1.0:
|
||||
resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==}
|
||||
engines: {node: '>=4'}
|
||||
dev: true
|
||||
|
||||
@@ -5850,8 +5874,8 @@ packages:
|
||||
spdx-expression-parse: 3.0.1
|
||||
dev: true
|
||||
|
||||
/vite-plugin-pwa@0.20.0(vite@5.3.5)(workbox-build@7.1.1)(workbox-window@7.1.0):
|
||||
resolution: {integrity: sha512-/kDZyqF8KqoXRpMUQtR5Atri/7BWayW8Gp7Kz/4bfstsV6zSFTxjREbXZYL7zSuRL40HGA+o2hvUAFRmC+bL7g==}
|
||||
/vite-plugin-pwa@0.20.1(vite@5.3.5)(workbox-build@7.1.1)(workbox-window@7.1.0):
|
||||
resolution: {integrity: sha512-M6Pk4b18i5ryrhKgiIF8Zud0HGphYiCbEfLsCdlvmwn/CEnS6noVwfIDG/+3V7r6yxpPV/gLiKw+rIlCCiCCoQ==}
|
||||
engines: {node: '>=16.0.0'}
|
||||
peerDependencies:
|
||||
'@vite-pwa/assets-generator': ^0.2.4
|
||||
@@ -5863,8 +5887,8 @@ packages:
|
||||
optional: true
|
||||
dependencies:
|
||||
debug: 4.3.5
|
||||
fast-glob: 3.3.2
|
||||
pretty-bytes: 6.1.1
|
||||
tinyglobby: 0.2.0
|
||||
vite: 5.3.5
|
||||
workbox-build: 7.1.1
|
||||
workbox-window: 7.1.0
|
||||
|
||||
@@ -81,11 +81,6 @@ export function Chart({
|
||||
|
||||
createEffect(
|
||||
on([div, () => charts()[chartIndex]], ([div, chartConfig]) => {
|
||||
console.log({
|
||||
div,
|
||||
chartConfig,
|
||||
});
|
||||
|
||||
if (!div || !chartConfig) return;
|
||||
|
||||
const preset = presetAccessor();
|
||||
@@ -359,7 +354,7 @@ export function Chart({
|
||||
bottom: `${isLastDrawn() ? 32 : 0}px`,
|
||||
right: `77px`,
|
||||
}}
|
||||
class="text-low-contrast absolute z-50 px-3 py-0.5"
|
||||
class="text-low-contrast absolute z-10 px-3 py-0.5"
|
||||
>
|
||||
<RadioGroup size="xs" title={chartPriceModeKey} sl={chartPriceMode} />
|
||||
</div>
|
||||
|
||||
@@ -35,8 +35,8 @@ export function createPresets(scale: ResourceScale): PartialPresetFolder {
|
||||
bottom: [
|
||||
{
|
||||
title: `New Addresses`,
|
||||
color: colors.white,
|
||||
datasetPath: `/${scale}-to-created-addresses`,
|
||||
color: colors.bitcoin,
|
||||
datasetPath: `/${scale}-to-new-addresses`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -23,20 +23,20 @@ export function createPresets(scale: ResourceScale) {
|
||||
{
|
||||
title: `24h`,
|
||||
color: colors.up_to_1d,
|
||||
datasetPath: `/date-to-up-to-1d-supply-to-circulating-supply-ratio`,
|
||||
datasetPath: `/${scale}-to-up-to-1d-supply-to-circulating-supply-ratio`,
|
||||
},
|
||||
|
||||
...fromXToYCohorts.map(({ key, id, name, legend }) => ({
|
||||
title: legend,
|
||||
color: colors[key],
|
||||
datasetPath:
|
||||
`/date-to-${id}-supply-to-circulating-supply-ratio` as const,
|
||||
`/${scale}-to-${id}-supply-to-circulating-supply-ratio` as const,
|
||||
})),
|
||||
|
||||
{
|
||||
title: `15y+`,
|
||||
color: colors.from_15y,
|
||||
datasetPath: `/date-to-from-15y-supply-to-circulating-supply-ratio`,
|
||||
datasetPath: `/${scale}-to-from-15y-supply-to-circulating-supply-ratio`,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -357,7 +357,7 @@ impl PriceDatasets {
|
||||
.last_key_value()
|
||||
.unwrap()
|
||||
.0
|
||||
<= date
|
||||
< date
|
||||
{
|
||||
self.kraken_daily.replace(Kraken::fetch_daily_prices()?);
|
||||
}
|
||||
|
||||
@@ -19,12 +19,7 @@ impl UTXOCohortsDurableStates {
|
||||
pub fn init(date_data_vec: &DateDataVec) -> Self {
|
||||
let mut s = Self::default();
|
||||
|
||||
if let Some(last_date_data) = date_data_vec.last() {
|
||||
let last_block_data = last_date_data.blocks.last().unwrap_or_else(|| {
|
||||
dbg!(&last_date_data);
|
||||
panic!()
|
||||
});
|
||||
|
||||
if let Some(last_block_data) = date_data_vec.last_block() {
|
||||
date_data_vec.iter().for_each(|date_data| {
|
||||
let year = date_data.date.year() as u32;
|
||||
|
||||
|
||||
@@ -11,12 +11,13 @@ pub struct DateDataVec(Vec<DateData>);
|
||||
|
||||
impl DateDataVec {
|
||||
pub fn last_block(&self) -> Option<&BlockData> {
|
||||
self.last().and_then(|date_data| date_data.blocks.last())
|
||||
self.iter().flat_map(|date_data| &date_data.blocks).last()
|
||||
}
|
||||
|
||||
pub fn last_mut_block(&mut self) -> Option<&mut BlockData> {
|
||||
self.last_mut()
|
||||
.and_then(|date_data| date_data.blocks.last_mut())
|
||||
self.iter_mut()
|
||||
.flat_map(|date_data| &mut date_data.blocks)
|
||||
.last()
|
||||
}
|
||||
|
||||
pub fn second_last_block(&self) -> Option<&BlockData> {
|
||||
|
||||
Reference in New Issue
Block a user