-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update is not available state / charts
- Loading branch information
Showing
9 changed files
with
93 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { DateTime } from 'luxon'; | ||
|
||
interface BankReservesDataRaw { | ||
date: number; | ||
value: number; | ||
} | ||
|
||
export class BankReservesData { | ||
// public readonly price: Ratio; | ||
// public readonly invertedPrice: Ratio; | ||
public readonly date: DateTime; | ||
public readonly ts: number; | ||
public readonly reservesCount: number; | ||
|
||
constructor(private raw: BankReservesDataRaw) { | ||
this.ts = this.raw.date; | ||
this.reservesCount = this.raw.value / 1e9; | ||
this.date = DateTime.fromMillis(this.raw.date); | ||
} | ||
|
||
clone(raw?: Partial<BankReservesDataRaw>): BankReservesData { | ||
return new BankReservesData({ ...this.raw, ...raw }); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { DateTime } from 'luxon'; | ||
|
||
interface CirculationSupplyDataRaw { | ||
date: number; | ||
tokenAmount: number; | ||
} | ||
|
||
export class CirculationSupplyData { | ||
// public readonly price: Ratio; | ||
// public readonly invertedPrice: Ratio; | ||
public readonly date: DateTime; | ||
public readonly ts: number; | ||
public readonly reservesCount: number; | ||
|
||
constructor(private raw: CirculationSupplyDataRaw) { | ||
this.ts = this.raw.date; | ||
this.reservesCount = this.raw.tokenAmount; | ||
this.date = DateTime.fromMillis(this.raw.date); | ||
} | ||
|
||
clone(raw?: Partial<CirculationSupplyDataRaw>): CirculationSupplyData { | ||
return new CirculationSupplyData({ ...this.raw, ...raw }); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters