Skip to content

Commit 5b57311

Browse files
committed
wip: nostr community, web worker
1 parent 91249e6 commit 5b57311

13 files changed

Lines changed: 927 additions & 2072 deletions

File tree

config-overrides.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module.exports = {
2+
babel: function (config, env) {
3+
console.log(config)
4+
config.plugins.push(['@babel/plugin-transform-private-property-in-object']);
5+
config.plugins.push(['@babel/plugin-transform-optional-chaining']);
6+
config.plugins.push(['@babel/plugin-proposal-private-property-in-object']);
7+
config.plugins.push(['@babel/preset-env']);
8+
return config;
9+
}
10+
}

package-lock.json

Lines changed: 880 additions & 2036 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
"version": "7.3.3",
88
"license": "MIT",
99
"scripts": {
10-
"start": "echo \"$CF_PAGES_COMMIT_SHA\" > public/commit_hash && react-scripts start",
11-
"build": "echo \"$CF_PAGES_COMMIT_SHA\" > public/commit_hash && react-scripts build",
12-
"test": "react-scripts test",
10+
"start": "echo \"$CF_PAGES_COMMIT_SHA\" > public/commit_hash && react-app-rewired start",
11+
"build": "echo \"$CF_PAGES_COMMIT_SHA\" > public/commit_hash && react-app-rewired build",
12+
"test": "react-app-rewired test",
1313
"prepare": "husky install",
1414
"pre-commit": "lint-staged",
1515
"analyze": "source-map-explorer 'build/static/js/*.js'",
@@ -56,8 +56,8 @@
5656
"bech32": "^2.0.0",
5757
"bignumber.js": "^9.0.2",
5858
"buffer": "^6.0.3",
59-
"comlink": "^4.4.1",
6059
"classnames": "^2.3.2",
60+
"comlink": "^4.4.1",
6161
"crypto-js": "^4.1.1",
6262
"date-fns": "^2.28.0",
6363
"i18next": "^21.8.14",
@@ -74,13 +74,14 @@
7474
"lodash.uniqby": "^4.7.0",
7575
"lottie-react": "^2.3.1",
7676
"moment": "^2.29.4",
77-
"nostr-tools": "1.5.0",
77+
"@terra-money/@terra-money/nostr-tools": "1.10.2",
7878
"numeral": "^2.0.6",
7979
"prettier": "^2.6.2",
8080
"qrcode.react": "^3.1.0",
8181
"qs": "^6.11.0",
8282
"ramda": "^0.28.0",
8383
"react": "^18.2.0",
84+
"react-app-rewired": "^2.2.1",
8485
"react-copy-to-clipboard": "^5.1.0",
8586
"react-dom": "^18.2.0",
8687
"react-hook-form": "^7.29.0",
@@ -99,6 +100,9 @@
99100
},
100101
"devDependencies": {
101102
"@babel/plugin-proposal-private-property-in-object": "^7.21.11",
103+
"@babel/plugin-transform-optional-chaining": "^7.22.15",
104+
"@babel/plugin-transform-private-property-in-object": "^7.22.11",
105+
"@babel/preset-env": "^7.22.20",
102106
"@emotion/react": "^11.9.0",
103107
"@emotion/styled": "^11.8.1",
104108
"@types/crypto-js": "^4.1.1",

src/app/electron.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Event } from "nostr-tools"
1+
import { Event } from "@terra-money/nostr-tools"
22
import { RelayDict } from "types/nostr"
33
import Raven from "utils/nostr/raven"
44

src/components/channel/message-view/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { darken } from "@mui/material"
55
import Box from "@mui/material/Box"
66
import { useTheme } from "@mui/material/styles"
77
import Tooltip from "@mui/material/Tooltip"
8-
import { nip19 } from "nostr-tools"
8+
import { nip19 } from "@terra-money/nostr-tools"
99
import ProfileDialog from "components/channel/message-view/profile"
1010
import useContentRenderer from "utils/hooks/use-render-content"
1111
import Avatar from "components/channel/message-view/profile/avatar"

src/components/channel/message-view/message-menu/short-emoji-picker/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const ShortEmojiPicker = (props: {
2020
if (frequent === null) {
2121
// @ts-ignore
2222
const promises = Object.values(
23-
FrequentlyUsed.get({
23+
FrequentlyUsed._get1({
2424
maxFrequentRows: 2,
2525
perLine: 3,
2626
})

src/components/channel/message-view/profile/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import Box from "@mui/material/Box"
44
import { useTheme } from "@mui/material/styles"
55
import Tooltip from "@mui/material/Tooltip"
66
import DialogContent from "@mui/material/DialogContent"
7-
import { nip05, nip19 } from "nostr-tools"
7+
import { nip05, nip19 } from "@terra-money/nostr-tools"
88
import Avatar from "components/channel/message-view/profile/avatar"
99
import { keysAtom } from "utils/nostr/atoms"
1010
import { Profile } from "types/nostr/index"

src/providers/raven.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React, { useEffect, useMemo, useState } from "react"
22
import uniq from "lodash.uniq"
3-
import { nip04, nip19 } from "nostr-tools"
3+
import { nip04, nip19 } from "@terra-money/nostr-tools"
44

55
import { initRaven, RavenEvents } from "utils/nostr/raven"
66
import {

src/utils/hooks/use-live-public-messages.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const useLivePublicMessages = () => {
6262
clean
6363
.filter((c) => c.root === TERRA_CID)
6464
.map((c) => ({ ...c, children: clean.filter((x) => x.root === c.id) })),
65-
[clean, TERRA_CID]
65+
[clean]
6666
)
6767
}
6868

src/utils/nostr/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const SCROLL_DETECT_THRESHOLD = 5
1414
export const MESSAGE_PER_PAGE = 30
1515
export const ACCEPTABLE_LESS_PAGE_MESSAGES = 5
1616
export const TERRA_CID =
17-
"899c87b9677f1f220c8df29137f51c9432943b2a8a6a3981bdaa73309337b8ba"
17+
"61e9000f661983b2ccc5b6665acd4aa7a42b5580985562312c6caae5d15811f3"
1818

1919
export function notEmpty<TValue>(
2020
value: TValue | null | undefined

0 commit comments

Comments
 (0)