Skip to content

Commit

Permalink
Fix assert-ts export error fram-x/assert-ts#23
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Apr 23, 2022
1 parent 3270202 commit ce6e3c1
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 4 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ To get started with development do:
npm run dev
```

# Architecture

- `src/lib` contains reusable Svelte components to render trading strategy execution
- `src/routes` contains the default SvelteKit application pages. It needs to be copy-pasted to the parent project as is.
This code is minimal and most of the code is in reusable components.

# Development

## Helpful links
Expand All @@ -41,6 +47,7 @@ npm run dev

- Update routes in `trade-executor-frontend`
- Copy-paste `routes/strategy` to `frontend` package
- Update `frontend/package.json` with all dependencies needed to run `trade-executor-frontend`

## Release

Expand Down
4 changes: 3 additions & 1 deletion src/lib/helpers/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Number and time formatting helpers.
*/

import assert from 'assert-ts';
// https://github.com/fram-x/assert-ts/issues/23
import { assert } from 'assert-ts';


export function formatKilos(n): string {
if (n <= 1000) {
Expand Down
4 changes: 3 additions & 1 deletion src/lib/strategy/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

import { getConfiguredStrategies } from './configuration';
import type { StrategyConfiguration } from './configuration';
import assert from "assert-ts";
// https://github.com/fram-x/assert-ts/issues/23
import { assert } from 'assert-ts';


/**
* Metadata describes strategy information not related to the profit generation.
Expand Down
4 changes: 3 additions & 1 deletion src/lib/strategy/path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
* Navigation mapping and breadcrumbs..
*/

import assert from 'assert-ts';
// https://github.com/fram-x/assert-ts/issues/23
import { assert } from 'assert-ts';

import type { Page } from '@sveltejs/kit';
import type { CurrentStrategyInfo } from '../state/store';

Expand Down
5 changes: 5 additions & 0 deletions src/lib/styles/gridjs.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ th.gridjs-th {

.gridjs-table a {
color: #458b00;
text-decoration: none;
}

.gridjs-table a:hover {
color: #cc0000;
}

.gridjs-pagination .gridjs-pages button,
Expand Down
4 changes: 3 additions & 1 deletion src/lib/time/TimeAgo.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
Display time ago widget.
-->
<script lang="ts">
import assert from 'assert-ts';
// https://github.com/fram-x/assert-ts/issues/23
import { assert } from 'assert-ts';
import { formatUnixTimestampAsHours } from '../helpers/formatters';
export let time;
Expand Down

0 comments on commit ce6e3c1

Please sign in to comment.