Skip to content

Commit

Permalink
Merge pull request #18 from hoprnet/este/uhttp
Browse files Browse the repository at this point in the history
Este/uhttp
  • Loading branch information
esterlus authored Jul 18, 2024
2 parents b2a139b + 9a3f4da commit 5ef9248
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions frontend/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ REACT_APP_BACKEND_URL=backend.mytokentracker.xyz //'127.0.0.1:8787' if local se
REACT_APP_uHTTP_DP_ENDPOINT= //leave empty to use default
REACT_APP_uHTTP_TOKEN=
REACT_APP_uHTTP_FORCE_ZERO_HOP=true
REACT_APP_uHTTP_CLIENT_ASSOCIATED=false
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.2.0",
"private": true,
"dependencies": {
"@hoprnet/phttp-lib": "^3.0.1",
"@hoprnet/uhttp-lib": "3.1.4-beta1",
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/Portfolio.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useEffect, useState } from "react";
import { formatEther } from 'viem'
import Icon from "./Icon";
import { Routing } from '@hoprnet/phttp-lib';
import { Routing } from '@hoprnet/uhttp-lib';
import millify from "millify";

const notRealTokenRegEx = /visit|www|http|.com|.org|claim/gi;

let uHTTPOptions = {
forceZeroHop: process.env.REACT_APP_uHTTP_FORCE_ZERO_HOP ? JSON.parse(process.env.REACT_APP_uHTTP_FORCE_ZERO_HOP) : false,
clientAssociatedExitNodes: process.env.REACT_APP_uHTTP_CLIENT_ASSOCIATED ? JSON.parse(process.env.REACT_APP_uHTTP_CLIENT_ASSOCIATED) : false,
}

if(process.env.REACT_APP_uHTTP_DP_ENDPOINT) uHTTPOptions.discoveryPlatformEndpoint = process.env.REACT_APP_uHTTP_DP_ENDPOINT;
Expand Down
18 changes: 9 additions & 9 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1310,21 +1310,21 @@
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==

"@hoprnet/phttp-crypto@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@hoprnet/phttp-crypto/-/phttp-crypto-1.0.0.tgz#684815ab5c18b76f4458bf0ddf8bec4c15f653fe"
integrity sha512-IBeEULHWVDaQPDDU0aSZqHJ6EFPuuS2F6uj5/9wvU440JPujakDELIg8wIRVk5fjJvrjbVeVUv8c7p5dbuqhFg==
"@hoprnet/uhttp-crypto@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@hoprnet/uhttp-crypto/-/uhttp-crypto-1.0.1.tgz#0b2f92228bb9bc14c7ada2531f5f3b7ce029e7ab"
integrity sha512-yvZBBuf+gUDPyABqv127v1z3+AhLtBPwmkmndKC+Rw/SJ4UGKDw3WTyk44chUQwVZlwIitWIKA+M3xZPNsxkRQ==
dependencies:
"@noble/ciphers" "^0.4.1"
"@noble/curves" "^1.3.0"
"@noble/hashes" "^1.3.3"

"@hoprnet/phttp-lib@^3.0.1":
version "3.0.1"
resolved "https://registry.yarnpkg.com/@hoprnet/phttp-lib/-/phttp-lib-3.0.1.tgz#2204a45c08829db85b009d5fd9d504a6c59f460f"
integrity sha512-+YIYJjetF/oxj06pAuHxjPlffQcMiXoJJRn2QStiriV8IarRL/bm4OnS3GOiqacLrHIt6vVrARCgTb0cagkC4Q==
"@hoprnet/uhttp-lib@3.1.4-beta1":
version "3.1.4-beta1"
resolved "https://registry.yarnpkg.com/@hoprnet/uhttp-lib/-/uhttp-lib-3.1.4-beta1.tgz#bb2e662a1c93e50f5e25a6d180e9a31ab181e2eb"
integrity sha512-SAyJ2OrzJC7ZdPEQCFrFnOONSp/jWitL6hDkamZxOmrfqghcKVswnIk65zK2/049rxr4+/w+tIe1OEttlDJ/6g==
dependencies:
"@hoprnet/phttp-crypto" "^1.0.0"
"@hoprnet/uhttp-crypto" "^1.0.1"
debug "^4.3.4"
isomorphic-ws "^5.0.0"
lz-string "^1.5.0"
Expand Down

0 comments on commit 5ef9248

Please sign in to comment.