Skip to content
This repository has been archived by the owner on Feb 2, 2025. It is now read-only.

Commit

Permalink
Fixes for v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Aug 21, 2023
1 parent 2fdbfbe commit 69af65c
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 27 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"react-syntax-highlighter": "^15.4.3",
"react-test-renderer": "^17.0.2",
"recharts": "^2.0.9",
"trueblocks-sdk": "^0.70.1",
"trueblocks-sdk": "^1.0.1",
"ts-morph": "^13.0.2"
}
}
1 change: 1 addition & 0 deletions src/ui/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export const App = () => {
chain: chain.chain,
fmt: 'json',
verbose: true,
chains: true,
}));

if (isSuccessfulCall(statusResponse)) {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/datastore/worker/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ async function fetchTransactions(chain: string, addresses: Address[], loaded: nu
articulate: true,
accounting: true,
// reversed: false,
relevant: true,
// relevant: true,
// summarize_by: 'monthly',
firstRecord: loaded + 1,
maxRecords: (() => {
Expand Down
8 changes: 4 additions & 4 deletions src/ui/modules/types/Reconciliation.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Reconciliation } from 'trueblocks-sdk';
import { Statement } from 'trueblocks-sdk';

//-----------------------------------------------------------------
export const priceReconciliation = (statementIn: Reconciliation, denom: string) => {
export const priceReconciliation = (statementIn: Statement, denom: string) => {
if (denom === 'ether') { return statementIn; }

const statement: Reconciliation = JSON.parse(JSON.stringify(statementIn));
const properties: Array<keyof Reconciliation> = [
const statement: Statement = JSON.parse(JSON.stringify(statementIn));
const properties: Array<keyof Statement> = [
'prevBal',
'begBal',
'begBalDiff',
Expand Down
1 change: 1 addition & 0 deletions src/ui/modules/types/models/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ export type TransactionModel =
toName?: Name,
staging: boolean,
chain: string,
extraData?: string,
}
10 changes: 5 additions & 5 deletions src/ui/views/Dashboard/Tabs/Details/SubTabs/HistoryRecons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import { useGlobalState } from '@state';
import { Card, Space, Tag } from 'antd';
import { Reconciliation, Transaction } from 'trueblocks-sdk';
import { Statement, Transaction } from 'trueblocks-sdk';

import {
double, priceReconciliation,
Expand All @@ -22,7 +22,7 @@ export const HistoryRecons = ({ record, params }: { record: Transaction; params:
return (
<div key={key} className={styles.container}>
<div key={key} className={styles.cardHolder}>
{(record?.statements as unknown as Reconciliation[])?.map((statement: Reconciliation, index: number) => {
{(record?.statements as unknown as Statement[])?.map((statement: Statement, index: number) => {
const statementIn = priceReconciliation(statement, denom);
return oneStatement(statementIn, index, userPrefs.showDetails, userPrefs.setShowDetails, styles, key);
})}
Expand All @@ -34,7 +34,7 @@ export const HistoryRecons = ({ record, params }: { record: Transaction; params:

declare type stateSetter<Type> = React.Dispatch<React.SetStateAction<Type>>;
const oneStatement = (
statement: Reconciliation,
statement: Statement,
index: number,
details: boolean,
setShowDetails: stateSetter<boolean>,
Expand Down Expand Up @@ -82,7 +82,7 @@ const oneStatement = (
);

//-----------------------------------------------------------------
const statementHeader = (statement: Reconciliation, details: boolean, setShowDetails: any) => {
const statementHeader = (statement: Statement, details: boolean, setShowDetails: any) => {
const title = `${statement.assetSymbol} reconciliation`;
return (
<div style={{
Expand All @@ -100,7 +100,7 @@ const statementHeader = (statement: Reconciliation, details: boolean, setShowDet
};

//-----------------------------------------------------------------
const statementBody = (statement: Reconciliation, details: boolean, styles: any) => {
const statementBody = (statement: Statement, details: boolean, styles: any) => {
const preAppBlkStr = statement.prevAppBlk === undefined ? '0' : statement.prevAppBlk.toString();
const rowStyle = styles.tableRow;
const detailView = !details ? <></> : (
Expand Down
4 changes: 2 additions & 2 deletions src/ui/views/Dashboard/Tabs/Details/components/ReconIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import {
UpCircleFilled,
} from '@ant-design/icons';
import {
Reconciliation,
Statement,
} from 'trueblocks-sdk';

export const ReconIcon = ({ statement }: { statement: Reconciliation }) => {
export const ReconIcon = ({ statement }: { statement: Statement }) => {
if (!statement) return <></>;
let icon = <></>;
if (statement.reconciled) {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/views/Dashboard/Tabs/Details/components/Statement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import React, { useEffect, useState } from 'react';
import { createUseStyles } from 'react-jss';

import { useGlobalState } from '@state';
import { Reconciliation } from 'trueblocks-sdk';
import { Statement } from 'trueblocks-sdk';

import {
priceReconciliation,
} from '@modules/types';

import { ReconIcon } from './ReconIcon';

export const Statement = ({ statement }: { statement: Reconciliation }) => {
export const Statement12 = ({ statement }: { statement: Statement }) => {
const style = useStyles();
const k = statement.assetAddr;
const { denom } = useGlobalState();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import React from 'react';
import { createUseStyles } from 'react-jss';

import { Reconciliation, Transaction } from 'trueblocks-sdk';
import { Statement, Transaction } from 'trueblocks-sdk';

import { Statement } from './Statement';
import { Statement12 } from './Statement';

export const StatementDisplay = ({ record }: { record: Transaction}) => {
const style = useStyles();
Expand All @@ -20,8 +20,8 @@ export const StatementDisplay = ({ record }: { record: Transaction}) => {
<div>
<table>
<tbody>
{(record.statements as unknown as Reconciliation[])?.map((statement, i) => (
<Statement
{(record.statements as unknown as Statement[])?.map((statement, i) => (
<Statement12
key={`statement.assetAddr + ${i.toString()}`}
statement={statement}
/>
Expand Down
1 change: 1 addition & 0 deletions src/ui/views/Dashboard/Tabs/Monitors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ export const Monitors = () => {
chain: chain.chain,
modes: ['monitors'],
verbose: true,
chains: true,
}), undefined, []) as CallStatus<Config[]>;
if (isFailedCall(monitorsCall)) {
createErrorNotification({
Expand Down
4 changes: 2 additions & 2 deletions src/ui/views/Explorer/Tabs/Blocks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export const Blocks = () => {
const blocksCall = useSdk(() => getBlocks({
chain: chain.chain,
blocks: [],
list: 0,
listCount: 12,
// list: 0,
// listCount: 12,
cache: true,
}));

Expand Down
2 changes: 1 addition & 1 deletion src/ui/views/Names/Tabs/SubTabs/GenericSubTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function GenericSubTab({ filterFunc, resourceName }: GenericSubTabProps)
chain: chain.chain,
addrs: [],
known: true,
logLevel: 2,
// logLevel: 2,
}));

return (
Expand Down
1 change: 1 addition & 0 deletions src/ui/views/Settings/Tabs/Indexes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export const IndexesView = () => {
chain: chain.chain,
modes: ['index'],
verbose: true,
chains: true,
}));

const theGridData = useMemo(() => {
Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13663,7 +13663,7 @@ resolve@^2.0.0-next.3:
react-test-renderer: ^17.0.2
recharts: ^2.0.9
style-loader: ^2.0.0
trueblocks-sdk: ^0.70.1
trueblocks-sdk: ^1.0.1
ts-jest: ^26.5.3
ts-loader: ^8.0.18
ts-morph: ^13.0.2
Expand All @@ -13674,13 +13674,13 @@ resolve@^2.0.0-next.3:
languageName: unknown
linkType: soft

"trueblocks-sdk@npm:^0.70.1":
version: 0.70.1
resolution: "trueblocks-sdk@npm:0.70.1"
"trueblocks-sdk@npm:^1.0.1":
version: 1.0.1
resolution: "trueblocks-sdk@npm:1.0.1"
dependencies:
typescript: ^4.9.4
vitest: ^0.29.2
checksum: c4a729b00d169c8c7ce0c6a8a892b3b3ce52a8532ed5da749cda70f401ac66a1a253bde987bc5618b41d2f0f538da66c6b63d72cc74d7cef62da6b01a2d0d48c
checksum: af2c898ef7798efc8e78b5bac1edc7ef6493c3c3449d501007794df722be6fc5df4deeaa99ebf5457e2ea3db5be199269b7aca92511a123f29161f296f36f440
languageName: node
linkType: hard

Expand Down

0 comments on commit 69af65c

Please sign in to comment.