Skip to content

Commit bc12587

Browse files
committed
feat: settings general api
1 parent e88fe33 commit bc12587

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

apps/mochi-web/pages/tip-network.tsx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { HOME_URL } from '~envs'
66
import { SEO } from '~app/layout/seo'
77
import { API } from '~constants/api'
88
import dynamic from 'next/dynamic'
9-
import { TransactionGraphData, TransactionEdge } from '~types/mochi-schema'
109
import { GraphData, NodeObject } from 'react-force-graph-2d'
1110
import { useMemo, useState } from 'react'
1211
import { ProfileBar } from '~components/TipNetwork/ProfileBar'
@@ -18,6 +17,28 @@ import {
1817
TipNetworkData,
1918
} from '~types/tip-graph'
2019
import { useDisclosure } from '@dwarvesf/react-hooks'
20+
import { Profile } from '@consolelabs/mochi-rest'
21+
22+
export interface TransactionNode {
23+
profile_id: string
24+
total_volume: number
25+
spend_volume: number
26+
receive_volume: number
27+
profile: Profile
28+
}
29+
30+
export interface TransactionEdge {
31+
from_profile_id: string
32+
to_profile_id: string
33+
total_volume: number
34+
spend: number
35+
receive: number
36+
}
37+
38+
export interface TransactionGraphData {
39+
nodes: TransactionNode[]
40+
edges: TransactionEdge[]
41+
}
2142

2243
const TipNetworkGraph = dynamic(
2344
() =>

apps/mochi-web/types/mochi-schema.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
* ---------------------------------------------------------------
1010
*/
1111

12-
import { Profile } from '@consolelabs/mochi-rest'
1312
export interface ModelActivity {
1413
guild_default?: boolean
1514
id?: number
@@ -2537,24 +2536,3 @@ export interface UuidNullUUID {
25372536
/** Valid is true if UUID is not NULL */
25382537
valid?: boolean
25392538
}
2540-
2541-
export interface TransactionNode {
2542-
profile_id: string
2543-
total_volume: number
2544-
spend_volume: number
2545-
receive_volume: number
2546-
profile: Profile
2547-
}
2548-
2549-
export interface TransactionEdge {
2550-
from_profile_id: string
2551-
to_profile_id: string
2552-
total_volume: number
2553-
spend: number
2554-
receive: number
2555-
}
2556-
2557-
export interface TransactionGraphData {
2558-
nodes: TransactionNode[]
2559-
edges: TransactionEdge[]
2560-
}

0 commit comments

Comments
 (0)