diff --git a/package-lock.json b/package-lock.json index ed45f8c..3473468 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bitshares_astro_ui", - "version": "0.1.0", + "version": "0.1.71", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bitshares_astro_ui", - "version": "0.1.0", + "version": "0.1.71", "license": "MIT", "dependencies": { "@astrojs/node": "^8.3.3", @@ -64,7 +64,7 @@ "deep-equal": "^2.2.3", "ecurve": "^1.0.6", "electron-devtools-installer": "^3.2.0", - "embla-carousel-react": "^8.1.8", + "embla-carousel-react": "^8.2.0", "express": "^4.19.2", "fuse.js": "^7.0.0", "input-otp": "^1.2.4", @@ -76,10 +76,10 @@ "react": "^18.3.1", "react-day-picker": "^8.10.1", "react-dom": "^18.3.1", - "react-hook-form": "^7.52.2", + "react-hook-form": "^7.53.0", "react-i18next": "^15.0.1", "react-intersection-observer": "^9.13.0", - "react-resizable-panels": "^2.1.0", + "react-resizable-panels": "^2.1.1", "react-window": "^1.8.10", "recharts": "^2.12.7", "safe-buffer": "^5.2.1", @@ -8858,31 +8858,31 @@ "integrity": "sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==" }, "node_modules/embla-carousel": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.1.8.tgz", - "integrity": "sha512-KuHPA8qcAts6YE6ELtt38XYAb26hnKw8Ga0lSXmrhm1oI97t6oACFkqSsy33dfeZQEhaZB6VwWvaWQJRJVgSgA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.2.0.tgz", + "integrity": "sha512-rf2GIX8rab9E6ZZN0Uhz05746qu2KrDje9IfFyHzjwxLwhvGjUt6y9+uaY1Sf+B0OPSa3sgas7BE2hWZCtopTA==", "license": "MIT" }, "node_modules/embla-carousel-react": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.1.8.tgz", - "integrity": "sha512-b8DcmC+j1vqVWSM6rU/GYGyY6Kp9LX8OoikZPBKmV6qL8s94sSPGl6jtDLLUtV8TTIQGMYOlOKUgoMAt/0TwOQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.2.0.tgz", + "integrity": "sha512-dWqbmaEBQjeAcy/EKrcAX37beVr0ubXuHPuLZkx27z58V1FIvRbbMb4/c3cLZx0PAv/ofngX2QFrwUB+62SPnw==", "license": "MIT", "dependencies": { - "embla-carousel": "8.1.8", - "embla-carousel-reactive-utils": "8.1.8" + "embla-carousel": "8.2.0", + "embla-carousel-reactive-utils": "8.2.0" }, "peerDependencies": { "react": "^16.8.0 || ^17.0.1 || ^18.0.0" } }, "node_modules/embla-carousel-reactive-utils": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.1.8.tgz", - "integrity": "sha512-bwV/23WD3Ecm0YuQ4I6Syzs3tdVJw0Oj3VCZlEODv1kH8LZ5kNDLgX2Uvx5brvoe2hpifBHPBQ8gYlxNL5kMPA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.2.0.tgz", + "integrity": "sha512-ZdaPNgMydkPBiDRUv+wRIz3hpZJ3LKrTyz+XWi286qlwPyZFJDjbzPBiXnC3czF9N/nsabSc7LTRvGauUzwKEg==", "license": "MIT", "peerDependencies": { - "embla-carousel": "8.1.8" + "embla-carousel": "8.2.0" } }, "node_modules/emoji-regex": { @@ -13751,9 +13751,9 @@ } }, "node_modules/react-hook-form": { - "version": "7.52.2", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.52.2.tgz", - "integrity": "sha512-pqfPEbERnxxiNMPd0bzmt1tuaPcVccywFDpyk2uV5xCIBphHV5T8SVnX9/o3kplPE1zzKt77+YIoq+EMwJp56A==", + "version": "7.53.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.0.tgz", + "integrity": "sha512-M1n3HhqCww6S2hxLxciEXy2oISPnAzxY7gvwVPrtlczTM/1dDadXgUxDpHMrMTblDOcm/AXtXxHwZ3jpg1mqKQ==", "license": "MIT", "engines": { "node": ">=18.0.0" @@ -13862,9 +13862,9 @@ } }, "node_modules/react-resizable-panels": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.0.tgz", - "integrity": "sha512-k2gGjGyCNF9xq8gVkkHBK1mlWv6xetPtvRdEtD914gTdhJcy02TLF0xMPuVLlGRuLoWGv7Gd/O1rea2KIQb3Qw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.1.tgz", + "integrity": "sha512-+cUV/yZBYfiBj+WJtpWDJ3NtR4zgDZfHt3+xtaETKE+FCvp+RK/NJxacDQKxMHgRUTSkfA6AnGljQ5QZNsCQoA==", "license": "MIT", "peerDependencies": { "react": "^16.14.0 || ^17.0.0 || ^18.0.0", @@ -22640,23 +22640,23 @@ "integrity": "sha512-kc4r3U3V3WLaaZqThjYz/Y6z8tJe+7K0bbjUVo3i+LWIypVdMx5nXCkwRe6SWbY6ILqLdc1rKcKmr3HoH7wjSQ==" }, "embla-carousel": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.1.8.tgz", - "integrity": "sha512-KuHPA8qcAts6YE6ELtt38XYAb26hnKw8Ga0lSXmrhm1oI97t6oACFkqSsy33dfeZQEhaZB6VwWvaWQJRJVgSgA==" + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/embla-carousel/-/embla-carousel-8.2.0.tgz", + "integrity": "sha512-rf2GIX8rab9E6ZZN0Uhz05746qu2KrDje9IfFyHzjwxLwhvGjUt6y9+uaY1Sf+B0OPSa3sgas7BE2hWZCtopTA==" }, "embla-carousel-react": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.1.8.tgz", - "integrity": "sha512-b8DcmC+j1vqVWSM6rU/GYGyY6Kp9LX8OoikZPBKmV6qL8s94sSPGl6jtDLLUtV8TTIQGMYOlOKUgoMAt/0TwOQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/embla-carousel-react/-/embla-carousel-react-8.2.0.tgz", + "integrity": "sha512-dWqbmaEBQjeAcy/EKrcAX37beVr0ubXuHPuLZkx27z58V1FIvRbbMb4/c3cLZx0PAv/ofngX2QFrwUB+62SPnw==", "requires": { - "embla-carousel": "8.1.8", - "embla-carousel-reactive-utils": "8.1.8" + "embla-carousel": "8.2.0", + "embla-carousel-reactive-utils": "8.2.0" } }, "embla-carousel-reactive-utils": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.1.8.tgz", - "integrity": "sha512-bwV/23WD3Ecm0YuQ4I6Syzs3tdVJw0Oj3VCZlEODv1kH8LZ5kNDLgX2Uvx5brvoe2hpifBHPBQ8gYlxNL5kMPA==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/embla-carousel-reactive-utils/-/embla-carousel-reactive-utils-8.2.0.tgz", + "integrity": "sha512-ZdaPNgMydkPBiDRUv+wRIz3hpZJ3LKrTyz+XWi286qlwPyZFJDjbzPBiXnC3czF9N/nsabSc7LTRvGauUzwKEg==", "requires": {} }, "emoji-regex": { @@ -26031,9 +26031,9 @@ } }, "react-hook-form": { - "version": "7.52.2", - "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.52.2.tgz", - "integrity": "sha512-pqfPEbERnxxiNMPd0bzmt1tuaPcVccywFDpyk2uV5xCIBphHV5T8SVnX9/o3kplPE1zzKt77+YIoq+EMwJp56A==", + "version": "7.53.0", + "resolved": "https://registry.npmjs.org/react-hook-form/-/react-hook-form-7.53.0.tgz", + "integrity": "sha512-M1n3HhqCww6S2hxLxciEXy2oISPnAzxY7gvwVPrtlczTM/1dDadXgUxDpHMrMTblDOcm/AXtXxHwZ3jpg1mqKQ==", "requires": {} }, "react-i18next": { @@ -26083,9 +26083,9 @@ } }, "react-resizable-panels": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.0.tgz", - "integrity": "sha512-k2gGjGyCNF9xq8gVkkHBK1mlWv6xetPtvRdEtD914gTdhJcy02TLF0xMPuVLlGRuLoWGv7Gd/O1rea2KIQb3Qw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/react-resizable-panels/-/react-resizable-panels-2.1.1.tgz", + "integrity": "sha512-+cUV/yZBYfiBj+WJtpWDJ3NtR4zgDZfHt3+xtaETKE+FCvp+RK/NJxacDQKxMHgRUTSkfA6AnGljQ5QZNsCQoA==", "requires": {} }, "react-smooth": { diff --git a/package.json b/package.json index 0dd92e0..539793f 100644 --- a/package.json +++ b/package.json @@ -85,10 +85,10 @@ "@radix-ui/react-toggle-group": "^1.1.0", "@radix-ui/react-tooltip": "^1.1.2", "@react-hook/throttle": "^2.2.0", - "@types/react": "^18.3.3", + "@types/react": "^18.3.4", "@types/react-dom": "^18.3.0", "assert": "^2.1.0", - "astro": "^4.14.2", + "astro": "^4.14.5", "bigi": "^1.4.2", "bignumber.js": "^9.1.2", "bitsharesjs": "https://github.com/bitshares/bitsharesjs#develop", @@ -102,7 +102,7 @@ "deep-equal": "^2.2.3", "ecurve": "^1.0.6", "electron-devtools-installer": "^3.2.0", - "embla-carousel-react": "^8.1.8", + "embla-carousel-react": "^8.2.0", "express": "^4.19.2", "fuse.js": "^7.0.0", "input-otp": "^1.2.4", @@ -114,10 +114,10 @@ "react": "^18.3.1", "react-day-picker": "^8.10.1", "react-dom": "^18.3.1", - "react-hook-form": "^7.52.2", + "react-hook-form": "^7.53.0", "react-i18next": "^15.0.1", "react-intersection-observer": "^9.13.0", - "react-resizable-panels": "^2.1.0", + "react-resizable-panels": "^2.1.1", "react-window": "^1.8.10", "recharts": "^2.12.7", "safe-buffer": "^5.2.1", @@ -136,7 +136,7 @@ "@babel/preset-env": "^7.25.3", "@soda/friendly-errors-webpack-plugin": "^1.8.1", "babel-loader": "^9.1.3", - "electron": "^31.4.0", + "electron": "^32.0.1", "electron-builder": "^24.13.3", "webpack": "^5.93.0", "webpack-cli": "^5.1.4", diff --git a/src/components/AccountSearch.jsx b/src/components/AccountSearch.jsx index 644b935..35488bc 100644 --- a/src/components/AccountSearch.jsx +++ b/src/components/AccountSearch.jsx @@ -1,4 +1,5 @@ import React, { useState, useEffect } from "react"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -16,10 +17,12 @@ import { Button } from "@/components/ui/button"; import { Avatar } from "@/components/Avatar.tsx"; import { accountSearch } from "@/nanoeffects/UserSearch.ts"; +import { $currentNode } from "@/stores/node.ts"; export default function AccountSearch(properties) { const { chain, excludedUsers, setChosenAccount } = properties; const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); + const currentNode = useStore($currentNode); const [accountInput, setAccountInput] = useState(); const [errorMessage, setErrorMessage] = useState(); @@ -39,7 +42,7 @@ export default function AccountSearch(properties) { let response; try { - response = await accountSearch(chain, accountInput); + response = await accountSearch(chain, accountInput, currentNode ? currentNode.url : null); } catch (error) { console.log({ error, msg: t("AccountSearch:noSearch.error") }); setErrorMessage(t("AccountSearch:noSearch.error")); diff --git a/src/components/AccountSelect.jsx b/src/components/AccountSelect.jsx index d0b0138..0f49a46 100644 --- a/src/components/AccountSelect.jsx +++ b/src/components/AccountSelect.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect, useSyncExternalStore } from "react"; import { useTranslation } from "react-i18next"; +import { useStore } from '@nanostores/react'; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; import { @@ -18,12 +19,14 @@ import { Button } from "@/components/ui/button"; import { Avatar } from "@/components/Avatar.tsx"; import { $currentUser, setCurrentUser, $userStorage, removeUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { accountSearch } from "@/nanoeffects/UserSearch.ts"; export default function AccountSelect(properties) { const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); + const currentNode = useStore($currentNode); const [chain, setChain] = useState(); const [mode, setMode] = useState(); @@ -43,7 +46,7 @@ export default function AccountSelect(properties) { async function lookupAccount() { let response; try { - response = await accountSearch(chain, accountInput); + response = await accountSearch(chain, accountInput, currentNode ? currentNode.url : null); } catch (error) { console.log({ error, msg: t("AccountSelect:noAccount") }); setErrorMessage(t("AccountSelect:noAccount")); diff --git a/src/components/CreditBorrow.jsx b/src/components/CreditBorrow.jsx index b1b9e76..f1069e0 100644 --- a/src/components/CreditBorrow.jsx +++ b/src/components/CreditBorrow.jsx @@ -1,8 +1,8 @@ -import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; +import React, { useState, useEffect, useSyncExternalStore, useMemo, useCallback } from "react"; import { FixedSizeList as List } from "react-window"; import Fuse from "fuse.js"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; -import { GearIcon } from "@radix-ui/react-icons"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -23,6 +23,7 @@ import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; import { useInitCache } from "@/nanoeffects/Init.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $assetCacheBTS, $assetCacheTEST, @@ -30,7 +31,7 @@ import { $offersCacheTEST, } from "@/stores/cache.ts"; -import { humanReadableFloat } from "@/lib/common.js"; +import { humanReadableFloat, debounce } from "@/lib/common.js"; function hoursTillExpiration(expirationTime) { var expirationDate = new Date(expirationTime); @@ -50,6 +51,7 @@ const isValid = (str) => /^[a-zA-Z0-9.-]+$/.test(str); export default function CreditBorrow(properties) { const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); + const currentNode = useStore($currentNode); const _assetsBTS = useSyncExternalStore($assetCacheBTS.subscribe, $assetCacheBTS.get, () => true); const _assetsTEST = useSyncExternalStore( @@ -105,7 +107,7 @@ export default function CreditBorrow(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { @@ -350,6 +352,21 @@ export default function CreditBorrow(properties) { return ; }; + const [thisSearchInput, setThisSearchInput] = useState(); + + const debouncedSetSearchInput = useCallback( + // Throttle slider + debounce((event) => { + setThisInput(event.target.value); + window.history.replaceState( + {}, + "", + `?tab=search&searchTab=${activeSearch}&searchText=${event.target.value}` + ); + }, 500), + [] + ); + return ( <>
@@ -512,10 +529,12 @@ export default function CreditBorrow(properties) { { - setThisInput(event.target.value); + setThisSearchInput(event.target.value); + debouncedSetSearchInput(event) }} /> diff --git a/src/components/CreditDeals.jsx b/src/components/CreditDeals.jsx index c17a796..663adb6 100644 --- a/src/components/CreditDeals.jsx +++ b/src/components/CreditDeals.jsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; import { FixedSizeList as List } from "react-window"; import { useForm } from "react-hook-form"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -38,6 +39,7 @@ import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $assetCacheBTS, $assetCacheTEST, @@ -46,7 +48,6 @@ import { } from "@/stores/cache.ts"; import { useInitCache } from "@/nanoeffects/Init.ts"; - import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; import { createBorrowerDealsStore } from "@/nanoeffects/BorrowerDeals.ts"; import { createLenderDealsStore } from "@/nanoeffects/LenderDeals.ts"; @@ -63,6 +64,7 @@ export default function CreditDeals(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); @@ -159,7 +161,7 @@ export default function CreditDeals(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/CreditOffer.jsx b/src/components/CreditOffer.jsx index c0942fe..fb66772 100644 --- a/src/components/CreditOffer.jsx +++ b/src/components/CreditOffer.jsx @@ -1,6 +1,7 @@ import React, { useState, useEffect, useMemo, useSyncExternalStore } from "react"; import { useForm } from "react-hook-form"; import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -35,7 +36,6 @@ import { Avatar as Av, AvatarFallback, AvatarImage } from "@/components/ui/avata import { Button } from "@/components/ui/button"; import { Input } from "@/components/ui/input"; -import { Skeleton } from "@/components/ui/skeleton"; import { blockchainFloat, humanReadableFloat } from "@/lib/common.js"; @@ -54,6 +54,7 @@ import { import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; import { createObjectStore } from "@/nanoeffects/Objects.ts"; import { useInitCache } from "@/nanoeffects/Init.ts"; +import { $currentNode } from "@/stores/node.ts"; import DeepLinkDialog from "./common/DeepLinkDialog.jsx"; import ExternalLink from "./common/ExternalLink.jsx"; @@ -83,6 +84,7 @@ export default function CreditBorrow(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); @@ -242,7 +244,7 @@ export default function CreditBorrow(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/CreditOfferEditor.jsx b/src/components/CreditOfferEditor.jsx index be83812..65d44b3 100644 --- a/src/components/CreditOfferEditor.jsx +++ b/src/components/CreditOfferEditor.jsx @@ -5,6 +5,7 @@ import { format } from "date-fns"; import { useSyncExternalStore } from "react"; import { useTranslation } from "react-i18next"; import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; import { cn } from "@/lib/utils"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -13,8 +14,11 @@ import { evaluateTradingPair } from "@/lib/market.js"; import { createUsernameStore } from "@/nanoeffects/Objects.ts"; import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; - import { createObjectStore } from "@/nanoeffects/Objects.ts"; +import { useInitCache } from "@/nanoeffects/Init.ts"; + +import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { Card, @@ -52,9 +56,6 @@ import { SelectValue, } from "@/components/ui/select"; -import { useInitCache } from "@/nanoeffects/Init.ts"; -import { $currentUser } from "@/stores/users.ts"; - import { Avatar } from "./Avatar.tsx"; import DeepLinkDialog from "./common/DeepLinkDialog.jsx"; import ExternalLink from "./common/ExternalLink.jsx"; @@ -108,6 +109,7 @@ export default function CreditOfferEditor(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const [showDialog, setShowDialog] = useState(false); const [selectedAsset, setSelectedAsset] = useState(); @@ -214,7 +216,7 @@ export default function CreditOfferEditor(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/Featured.jsx b/src/components/Featured.jsx index 8526e05..c100318 100644 --- a/src/components/Featured.jsx +++ b/src/components/Featured.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; import { useTranslation } from "react-i18next"; +import { useStore } from '@nanostores/react'; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; import { diff --git a/src/components/Home.jsx b/src/components/Home.jsx index e7cf211..4783b55 100644 --- a/src/components/Home.jsx +++ b/src/components/Home.jsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useMemo } from "react"; +import { useStore } from '@nanostores/react'; import { useSyncExternalStore } from "react"; import { useTranslation } from "react-i18next"; @@ -71,6 +72,26 @@ export default function Home(properties) { + + + + + + {t("Home:swap.title")} + {t("Home:swap.subtitle")} + + + + + +
    +
  • {t("Home:swap.hover1")}
  • +
  • {t("Home:swap.hover2")}
  • +
  • {t("Home:swap.hover3")}
  • +
+
+
+ @@ -264,6 +285,25 @@ export default function Home(properties) { + + + + + + + {t("Home:nodes.title")} + {t("Home:nodes.subtitle")} + + + + + +
    +
  • {t("Home:nodes.hover1")}
  • +
  • {t("Home:nodes.hover2")}
  • +
+
+
diff --git a/src/components/LTM.jsx b/src/components/LTM.jsx index a523997..337e910 100644 --- a/src/components/LTM.jsx +++ b/src/components/LTM.jsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useSyncExternalStore } from "react"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; diff --git a/src/components/Market.jsx b/src/components/Market.jsx index f303a55..a52016f 100644 --- a/src/components/Market.jsx +++ b/src/components/Market.jsx @@ -1,6 +1,6 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; -import { useStore } from "@nanostores/react"; import { ReloadIcon } from "@radix-ui/react-icons"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; diff --git a/src/components/MarketOrder.jsx b/src/components/MarketOrder.jsx index 65d13a5..d645ecc 100644 --- a/src/components/MarketOrder.jsx +++ b/src/components/MarketOrder.jsx @@ -2,9 +2,10 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo, useCallback import { useForm } from "react-hook-form"; import { CalendarIcon, LockOpen2Icon, LockClosedIcon } from "@radix-ui/react-icons"; import { format } from "date-fns"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; -import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; +import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; import { cn } from "@/lib/utils"; import { @@ -59,6 +60,7 @@ import { Badge } from "@/components/ui/badge"; import { useInitCache } from "@/nanoeffects/Init.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $assetCacheBTS, @@ -93,6 +95,7 @@ export default function MarketOrder(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const [quoteAsset, setQuoteAsset] = useState(); const [baseAsset, setBaseAsset] = useState(); @@ -274,7 +277,7 @@ export default function MarketOrder(properties) { let unsubscribeUserBalances; if (usr && usr.id && currentLimitOrder && baseAsset && quoteAsset) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/MarketOverlay.jsx b/src/components/MarketOverlay.jsx index ba84b0e..5c286a5 100644 --- a/src/components/MarketOverlay.jsx +++ b/src/components/MarketOverlay.jsx @@ -1,4 +1,5 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; +import { useStore } from '@nanostores/react'; import Market from "./Market"; import MarketPlaceholder from "./MarketPlaceholder"; diff --git a/src/components/Nodes.jsx b/src/components/Nodes.jsx new file mode 100644 index 0000000..2352c85 --- /dev/null +++ b/src/components/Nodes.jsx @@ -0,0 +1,137 @@ +import React, { useState, useEffect, useSyncExternalStore } from "react"; +import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; + +import { useTranslation } from "react-i18next"; +import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; +import { useInitCache } from "@/nanoeffects/Init.ts"; + +import { + $currentNode, + $nodes, + setCurrentNode, + updateNodes +} from "@/stores/node"; +import { $currentUser } from "@/stores/users.ts"; +import { chains } from "@/config/chains"; + +import { Button } from "@/components/ui/button"; +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; +import { Input } from "@/components/ui/input"; + +export default function Nodes(properties) { + const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); + const currentNode = useStore($currentNode); + const nodes = useStore($nodes); + const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); + useInitCache(usr && usr.chain ? usr.chain : "bitshares", []); + + const [inputURL, setInputURL] = useState(""); + + const NodeRow = ({ index, style }) => { + return ( +
+ + + +
+
+ {index + 1}: {nodes[usr.chain][index].url} +
+
+ + +
+
+
+
+
+
+ ); + }; + + return ( + <> +
+
+ + + {t("Nodes:cardTitle")} + {t("Nodes:cardDescription")} + + + {usr && usr.chain && nodes[usr.chain] && nodes[usr.chain].length ? ( + + {NodeRow} + + ) :

{t("Nodes:none")}

} +
+
+

{t("Nodes:addDescription")}

+ { + setInputURL(event.target.value); + }} + onKeyPress={(event) => { + if ( + event.key !== 'Enter' || + !inputURL || + nodes[usr.chain].findIndex((node) => node.url === inputURL) !== -1 || + !/^wss?:\/\/[a-zA-Z0-9.-]+\/ws$/.test(inputURL) + ) { + return; + } + + updateNodes(usr.chain, [...nodes[usr.chain], {url: inputURL}]) + }} + /> + + +
+
+
+
+
+ + ); +} diff --git a/src/components/PoolForm.jsx b/src/components/PoolForm.jsx index ac41e59..62e73e2 100644 --- a/src/components/PoolForm.jsx +++ b/src/components/PoolForm.jsx @@ -2,6 +2,7 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react import Fuse from "fuse.js"; import { useForm } from "react-hook-form"; import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -65,6 +66,7 @@ import { $globalParamsCacheTEST, } from "@/stores/cache.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { useInitCache } from "@/nanoeffects/Init.ts"; import { createPoolAssetStore } from "@/nanoeffects/Assets.ts"; @@ -83,6 +85,7 @@ export default function PoolForm() { account: "", }, }); + const currentNode = useStore($currentNode); const [pool, setPool] = useState(""); @@ -323,7 +326,7 @@ export default function PoolForm() { let unsubscribeUserBalances; if (usr && usr.id && assetA && assetB) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/PoolStake.jsx b/src/components/PoolStake.jsx index 2344018..162817d 100644 --- a/src/components/PoolStake.jsx +++ b/src/components/PoolStake.jsx @@ -2,6 +2,7 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react import Fuse from "fuse.js"; import { useForm } from "react-hook-form"; import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -65,6 +66,7 @@ import { $globalParamsCacheBTS, $globalParamsCacheTEST, } from "@/stores/cache.ts"; +import { $currentNode } from "@/stores/node.ts"; import { createPoolAssetStore } from "@/nanoeffects/Assets.ts"; import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; @@ -85,6 +87,7 @@ export default function PoolStake() { account: "", }, }); + const currentNode = useStore($currentNode); const [pool, setPool] = useState(""); // dropdown selected pool @@ -331,7 +334,7 @@ export default function PoolStake() { let unsubscribeUserBalances; if (usr && usr.id && assetA && assetB) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/PortfolioTabs.jsx b/src/components/PortfolioTabs.jsx index 36b4451..94d67c4 100644 --- a/src/components/PortfolioTabs.jsx +++ b/src/components/PortfolioTabs.jsx @@ -1,5 +1,6 @@ import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -33,6 +34,7 @@ import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; import { createAccountLimitOrderStore } from "@/nanoeffects/AccountLimitOrders.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $assetCacheBTS, @@ -50,6 +52,7 @@ import { opTypes } from "@/lib/opTypes"; export default function PortfolioTabs(properties) { const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); + const currentNode = useStore($currentNode); const _assetsBTS = useSyncExternalStore($assetCacheBTS.subscribe, $assetCacheBTS.get, () => true); const _assetsTEST = useSyncExternalStore( @@ -88,7 +91,7 @@ export default function PortfolioTabs(properties) { useEffect(() => { let unsubscribeUserBalancesStore; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalancesStore = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/Settlement.jsx b/src/components/Settlement.jsx index 35215ef..7864ce1 100644 --- a/src/components/Settlement.jsx +++ b/src/components/Settlement.jsx @@ -2,6 +2,7 @@ import React, { useState, useEffect, useMemo } from "react"; import { useSyncExternalStore } from "react"; import { useForm } from "react-hook-form"; import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; import { useTranslation } from "react-i18next"; import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; @@ -36,6 +37,7 @@ import { createCollateralBidStore } from "@/nanoeffects/CollateralBids.ts"; import { createObjectStore } from "@/nanoeffects/Objects.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $marketSearchCacheBTS, $marketSearchCacheTEST, @@ -54,6 +56,7 @@ export default function Settlement(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); @@ -134,7 +137,7 @@ export default function Settlement(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { diff --git a/src/components/SimpleSwap.jsx b/src/components/SimpleSwap.jsx new file mode 100644 index 0000000..03854c9 --- /dev/null +++ b/src/components/SimpleSwap.jsx @@ -0,0 +1,1131 @@ +import React, { useState, useEffect, useSyncExternalStore, useMemo } from "react"; +import { useForm } from "react-hook-form"; +import { FixedSizeList as List } from "react-window"; +import { useStore } from '@nanostores/react'; +import { QuestionMarkCircledIcon, CircleIcon, CheckCircledIcon } from '@radix-ui/react-icons' +import { useTranslation } from "react-i18next"; + +import { i18n as i18nInstance, locale } from "@/lib/i18n.js"; +import { blockchainFloat, humanReadableFloat } from "@/lib/common"; + +import { + Card, + CardContent, + CardDescription, + CardFooter, + CardHeader, + CardTitle, +} from "@/components/ui/card"; + +import { + Table, + TableBody, + TableCaption, + TableCell, + TableFooter, + TableHead, + TableHeader, + TableRow, +} from "@/components/ui/table" + +import { + Command, + CommandDialog, + CommandEmpty, + CommandGroup, + CommandInput, + CommandItem, + CommandList, + CommandSeparator, + CommandShortcut, +} from "@/components/ui/command"; + +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuLabel, + DropdownMenuSeparator, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu"; + +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip" + +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; + +import { + Form, + FormControl, + FormDescription, + FormField, + FormItem, + FormLabel, + FormMessage, +} from "@/components/ui/form"; + +import { Label } from "@/components/ui/label"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Skeleton } from "@/components/ui/skeleton"; +import { Toggle } from "@/components/ui/toggle"; + +import { + $assetCacheBTS, + $assetCacheTEST, + $poolCacheBTS, + $poolCacheTEST, + $marketSearchCacheBTS, + $marketSearchCacheTEST, + $globalParamsCacheBTS, + $globalParamsCacheTEST, +} from "@/stores/cache.ts"; +import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; + +import { useInitCache } from "@/nanoeffects/Init.ts"; +import { createPoolAssetStore } from "@/nanoeffects/Assets.ts"; +import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; + +import MarketAssetCard from "./Market/MarketAssetCard.jsx"; +import DeepLinkDialog from "./common/DeepLinkDialog.jsx"; + +export default function SimpleSwap() { + const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); + const form = useForm({ + defaultValues: { + account: "", + }, + }); + const currentNode = useStore($currentNode); + + const [pool, setPool] = useState(""); + + const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); + + const _assetsBTS = useSyncExternalStore($assetCacheBTS.subscribe, $assetCacheBTS.get, () => true); + const _assetsTEST = useSyncExternalStore( + $assetCacheTEST.subscribe, + $assetCacheTEST.get, + () => true + ); + + const _poolsBTS = useSyncExternalStore($poolCacheBTS.subscribe, $poolCacheBTS.get, () => true); + const _poolsTEST = useSyncExternalStore($poolCacheTEST.subscribe, $poolCacheTEST.get, () => true); + + const _marketSearchBTS = useSyncExternalStore( + $marketSearchCacheBTS.subscribe, + $marketSearchCacheBTS.get, + () => true + ); + + const _marketSearchTEST = useSyncExternalStore( + $marketSearchCacheTEST.subscribe, + $marketSearchCacheTEST.get, + () => true + ); + + const _globalParamsBTS = useSyncExternalStore( + $globalParamsCacheBTS.subscribe, + $globalParamsCacheBTS.get, + () => true + ); + + const _globalParamsTEST = useSyncExternalStore( + $globalParamsCacheTEST.subscribe, + $globalParamsCacheTEST.get, + () => true + ); + + const _chain = useMemo(() => { + if (usr && usr.chain) { + return usr.chain; + } + return "bitshares"; + }, [usr]); + + useInitCache(_chain ?? "bitshares", ["marketSearch", "assets", "pools", "globalParams"]); + + const assets = useMemo(() => { + if (_chain && (_assetsBTS || _assetsTEST)) { + return _chain === "bitshares" ? _assetsBTS : _assetsTEST; + } + return []; + }, [_assetsBTS, _assetsTEST, _chain]); + + const pools = useMemo(() => { + if (_chain && (_poolsBTS || _poolsTEST)) { + return _chain === "bitshares" ? _poolsBTS : _poolsTEST; + } + return []; + }, [_poolsBTS, _poolsTEST, _chain]); + + const marketSearch = useMemo(() => { + if (_chain && (_marketSearchBTS || _marketSearchTEST)) { + return _chain === "bitshares" ? _marketSearchBTS : _marketSearchTEST; + } + return []; + }, [_marketSearchBTS, _marketSearchTEST, _chain]); + + const globalParams = useMemo(() => { + if (_chain && (_globalParamsBTS || _globalParamsTEST)) { + return _chain === "bitshares" ? _globalParamsBTS : _globalParamsTEST; + } + return []; + }, [_globalParamsBTS, _globalParamsTEST, _chain]); + + const [fee, setFee] = useState(); + useEffect(() => { + if (globalParams && globalParams.length) { + const foundFee = globalParams.find((x) => x[0] === 63); + const finalFee = humanReadableFloat(foundFee[1].fee, 5); + setFee(finalFee); + } + }, [globalParams]); + + const [selectedAssetA, setSelectedAssetA] = useState(); + const [selectedAssetB, setSelectedAssetB] = useState(); + + const poolAssets = useMemo(() => { + if (pools && pools.length) { + const allSymbols = pools.flatMap(pool => [pool.asset_a_symbol, pool.asset_b_symbol]); + return [...new Set(allSymbols)]; + } + return []; + }, [pools]); + + const possiblePools = useMemo(() => { + if (selectedAssetA && pools && pools.length) { + return pools.filter((x) => x.asset_a_symbol === selectedAssetA || x.asset_b_symbol === selectedAssetA); + } + }, [selectedAssetA, pools]); + + const possiblePoolAssets = useMemo(() => { + if (possiblePools && possiblePools.length) { + return [ + ...new Set( + possiblePools.map((x) => (x.asset_a_symbol === selectedAssetA ? x.asset_b_symbol : x.asset_a_symbol)) + ) + ]; + } + }, [possiblePools, selectedAssetA]); + + const [finalPools, setFinalPools] = useState([]); + useEffect(() => { + if (selectedAssetA && selectedAssetB) { + const relevantPools = pools.filter( + (x) => x.asset_a_symbol === selectedAssetA && x.asset_b_symbol === selectedAssetB || + x.asset_a_symbol === selectedAssetB && x.asset_b_symbol === selectedAssetA + ); + + if (relevantPools && relevantPools.length) { + setPool(relevantPools[0].id); + setFinalPools(relevantPools); + } + } else { + setPool(""); + setFinalPools([]); + } + }, [selectedAssetA, selectedAssetB]); + + useEffect(() => { + async function parseUrlParams() { + if (window.location.search) { + const urlSearchParams = new URLSearchParams(window.location.search); + const params = Object.fromEntries(urlSearchParams.entries()); + const poolParameter = params && params.pool ? params.pool : null; + + function defaultPool() { + setPool(pools[0].id); + setSelectedAssetA(pools[0].asset_a_symbol); + setSelectedAssetB(pools[0].asset_b_symbol); + } + + if (!poolParameter || !poolParameter.length) { + console.log("Invalid pool parameters 1"); + defaultPool(); + return; + } + + if (poolParameter && poolParameter.length && !poolParameter.includes("1.19.")) { + console.log("Invalid pool parameters 2"); + defaultPool(); + return; + } + + const poolIds = pools && pools.length ? pools.map((x) => x.id) : []; + if (!poolIds.includes(poolParameter)) { + console.log("Replacing unknown pool with first pool in list"); + defaultPool(); + return; + } + + setPool(poolParameter); + setSelectedAssetA(pools.find((x) => x.id === poolParameter).asset_a_symbol); + setSelectedAssetB(pools.find((x) => x.id === poolParameter).asset_b_symbol); + } + } + + if (pools && pools.length) { + parseUrlParams(); + } + }, [pools]); + + const [sellAmount, setSellAmount] = useState(1); + + const [foundPool, setFoundPool] = useState(); + const [assetA, setAssetA] = useState(""); + const [assetB, setAssetB] = useState(""); + + const [foundPoolDetails, setFoundPoolDetails] = useState(); + + const [assetADetails, setAssetADetails] = useState(null); + const [assetBDetails, setAssetBDetails] = useState(null); + const [poolShareDetails, setPoolShareDetails] = useState(null); + + const [aBitassetData, setABitassetData] = useState(null); + const [bBitassetData, setBBitassetData] = useState(null); + + useEffect(() => { + // Setting various react states as the user interacts with the form + if (usr && usr.chain && pools && assets && pool) { + const poolStore = createPoolAssetStore([ + usr.chain, + JSON.stringify(pools), + JSON.stringify(assets), + pool, + ]); + + try { + poolStore.subscribe(({ data, error, loading }) => { + if (error) { + console.log({error, location: "poolStore.subscribe"}); + } + if (data && !error && !loading) { + setFoundPool(data.foundPool); + setPoolShareDetails(data.poolAsset); + + setAssetA(data.assetA); + setAssetB(data.assetB); + + setFoundPoolDetails(data.foundPoolDetails); + setAssetADetails(data.assetADetails); + setAssetBDetails(data.assetBDetails); + if (data.bitassetA) { + setABitassetData(data.bitassetA); + } + if (data.bitassetB) { + setBBitassetData(data.bitassetB); + } + } + }); + } catch (error) { + console.log({error}); + } + + + } + }, [usr, pool, pools, assets]); + + const [usrBalances, setUsrBalances] = useState(); + useEffect(() => { + let unsubscribeUserBalances; + + if (usr && usr.id && assetA && assetB) { + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); + + unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { + if (data && !error && !loading) { + setUsrBalances(data); + } + }); + } + + return () => { + if (unsubscribeUserBalances) unsubscribeUserBalances(); + }; + }, [usr, assetA, assetB]); + + const [inverted, setInverted] = useState(false); + const buyAmount = useMemo(() => { + // Calculating the amount the user can buy + if (assetA && assetB && foundPool) { + let poolamounta = Number(foundPool.balance_a); + let poolamountap = Number(10 ** assetA.precision); + + let poolamountb = Number(foundPool.balance_b); + let poolamountbp = Number(10 ** assetB.precision); + + const maker_market_fee_percenta = assetA && assetA.options && assetA.options.market_fee_percent + ? assetA.options.market_fee_percent + : 0; + + const maker_market_fee_percentb = assetB && assetB.options && assetB.options.market_fee_percent + ? assetB.options.market_fee_percent + : 0; + + const max_market_feea = assetA && assetA.options && assetA.options.max_market_fee + ? assetA.options.max_market_fee + : 0; + + const max_market_feeb = assetB && assetB.options && assetB.options.max_market_fee + ? assetB.options.max_market_fee + : 0; + + const taker_fee_percenta = foundPool.taker_fee_percent; + + function flagsa() { + if (maker_market_fee_percenta === 0) { + return 0; + } + if (maker_market_fee_percenta > 0) { + return Math.min( + Number(max_market_feea), + Math.ceil( + Number(sellAmount) * + Number(poolamountap) * + (Number(maker_market_fee_percenta) / 10000) + ) + ); + } + } + + function flagsb() { + if (maker_market_fee_percentb === 0) { + return 0; + } + if (maker_market_fee_percentb > 0) { + return Math.min( + Number(max_market_feeb), + Math.ceil( + Number(sellAmount) * + Number(poolamountbp) * + (Number(maker_market_fee_percentb) / 10000) + ) + ); + } + } + + function taker_market_fee_percenta() { + if (typeof taker_fee_percenta == "undefined" && maker_market_fee_percenta > 0) { + return Number(maker_market_fee_percenta) / 10000; + } + if (typeof taker_fee_percenta == "undefined" && maker_market_fee_percenta === 0) { + return 0; + } else { + return Number(taker_fee_percenta) / 10000; + } + } + let taker_market_fee_percent_a = Number(taker_market_fee_percenta()); + + let result; + if (assetA && foundPool && !inverted) { + let tmp_delta_b = + Number(poolamountb) - + Math.ceil( + (Number(poolamountb) * Number(poolamounta)) / + (Number(poolamounta) + (Number(sellAmount) * Number(poolamountap) - Number(flagsa()))) + ); + let tmp_b = (Number(tmp_delta_b) * Number(taker_fee_percenta)) / 10000; + result = + (Number(tmp_delta_b) - + Math.floor(Number(tmp_b)) - + Math.ceil( + Math.min( + Number(max_market_feeb), + Math.ceil(Number(tmp_delta_b) * Number(taker_market_fee_percent_a)) + ) + )) / + Number(poolamountbp); + } else { + let tmp_delta_a = + Number(poolamounta) - + Math.ceil( + (Number(poolamounta) * Number(poolamountb)) / + (Number(poolamountb) + (Number(sellAmount) * Number(poolamountbp) - Number(flagsb()))) + ); + let tmp_a = (Number(tmp_delta_a) * Number(taker_fee_percenta)) / 10000; + result = + (Number(tmp_delta_a) - + Math.floor(Number(tmp_a)) - + Math.ceil( + Math.min( + Number(max_market_feea), + Math.ceil(Number(tmp_delta_a) * Number(taker_market_fee_percent_a)) + ) + )) / + Number(poolamountap); + } + + /* + console.log({ + calculated: { + poolamounta, + poolamountap, + poolamountb, + poolamountbp, + maker_market_fee_percenta, + maker_market_fee_percentb, + max_market_feea, + max_market_feeb, + taker_fee_percenta, + taker_market_fee_percent_a + }, + inputs: { + foundPool, + assetA, + assetB, + }, + result + }) + */ + + return result; + } + }, [sellAmount, assetA, assetB, inverted, foundPool]); + + const [buyAmountInput, setBuyAmountInput] = useState(); + useEffect(() => { + setBuyAmountInput(); + }, [buyAmount]); + + const [showDialog, setShowDialog] = useState(false); + const [poolKey, setPoolKey] = useState("default_pool_key"); + useEffect(() => { + if (pool && pool.length) { + window.history.replaceState({}, "", `?pool=${pool}`); // updating the url parameters + } + }, [pool]); + + const RowA = ({ index, style }) => { + const selectedAsset = poolAssets[index]; + return ( + + {selectedAsset} + + ); + }; + + const RowB = ({ index, style }) => { + const selectedAsset = possiblePoolAssets[index]; + return ( + + {selectedAsset} + + ); + }; + + const [isRotating, setIsRotating] = useState(false); + const rotateStyle = isRotating + ? { + transition: "transform 0.5s", + transform: "rotate(360deg)", + } + : {}; + + return ( + <> +
+
+ + + {t("SimpleSwap:title")} + {t("SimpleSwap:description")} + + + {!pools ?

{t("SimpleSwap:loadingPoolData")}

: null} + {!assets ?

{t("SimpleSwap:loadingAssetData")}

: null} + {pools && assets ? ( + <> +
+ { + setShowDialog(true); + event.preventDefault(); + }} + > + +
+
+ + +
+
{t("SimpleSwap:amountToSwap")}
+
+ + + + + + +

+ { + !inverted + ? t("SimpleSwap:enterAmountToSwap", { + symbolA: assetA ? assetA.symbol : "???", + symbolB: assetB ? assetB.symbol : "???", + }) + : t("SimpleSwap:enterAmountToSwap", { + symbolA: assetB ? assetB.symbol : "???", + symbolB: assetA ? assetA.symbol : "???", + }) + } +

+
+
+
+
+
+
+ { + const input = event.target.value; + const regex = /^[0-9]*\.?[0-9]*$/; + if (regex.test(input)) { + setSellAmount(input); + } + }} + > + + + +
+
+
+ ( + + + + + + + + + + + {t("PageHeader:noResultsFound")} + + { + poolAssets + ? poolAssets.map((asset) => ( + + { + setSelectedAssetA(asset) + setSelectedAssetB(); + }}> + {asset} + + + )) + : null + } + + + + + + + + )} + /> +
+
+ +
+ { + setInverted(!inverted); + setIsRotating(true); + setTimeout(() => setIsRotating(false), 500); + }} + > + + + + +
+ +
+
+ ( + + +
+
+ {t("SimpleSwap:totalAmount")} +
+
+ + + + + + +

+ { + !inverted + ? t("SimpleSwap:totalAmountDescription", { + symbolA: assetA ? assetA.symbol : "???", + symbolB: assetB ? assetB.symbol : "???", + }) + : t("SimpleSwap:totalAmountDescription", { + symbolA: assetB ? assetB.symbol : "???", + symbolB: assetA ? assetA.symbol : "???", + }) + } +

+
+
+
+
+
+
+ + {buyAmountInput} + +
+ )} + /> +
+
+ ( + + + + + + + + + + + {t("PageHeader:noResultsFound")} + + { + possiblePoolAssets + ? possiblePoolAssets.map((asset) => ( + + setSelectedAssetB(asset)}> + {asset} + + + )) + : null + } + + + + + + + + )} + /> +
+
+ + { + foundPool + ? + + { + finalPools && finalPools.length > 1 + ? t("SimpleSwap:noPoolDetails") + : null + } + + + + + ID + + + + + +
Pool fee
+
+ +

{t("SimpleSwap:poolFeeDescription")}

+
+
+
+
+ {selectedAssetA} + {selectedAssetB} +
+
+ + {finalPools && finalPools.length ? finalPools.map((_pool) => ( + + + { + _pool.id === pool + ? + : { + setPool(_pool.id); + }} + /> + } + + {_pool.id} + + { + `${( + (_pool.taker_fee_percent / 10000) * + sellAmount + ).toFixed(!inverted ? assetA.precision : assetB.precision)} (${!inverted ? assetA.symbol : assetB.symbol}) (${ + _pool.taker_fee_percent / 100 + }% ${t("SimpleSwap:fee")})` + } + + + {humanReadableFloat(_pool.balance_a, assetA.precision)} + + + {humanReadableFloat(_pool.balance_b, assetB.precision)} + + + )) : null} + +
+ : null + } + + {!pool || !sellAmount || !buyAmount || showDialog !== false ? ( + + ) : ( + + )} +
+ + {showDialog ? ( + + ) : null} + + ) : null} +
+
+
+ + { + pool + ?
+ {usrBalances && foundPoolDetails ? ( + <> + + + + ) : ( + <> + + + {t("SimpleSwap:quoteAsset")} + {t("SimpleSwap:loading")} + + +
+ + + + +
+
+
+ + + {t("SimpleSwap:baseAsset")} + {t("SimpleSwap:loading")} + + +
+ + + + +
+
+
+ + )} + {foundPool && marketSearch && usrBalances ? ( + + ) : ( + + + {t("SimpleSwap:poolShareAsset")} + {t("SimpleSwap:loading")} + + +
+ + + + +
+
+
+ )} + + + + {t("SimpleSwap:borrowAssets")} + + {t("SimpleSwap:borrowAssetsDescription")} + + + + +
+ + {!inverted ? assetA.symbol : assetB.symbol} + + + {!inverted ? assetB.symbol : assetA.symbol} + + + {foundPool?.share_asset_symbol} + +
+ +
+ + {!inverted ? assetA.symbol : assetB.symbol} + + + {!inverted ? assetB.symbol : assetA.symbol} + + + {foundPool?.share_asset_symbol} + +
+
+
+ : null + } + +
+ {pool && assetA && assetB ? ( + <> + + + + {t("SimpleSwap:purchaseStake")} + + {t("SimpleSwap:shareAsset", { shareAsset: foundPool?.share_asset_symbol })} + + + + {t("SimpleSwap:purchaseStakeDescription")} + + + + + + + {t("SimpleSwap:stakeAssets")} + + {t("SimpleSwap:shareAsset", { shareAsset: foundPool?.share_asset_symbol })} + + + + {t("SimpleSwap:stakeAssetsDescription")} + + + + + + + {t("SimpleSwap:tradeOnDex")} + + { + !inverted + ? t("SimpleSwap:market", { symbolA: assetA.symbol, symbolB: assetB.symbol }) + : t("SimpleSwap:market", { symbolA: assetB.symbol, symbolB: assetA.symbol }) + } + + + + {t("SimpleSwap:tradeOnDexDescription")} + + + + + ) : null} +
+
+ +
+ + + {t("SimpleSwap:risksTitle")} + {t("SimpleSwap:risksDescription")} + + + + +
    +
  • {t("SimpleSwap:liquidityPoolRisk1")}
  • +
  • {t("SimpleSwap:liquidityPoolRisk2")}
  • +
+
+ + +
    +
  • {t("SimpleSwap:swappableAssetRisk1")}
  • +
  • + { + !inverted + ? t("SimpleSwap:swappableAssetRisk2", { + symbol: assetA.symbol !== "BTS" ? "BTS" : assetA.symbol, + }) + : t("SimpleSwap:swappableAssetRisk2", { + symbol: assetB.symbol !== "BTS" ? "BTS" : assetB.symbol, + }) + } +
  • +
  • {t("SimpleSwap:swappableAssetRisk3")}
  • +
+
+
+
+
+ + ); +} diff --git a/src/components/Smartcoin.jsx b/src/components/Smartcoin.jsx index 8435a1e..91fe6cb 100644 --- a/src/components/Smartcoin.jsx +++ b/src/components/Smartcoin.jsx @@ -53,6 +53,7 @@ import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; import { createFullSmartcoinStore } from "@/nanoeffects/FullSmartcoin.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $marketSearchCacheBTS, $marketSearchCacheTEST, @@ -95,6 +96,7 @@ export default function Smartcoin(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const tips = { charge_market_fee: t("Smartcoin:chargeMarketFee"), @@ -182,7 +184,7 @@ export default function Smartcoin(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { @@ -896,13 +898,15 @@ export default function Smartcoin(properties) { - + { + t("Smartcoin:currentMarginPosition", { + asset: parsedAsset.s, + id: parsedAsset.id, + }) + } - + {t("Smartcoin:marginPositionDescription")} diff --git a/src/components/Smartcoins.jsx b/src/components/Smartcoins.jsx index efbdacf..406c5a5 100644 --- a/src/components/Smartcoins.jsx +++ b/src/components/Smartcoins.jsx @@ -25,6 +25,7 @@ import { useInitCache } from "@/nanoeffects/Init.ts"; import { createUserBalancesStore } from "@/nanoeffects/UserBalances.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $marketSearchCacheBTS, $marketSearchCacheTEST, @@ -42,6 +43,7 @@ const activeTabStyle = { export default function Smartcoins(properties) { const { t, i18n } = useTranslation(locale.get(), { i18n: i18nInstance }); const usr = useSyncExternalStore($currentUser.subscribe, $currentUser.get, () => true); + const currentNode = useStore($currentNode); const bitAssetDataBTS = useSyncExternalStore( $bitAssetDataCacheBTS.subscribe, @@ -95,7 +97,7 @@ export default function Smartcoins(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { @@ -173,6 +175,7 @@ export default function Smartcoins(properties) { }, [bitAssetData, marketSearch, activeSearch]); const [thisInput, setThisInput] = useState(); + const [thisSearchInput, setThisSearchInput] = useState(); const [thisResult, setThisResult] = useState(); useEffect(() => { @@ -535,9 +538,13 @@ export default function Smartcoins(properties) { debouncedSetSearchInput(event)} + value={thisSearchInput || ""} + onChange={(event) => { + setThisSearchInput(event.target.value); + debouncedSetSearchInput(event) + }} /> diff --git a/src/components/Transfer.jsx b/src/components/Transfer.jsx index b138934..e292323 100644 --- a/src/components/Transfer.jsx +++ b/src/components/Transfer.jsx @@ -38,12 +38,11 @@ import { Input } from "@/components/ui/input"; import { useInitCache } from "@/nanoeffects/Init.ts"; import { $currentUser } from "@/stores/users.ts"; +import { $currentNode } from "@/stores/node.ts"; import { $assetCacheBTS, $assetCacheTEST, - $poolCacheBTS, - $poolCacheTEST, $marketSearchCacheBTS, $marketSearchCacheTEST, $globalParamsCacheBTS, @@ -69,6 +68,7 @@ export default function Transfer(properties) { account: "", }, }); + const currentNode = useStore($currentNode); const [showDialog, setShowDialog] = useState(false); @@ -156,7 +156,7 @@ export default function Transfer(properties) { let unsubscribeUserBalances; if (usr && usr.id) { - const userBalancesStore = createUserBalancesStore([usr.chain, usr.id]); + const userBalancesStore = createUserBalancesStore([usr.chain, usr.id, currentNode ? currentNode.url : null]); unsubscribeUserBalances = userBalancesStore.subscribe(({ data, error, loading }) => { if (data && !error && !loading) { @@ -243,7 +243,6 @@ export default function Transfer(properties) { {t("Transfer:transferAssets")}

{t("Transfer:sendFundsDescription")}

-

{t("Transfer:transferLimitations")}

diff --git a/src/data/locales/da/Home.json b/src/data/locales/da/Home.json index f71e315..45da9af 100644 --- a/src/data/locales/da/Home.json +++ b/src/data/locales/da/Home.json @@ -6,6 +6,19 @@ "hover2": "Lån aktiver til dine definerede satser.", "hover3": "Angiv acceptable lånesikkerheder og priser." }, + "nodes": { + "title": "🌐 Noder", + "subtitle": "Konfigurer blockchain-forbindelse", + "hover1": "Opret forbindelse til en Bitshares-node efter eget valg.", + "hover2": "Tilføj/fjern noder til din forbindelsesliste." + }, + "swap": { + "title": "🔄 Enkelt bytte", + "subtitle": "Byt aktiver via en pulje", + "hover1": "Byt aktiver via brugerskabte likviditetspuljer.", + "hover2": "Puljer har forskellige handelspar og gebyrer.", + "hover3": "Enklere men dyrere end en limiteret ordre." + }, "pool": { "title": "💱 Poolbytte", "subtitle": "Byt aktiver via en pulje", diff --git a/src/data/locales/da/Nodes.json b/src/data/locales/da/Nodes.json new file mode 100644 index 0000000..c659845 --- /dev/null +++ b/src/data/locales/da/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Konfigurer din blockchain-forbindelse", + "cardDescription": "Opret forbindelse til en Bitshares-node efter eget valg.", + "add": "Tilføj URL", + "reset": "Nulstil nodekonfiguration", + "none": "Ingen noder konfigureret. Angiv venligst en node-URL for at fortsætte.", + "addDescription": "Tilføj en ny node-URL til denne blockchains nodeliste?" + } \ No newline at end of file diff --git a/src/data/locales/da/PageHeader.json b/src/data/locales/da/PageHeader.json index 9f2ccc8..a9eab20 100644 --- a/src/data/locales/da/PageHeader.json +++ b/src/data/locales/da/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Se dine aktuelle tilbud nedenfor!", "dex": "Brug formularen nedenfor til at oprette en grænseordre på Bitshares DEX.", "featured": "Tjek nogle af disse fremhævede markeder", - "index": "Dette open source-værktøj kan lave flere Bitshares-operationer.", + "index": "Et værktøj til at lave Bitshares-operationer!", "ltm": "Brug formularen nedenfor til at opgradere din konto til et livstidsmedlemskab!", "offer": "Nedenstående formular er til at acceptere et kredittilbud på Bitshares DEX.", "offereditor": "Brug formularen nedenfor til at oprette/redigere kredittilbud på Bitshares DEX.", @@ -44,7 +44,8 @@ "smartcoin": "Brug formularen nedenfor til at udstede sikkerhedsstillet gæld", "smartcoins": "Brug grænsefladen nedenfor til at finde et aktiv, som du kan låne", "stake": "Brug denne formular til at satse dine aktiver i likviditetspuljer", - "transfer": "Brug formularen nedenfor til at overføre aktiver til andre blockchain-brugere" + "transfer": "Brug formularen nedenfor til at overføre aktiver til andre blockchain-brugere", + "nodes": "Opret forbindelse til blockchain via en node efter eget valg" }, "back": "Gå tilbage", "usage": "Designet til brug med ", diff --git a/src/data/locales/da/SimpleSwap.json b/src/data/locales/da/SimpleSwap.json new file mode 100644 index 0000000..5077ee6 --- /dev/null +++ b/src/data/locales/da/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Bitshares Liquidity Pool Exchange", + "description": "Skift nemt mellem Bitshares-aktiver ved hjælp af en af ​​disse brugerskabte likviditetspuljer.", + "loadingPoolData": "Indlæser pooldata...", + "loadingAssetData": "Indlæser aktivdata...", + "accountLabel": "Konto", + "liquidityPoolLabel": "Likviditetspulje", + "foundPoolDetails": "Dette er den likviditetspulje, du har valgt til din aktivswap", + "noPoolDetails": "Vælg en likviditetspulje for at fortsætte med din aktivswap", + "selectPoolPlaceholder": "Vælg en pool..", + "searchButton": "Søg", + "searchDialogTitle": "Søg efter en likviditetspulje", + "searchDialogDescription": "Vælg et søgeresultat for at fortsætte med dit ønskede aktivudskiftning.", + "swappableAssetsTab": "Ombyttelige aktiver", + "poolShareAssetTab": "Pool aktie aktiv", + "idColumnTitle": "ID", + "shareAssetColumnTitle": "Del aktiv", + "assetAColumnTitle": "Aktiv A", + "assetBColumnTitle": "Aktiv B", + "takerFeeColumnTitle": "Taker Gebyr", + "swappable": "Indbyrdes udskiftelige", + "amountToSwap": "Mængde af {{symbol}} at bytte", + "enterAmountToSwap": "Indtast mængden af {{symbolA}} du vil bytte til {{symbolB}}", + "totalAmount": "Total beløb", + "totalAmountDescription": "Dette er mængden af {{symbolB}} du får til gengæld for {{symbolA}}", + "poolFee": "Pool gebyr", + "poolFeeDescription": "Dette er det anslåede gebyr, du vil betale til puljen for denne swap", + "fee": "betaling", + "networkFee": "Netværksgebyr", + "networkFeeDescription": "Dette er prisen for at udsende din pooludvekslingsoperation til blockchain", + "feeCurrency": "BTS", + "rebate": "Rabat: {{rebate}} {{currency}} (optjening)", + "submit": "Indsend", + "exchangeHeader": "Udveksling {{sellAmount}} {{symbolA}} til {{buyAmount}} {{symbolB}}", + "swapBuySell": "Byt køb/sælg", + "blocksightsPoolExplorer": "Blocksights pool explorer", + "poolJsonButton": "Pool JSON", + "liquidityPoolJsonTitle": "Likviditetspool JSON", + "liquidityPoolJsonDescription": "Tjek oplysningerne, der returneres af netværket for denne pulje", + "swappableAssetJsonButton": "JSON-aktiv, der kan byttes", + "swappableAssetJsonTitle": "JSON-aktiv, der kan byttes", + "swappableAssetJsonDescription": "Tjek de detaljer, der returneres af netværket, denne puljes ombytelige aktiver", + "quoteAsset": "Citat aktiv", + "baseAsset": "Basisaktiv", + "loading": "Indlæser...", + "tradeOnDex": "Handle på Dex i stedet for?", + "market": "Marked: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Du kan manuelt oprette grænseordrer for handelspar efter eget valg på Bitshares DEX", + "purchaseStake": "Købe andel i denne pulje?", + "shareAsset": "Aktieaktiv: {{shareAsset}}", + "purchaseStakeDescription": "Modtag swapgebyrudbytte over tid ved at eje en andel i puljen via en markedslimitordre.", + "stakeAssets": "Satse aktiver i denne pulje?", + "stakeAssetsDescription": "Tjen swapgebyrer på aktiver sat i likviditetspuljer minus et lille puljedefineret udbetalingsgebyr.", + "borrowAssets": "Har du brug for at låne nogle aktiver?", + "borrowAssetsDescription": "DEX-brugere udlåner aktiver til brugerdefinerede priser. ", + "searchBorrowableAssets": "Søg efter lånbare aktiver", + "searchAcceptedCollateral": "Søg efter accepteret sikkerhed", + "poolShareAsset": "Pool aktie aktiv", + "risksTitle": "Risici forbundet med likviditetspuljeudvekslinger", + "risksDescription": "Foretag venligst din egen forskning i likviditetspuljer og deres ombyttelige aktiver, før du fortsætter.", + "liquidityPoolRisks": "Risici i likviditetspulje", + "liquidityPoolRisk1": "Da likviditetspuljer er brugerkonfigurerede, har de meget unikke egenskaber og forskellige ejere; ", + "liquidityPoolRisk2": "Da alle kan satse penge på begge sider af puljen, er poollikviditeten dynamisk. ", + "swappableAssetRisks": "Risikoer for ombyttelige aktiver", + "swappableAssetRisk1": "Da likviditetspuljen kan aktiver være brugereje", + "swappableAssetRisk2": "Hvis du forsøger at bytte aktiver ud over de tilgængelige aktiver, der kan byttes, vil din swappris lide meget. ", + "swappableAssetRisk3": "Værdien af ​​selve de ombyttelige aktiver kan svinge baseret på eksterne faktorer (ekstern cex-volumen) såvel som interne faktorer (aktivudsteder", + "exchange": "Udveksle", + "sendAsset": "Vælg et aktiv.." +} diff --git a/src/data/locales/de/Home.json b/src/data/locales/de/Home.json index a9c100b..5fdd3b9 100644 --- a/src/data/locales/de/Home.json +++ b/src/data/locales/de/Home.json @@ -6,6 +6,19 @@ "hover2": "Verleihen Sie Vermögenswerte zu Ihren festgelegten Zinssätzen.", "hover3": "Geben Sie akzeptable Kreditsicherheiten und Preise an." }, + "nodes": { + "title": "🌐 Knoten", + "subtitle": "Konfigurieren Sie die Blockchain-Verbindung", + "hover1": "Stellen Sie eine Verbindung zu einem Bitshares-Knoten Ihrer Wahl her.", + "hover2": "Fügen Sie Ihrer Verbindungsliste Knoten hinzu bzw. entfernen Sie sie." + }, + "swap": { + "title": "🔄 Einfacher Tausch", + "subtitle": "Tauschen Sie Vermögenswerte über einen Pool aus", + "hover1": "Tauschen Sie Vermögenswerte über vom Benutzer erstellte Liquiditätspools aus.", + "hover2": "Pools haben unterschiedliche Handelspaare und Gebühren.", + "hover3": "Einfacher, aber teurer als eine Limit-Order." + }, "pool": { "title": "💱 Pooltausch", "subtitle": "Tauschen Sie Vermögenswerte über einen Pool aus", diff --git a/src/data/locales/de/Nodes.json b/src/data/locales/de/Nodes.json new file mode 100644 index 0000000..10af9c0 --- /dev/null +++ b/src/data/locales/de/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Konfigurieren Sie Ihre Blockchain-Verbindung", + "cardDescription": "Stellen Sie eine Verbindung zu einem Bitshares-Knoten Ihrer Wahl her.", + "add": "URL hinzufügen", + "reset": "Knotenkonfiguration zurücksetzen", + "none": "Keine Knoten konfiguriert. Bitte geben Sie eine Knoten-URL an, um fortzufahren.", + "addDescription": "Eine neue Knoten-URL zur Knotenliste dieser Blockchain hinzufügen?" + } \ No newline at end of file diff --git a/src/data/locales/de/PageHeader.json b/src/data/locales/de/PageHeader.json index 022a212..6521c03 100644 --- a/src/data/locales/de/PageHeader.json +++ b/src/data/locales/de/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Schauen Sie sich unten Ihre aktuellen Angebote an!", "dex": "Verwenden Sie das untenstehende Formular, um eine Limit-Order für den Bitshares DEX zu erstellen.", "featured": "Schauen Sie sich einige dieser vorgestellten Märkte an", - "index": "Dieses Open-Source-Tool kann mehrere Bitshares-Operationen erstellen.", + "index": "Ein Tool zum Erstellen von Bitshares-Operationen!", "ltm": "Verwenden Sie das untenstehende Formular, um Ihr Konto auf eine lebenslange Mitgliedschaft zu aktualisieren!", "offer": "Das folgende Formular dient der Annahme eines Kreditangebots für den Bitshares DEX.", "offereditor": "Verwenden Sie das untenstehende Formular, um Kreditangebote für den Bitshares DEX zu erstellen/bearbeiten.", @@ -44,7 +44,8 @@ "smartcoin": "Verwenden Sie das untenstehende Formular, um besicherte Schulden ins Leben zu rufen", "smartcoins": "Verwenden Sie die folgende Schnittstelle, um einen Vermögenswert zu finden, den Sie leihen können", "stake": "Verwenden Sie dieses Formular, um Ihr Vermögen in Liquiditätspools zu verpfänden", - "transfer": "Verwenden Sie das untenstehende Formular, um Vermögenswerte an andere Blockchain-Benutzer zu übertragen" + "transfer": "Verwenden Sie das untenstehende Formular, um Vermögenswerte an andere Blockchain-Benutzer zu übertragen", + "nodes": "Verbinden Sie sich über einen Knoten Ihrer Wahl mit der Blockchain" }, "back": "Geh zurück", "usage": "Konzipiert für den Einsatz mit ", diff --git a/src/data/locales/de/SimpleSwap.json b/src/data/locales/de/SimpleSwap.json new file mode 100644 index 0000000..0d29772 --- /dev/null +++ b/src/data/locales/de/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Bitshares Liquidity Pool Exchange", + "description": "Tauschen Sie mithilfe eines dieser vom Benutzer erstellten Liquiditätspools ganz einfach zwischen Bitshares-Vermögenswerten aus.", + "loadingPoolData": "Pooldaten werden geladen...", + "loadingAssetData": "Asset-Daten werden geladen...", + "accountLabel": "Konto", + "liquidityPoolLabel": "Liquiditätspool", + "foundPoolDetails": "Dies ist der Liquiditätspool, den Sie für Ihren Asset-Swap ausgewählt haben", + "noPoolDetails": "Wählen Sie einen Liquiditätspool aus, um mit dem Tausch von Vermögenswerten fortzufahren", + "selectPoolPlaceholder": "Wählen Sie einen Pool aus.", + "searchButton": "Suchen", + "searchDialogTitle": "Suchen Sie nach einem Liquiditätspool", + "searchDialogDescription": "Wählen Sie ein Suchergebnis aus, um mit dem gewünschten Asset-Tausch fortzufahren.", + "swappableAssetsTab": "Austauschbare Vermögenswerte", + "poolShareAssetTab": "Pool-Share-Asset", + "idColumnTitle": "AUSWEIS", + "shareAssetColumnTitle": "Vermögenswert teilen", + "assetAColumnTitle": "Vermögenswert A", + "assetBColumnTitle": "Vermögenswert B", + "takerFeeColumnTitle": "Abnehmergebühr", + "swappable": "Austauschbar", + "amountToSwap": "Menge von {{symbol}} vertauschen", + "enterAmountToSwap": "Geben Sie die Menge ein {{symbolA}} gegen die du tauschen möchtest {{symbolB}}", + "totalAmount": "Gesamtmenge", + "totalAmountDescription": "Das ist die Menge {{symbolB}} Sie erhalten dafür eine Gegenleistung {{symbolA}}", + "poolFee": "Poolgebühr", + "poolFeeDescription": "Dies ist die geschätzte Gebühr, die Sie für diesen Tausch an den Pool zahlen", + "fee": "Gebühr", + "networkFee": "Netzwerkgebühr", + "networkFeeDescription": "Dies sind die Kosten für die Übertragung Ihres Pool-Austauschvorgangs auf die Blockchain", + "feeCurrency": "BTS", + "rebate": "Abzug: {{rebate}} {{currency}} (Übertragung)", + "submit": "Einreichen", + "exchangeHeader": "Austauschen {{sellAmount}} {{symbolA}} für {{buyAmount}} {{symbolB}}", + "swapBuySell": "Tauschen Sie Kauf/Verkauf", + "blocksightsPoolExplorer": "Blocksights-Pool-Explorer", + "poolJsonButton": "Pool-JSON", + "liquidityPoolJsonTitle": "Liquiditätspool JSON", + "liquidityPoolJsonDescription": "Sehen Sie sich die vom Netzwerk für diesen Pool zurückgegebenen Details an", + "swappableAssetJsonButton": "Austauschbares Asset-JSON", + "swappableAssetJsonTitle": "Austauschbares Asset-JSON", + "swappableAssetJsonDescription": "Sehen Sie sich die vom Netzwerk zurückgegebenen Details zu den austauschbaren Assets dieses Pools an", + "quoteAsset": "Angebotsvermögenswert", + "baseAsset": "Basisvermögenswert", + "loading": "Wird geladen...", + "tradeOnDex": "Stattdessen auf dem Dex handeln?", + "market": "Markt: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Sie können auf dem Bitshares DEX manuell Limit-Orders für Handelspaare Ihrer Wahl erstellen", + "purchaseStake": "Anteile an diesem Pool erwerben?", + "shareAsset": "Vermögenswert teilen: {{shareAsset}}", + "purchaseStakeDescription": "Erhalten Sie im Laufe der Zeit eine Rendite aus Swap-Gebühren, indem Sie über eine Market-Limit-Order einen Anteil am Pool besitzen.", + "stakeAssets": "Vermögenswerte in diesen Pool investieren?", + "stakeAssetsDescription": "Verdienen Sie Swap-Gebühren für Vermögenswerte, die in Liquiditätspools eingesetzt werden, abzüglich einer kleinen, im Pool definierten Abhebungsgebühr.", + "borrowAssets": "Müssen Sie sich Vermögenswerte leihen?", + "borrowAssetsDescription": "DEX-Benutzer verleihen Vermögenswerte zu benutzerdefinierten Zinssätzen. ", + "searchBorrowableAssets": "Suche nach leihbaren Vermögenswerten", + "searchAcceptedCollateral": "Suche nach akzeptierten Sicherheiten", + "poolShareAsset": "Pool-Share-Asset", + "risksTitle": "Mit dem Austausch von Liquiditätspools verbundene Risiken", + "risksDescription": "Bitte recherchieren Sie selbst über Liquiditätspools und deren austauschbare Vermögenswerte, bevor Sie fortfahren.", + "liquidityPoolRisks": "Risiken des Liquiditätspools", + "liquidityPoolRisk1": "Da Liquiditätspools vom Benutzer konfiguriert werden, verfügen sie über äußerst einzigartige Eigenschaften und unterschiedliche Eigentümer. ", + "liquidityPoolRisk2": "Da jeder Gelder auf beiden Seiten des Pools einsetzen kann, ist die Poolliquidität dynamisch. ", + "swappableAssetRisks": "Risiken austauschbarer Vermögenswerte", + "swappableAssetRisk1": "Da die Vermögenswerte des Liquiditätspools im Besitz des Benutzers sein können", + "swappableAssetRisk2": "Wenn Sie versuchen, Vermögenswerte zu tauschen, die über die verfügbaren tauschbaren Vermögenswerte hinausgehen, wird Ihr Swap-Preis stark darunter leiden. ", + "swappableAssetRisk3": "Der Wert der tauschbaren Vermögenswerte selbst kann aufgrund externer Faktoren (externes CEX-Volumen) sowie interner Faktoren (Emittent des Vermögenswertes) schwanken", + "exchange": "Austausch", + "sendAsset": "Wählen Sie ein Asset aus." +} diff --git a/src/data/locales/en/Home.json b/src/data/locales/en/Home.json index a9e49b2..d8e2dab 100644 --- a/src/data/locales/en/Home.json +++ b/src/data/locales/en/Home.json @@ -6,6 +6,19 @@ "hover2": "Lend assets at your defined rates.", "hover3": "Specify acceptable loan collateral and prices." }, + "nodes": { + "title": "🌐 Nodes", + "subtitle": "Blockchain node configuration", + "hover1": "Connect to a Bitshares node of your choice.", + "hover2": "Add/remove nodes to your connection list." + }, + "swap": { + "title": "🔄 Simple swap", + "subtitle": "Swap assets via a pool", + "hover1": "Swap assets via user created liquidity pools.", + "hover2": "Pools have different trading pairs and fees.", + "hover3": "Simpler but more costly than a limit order." + }, "pool": { "title": "💱 Pool exchange", "subtitle": "Swap assets via a pool", diff --git a/src/data/locales/en/Nodes.json b/src/data/locales/en/Nodes.json new file mode 100644 index 0000000..3dc8ea1 --- /dev/null +++ b/src/data/locales/en/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Configure your blockchain connection", + "cardDescription": "Connect to a Bitshares node of your choice.", + "add": "Add URL", + "reset": "Reset node config", + "none": "No nodes configured, please provide a node URL to proceed.", + "addDescription": "Add a new node URL to this blockchain's node list?" +} \ No newline at end of file diff --git a/src/data/locales/en/PageHeader.json b/src/data/locales/en/PageHeader.json index bd20dc3..fa91e77 100644 --- a/src/data/locales/en/PageHeader.json +++ b/src/data/locales/en/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Check out your current deals below!", "dex": "Use the form below to create a limit order on the Bitshares DEX.", "featured": "Check out some of these featured markets", - "index": "This open-source tool can craft multiple Bitshares operations.", + "index": "A tool for crafting Bitshares operations!", "ltm": "Use the form below to upgrade your account to a lifetime membership!", "offer": "The form below is for accepting a credit offer on the Bitshares DEX.", "offereditor": "Use the form below to create/edit credit offers on the Bitshares DEX.", @@ -44,7 +44,8 @@ "smartcoin": "Use the form below to issue collateralized debt into existence", "smartcoins": "Use the interface below to locate an asset to borrow into existence", "stake": "Use this form to stake your assets in liquidity pools", - "transfer": "Use the form below to transfer assets to other blockchain users" + "transfer": "Use the form below to transfer assets to other blockchain users", + "nodes": "Connect to the blockchain via a node of your choice" }, "back": "Go back", "usage": "Designed for use with ", diff --git a/src/data/locales/en/SimpleSwap.json b/src/data/locales/en/SimpleSwap.json new file mode 100644 index 0000000..ea8792b --- /dev/null +++ b/src/data/locales/en/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Bitshares Simple Asset Swap", + "description": "Quickly locate a liquidity pool for swapping assets.", + "loadingPoolData": "Loading pool data...", + "loadingAssetData": "Loading asset data...", + "accountLabel": "Account", + "liquidityPoolLabel": "Liquidity pool", + "foundPoolDetails": "This is the liquidity pool you have chosen for your asset swap", + "noPoolDetails": "Select a liquidity pool to continue with your asset swap", + "selectPoolPlaceholder": "Select a pool..", + "searchButton": "Search", + "searchDialogTitle": "Search for a liquidity pool", + "searchDialogDescription": "Select a search result to proceed with your desired asset swap.", + "swappableAssetsTab": "Swappable assets", + "poolShareAssetTab": "Pool share asset", + "idColumnTitle": "ID", + "shareAssetColumnTitle": "Share asset", + "assetAColumnTitle": "Asset A", + "assetBColumnTitle": "Asset B", + "takerFeeColumnTitle": "Taker Fee", + "swappable": "Swappable", + "amountToSwap": "You send", + "enterAmountToSwap": "Enter the amount of {{symbolA}} you want to swap for {{symbolB}}", + "totalAmount": "You'll get", + "totalAmountDescription": "This is the amount of {{symbolB}} you'll receive in return for {{symbolA}}", + "poolFee": "Pool fee", + "poolFeeDescription": "This is the estimated fee you'll pay to the pool for this swap", + "fee": "fee", + "networkFee": "Network fee", + "networkFeeDescription": "This is the cost to broadcast your pool exchange operation onto the blockchain", + "feeCurrency": "BTS", + "rebate": "Rebate: {{rebate}} {{currency}} (vesting)", + "submit": "Submit", + "exchangeHeader": "Exchanging {{sellAmount}} {{symbolA}} for {{buyAmount}} {{symbolB}}", + "swapBuySell": "Swap buy/sell", + "blocksightsPoolExplorer": "Blocksights pool explorer", + "poolJsonButton": "Pool JSON", + "liquidityPoolJsonTitle": "Liquidity Pool JSON", + "liquidityPoolJsonDescription": "Check out the details returned by the network for this pool", + "swappableAssetJsonButton": "Swappable asset JSON", + "swappableAssetJsonTitle": "Swappable asset JSON", + "swappableAssetJsonDescription": "Check out the details returned by the network this pool's swappable assets", + "quoteAsset": "Quote asset", + "baseAsset": "Base asset", + "loading": "Loading...", + "tradeOnDex": "Trade on the Dex instead?", + "market": "Market: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "You can manually create limit orders for trading pairs of your choice on the Bitshares DEX", + "purchaseStake": "Purchase stake in this pool?", + "shareAsset": "Share asset: {{shareAsset}}", + "purchaseStakeDescription": "Receive swap fee yield over time by owning a stake in the pool via a market limit order.", + "stakeAssets": "Stake assets in this pool?", + "stakeAssetsDescription": "Earn swap fees on assets staked in liquidity pools minus a small pool defined withdrawal fee.", + "borrowAssets": "Need to borrow some assets?", + "borrowAssetsDescription": "DEX users lend assets at user defined rates. You could borrow from DEX participants, at their defined rates.", + "searchBorrowableAssets": "Search by borrowable assets", + "searchAcceptedCollateral": "Search by accepted collateral", + "poolShareAsset": "Pool share asset", + "risksTitle": "Risks associated with liquidity pool exchanges", + "risksDescription": "Please do your own research into liquidity pools and their swappable assets before proceeding.", + "liquidityPoolRisks": "Liquidity pool risks", + "liquidityPoolRisk1": "As liquidity pools are user configured they have highly unique properties and different owners; as such, they have unique risk profiles. Check that the pool fee and pool exchange rate are reasonable before proceeding with asset swap.", + "liquidityPoolRisk2": "As anyone can stake funds into both sides of the pool, pool liquidity is dynamic. If you make a swap, the opportunity to perform a reverse swap may not be available at a later time at the same price.", + "swappableAssetRisks": "Swappable asset risks", + "swappableAssetRisk1": "As the liquidity pool assets can be user owned & configured, they have their own unique risk profiles; Check each asset's flags, permissions, market fee and issuers to gauge risk.", + "swappableAssetRisk2": "If you try to swap assets in excess of available swappable assets your swap price will greatly suffer. You should instead swap small amounts and await pool balance replenishment. If you want to swap a larger amount you should consider creating a limit order on the DEX instead.", + "swappableAssetRisk3": "The value of the swappable assets themselves can fluctuate based on external factors (external cex volume) as well as internal factors (asset issuer & price feed publisher actions). Make sure you trust a pool's swappable assets before performing a swap.", + "exchange": "Exchange", + "sendAsset": "Select an asset.." +} diff --git a/src/data/locales/es/Home.json b/src/data/locales/es/Home.json index 22eede3..c258dc1 100644 --- a/src/data/locales/es/Home.json +++ b/src/data/locales/es/Home.json @@ -6,6 +6,19 @@ "hover2": "Preste activos a sus tasas definidas.", "hover3": "Especifique garantías y precios de préstamo aceptables." }, + "nodes": { + "title": "🌐 Nodos", + "subtitle": "Configurar la conexión blockchain", + "hover1": "Conéctese a un nodo Bitshares de su elección.", + "hover2": "Agregue o elimine nodos a su lista de conexiones." + }, + "swap": { + "title": "🔄 Intercambio sencillo", + "subtitle": "Intercambiar activos a través de un pool", + "hover1": "Intercambie activos a través de fondos de liquidez creados por el usuario.", + "hover2": "Los pools tienen diferentes pares comerciales y tarifas.", + "hover3": "Más simple pero más costoso que una orden limitada." + }, "pool": { "title": "💱 Intercambio de piscina", "subtitle": "Intercambiar activos a través de un pool", diff --git a/src/data/locales/es/Nodes.json b/src/data/locales/es/Nodes.json new file mode 100644 index 0000000..d1f1e0e --- /dev/null +++ b/src/data/locales/es/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Configura tu conexión blockchain", + "cardDescription": "Conéctese a un nodo Bitshares de su elección.", + "add": "Agregar URL", + "reset": "Restablecer la configuración del nodo", + "none": "No hay nodos configurados. Proporcione una URL de nodo para continuar.", + "addDescription": "¿Agregar una nueva URL de nodo a la lista de nodos de esta cadena de bloques?" + } \ No newline at end of file diff --git a/src/data/locales/es/PageHeader.json b/src/data/locales/es/PageHeader.json index 926b554..7957705 100644 --- a/src/data/locales/es/PageHeader.json +++ b/src/data/locales/es/PageHeader.json @@ -33,7 +33,7 @@ "deals": "¡Consulta tus ofertas actuales a continuación!", "dex": "Utilice el siguiente formulario para crear una orden limitada en Bitshares DEX.", "featured": "Echa un vistazo a algunos de estos mercados destacados", - "index": "Esta herramienta de código abierto puede crear múltiples operaciones de Bitshares.", + "index": "¡Una herramienta para elaborar operaciones Bitshares!", "ltm": "Utilice el siguiente formulario para actualizar su cuenta a una membresía de por vida.", "offer": "El siguiente formulario es para aceptar una oferta de crédito en Bitshares DEX.", "offereditor": "Utilice el siguiente formulario para crear/editar ofertas de crédito en Bitshares DEX.", @@ -44,7 +44,8 @@ "smartcoin": "Utilice el siguiente formulario para emitir deuda garantizada y crearla.", "smartcoins": "Utilice la siguiente interfaz para localizar un activo para pedir prestado y crearlo.", "stake": "Utilice este formulario para apostar sus activos en fondos de liquidez", - "transfer": "Utilice el siguiente formulario para transferir activos a otros usuarios de blockchain" + "transfer": "Utilice el siguiente formulario para transferir activos a otros usuarios de blockchain", + "nodes": "Conéctese a la cadena de bloques a través de un nodo de su elección" }, "back": "Regresa", "usage": "Diseñado para usar con ", diff --git a/src/data/locales/es/SimpleSwap.json b/src/data/locales/es/SimpleSwap.json new file mode 100644 index 0000000..5d7cd68 --- /dev/null +++ b/src/data/locales/es/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Intercambio de fondo de liquidez de Bitshares", + "description": "Intercambie fácilmente entre activos de Bitshares utilizando uno de estos fondos de liquidez creados por el usuario.", + "loadingPoolData": "Cargando datos del grupo...", + "loadingAssetData": "Cargando datos de activos...", + "accountLabel": "Cuenta", + "liquidityPoolLabel": "Fondo de liquidez", + "foundPoolDetails": "Este es el pool de liquidez que has elegido para tu swap de activos", + "noPoolDetails": "Seleccione un fondo de liquidez para continuar con su intercambio de activos", + "selectPoolPlaceholder": "Seleccione una piscina..", + "searchButton": "Buscar", + "searchDialogTitle": "Busque un fondo de liquidez", + "searchDialogDescription": "Seleccione un resultado de búsqueda para continuar con el intercambio de activos que desee.", + "swappableAssetsTab": "Activos intercambiables", + "poolShareAssetTab": "Activo compartido del grupo", + "idColumnTitle": "IDENTIFICACIÓN", + "shareAssetColumnTitle": "Compartir activo", + "assetAColumnTitle": "Activo A", + "assetBColumnTitle": "Activo B", + "takerFeeColumnTitle": "Tarifa de tomador", + "swappable": "Intercambiable", + "amountToSwap": "Cantidad de {{symbol}} para intercambiar", + "enterAmountToSwap": "Introduzca la cantidad de {{symbolA}} quieres cambiar por {{symbolB}}", + "totalAmount": "Cantidad total", + "totalAmountDescription": "Esta es la cantidad de {{symbolB}} recibirás a cambio de {{symbolA}}", + "poolFee": "Tarifa de piscina", + "poolFeeDescription": "Esta es la tarifa estimada que pagará al grupo por este intercambio.", + "fee": "tarifa", + "networkFee": "Tarifa de red", + "networkFeeDescription": "Este es el costo de transmitir su operación de intercambio de pool en blockchain", + "feeCurrency": "BTS", + "rebate": "Reembolso: {{rebate}} {{currency}} (adquisición)", + "submit": "Entregar", + "exchangeHeader": "Intercambio {{sellAmount}} {{symbolA}} para {{buyAmount}} {{symbolB}}", + "swapBuySell": "Permuta compra/venta", + "blocksightsPoolExplorer": "Explorador de piscinas de Blocksights", + "poolJsonButton": "JSON del grupo", + "liquidityPoolJsonTitle": "Fondo de liquidez JSON", + "liquidityPoolJsonDescription": "Consulte los detalles devueltos por la red para este grupo", + "swappableAssetJsonButton": "JSON de activo intercambiable", + "swappableAssetJsonTitle": "JSON de activo intercambiable", + "swappableAssetJsonDescription": "Consulte los detalles devueltos por la red sobre los activos intercambiables de este grupo.", + "quoteAsset": "Activo de cotización", + "baseAsset": "Activo base", + "loading": "Cargando...", + "tradeOnDex": "¿Ofrecer en el Dex en su lugar?", + "market": "Mercado: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Puede crear manualmente órdenes límite para los pares comerciales de su elección en Bitshares DEX", + "purchaseStake": "¿Comprar participación en este grupo?", + "shareAsset": "Activo compartido: {{shareAsset}}", + "purchaseStakeDescription": "Reciba el rendimiento de la tarifa de swap a lo largo del tiempo al poseer una participación en el grupo a través de una orden de límite de mercado.", + "stakeAssets": "¿Estacar activos en este grupo?", + "stakeAssetsDescription": "Obtenga tarifas de swap sobre activos apostados en fondos de liquidez menos una tarifa de retiro definida por un fondo pequeño.", + "borrowAssets": "¿Necesita pedir prestado algunos activos?", + "borrowAssetsDescription": "Los usuarios de DEX prestan activos a tarifas definidas por el usuario. ", + "searchBorrowableAssets": "Búsqueda por activos prestables", + "searchAcceptedCollateral": "Buscar por garantía aceptada", + "poolShareAsset": "Activo compartido del grupo", + "risksTitle": "Riesgos asociados con los intercambios de fondos de liquidez", + "risksDescription": "Haga su propia investigación sobre los fondos de liquidez y sus activos intercambiables antes de continuar.", + "liquidityPoolRisks": "Riesgos del fondo de liquidez", + "liquidityPoolRisk1": "Como los fondos de liquidez los configura el usuario, tienen propiedades muy únicas y propietarios diferentes; ", + "liquidityPoolRisk2": "Como cualquiera puede depositar fondos en ambos lados del fondo común, la liquidez del fondo común es dinámica. ", + "swappableAssetRisks": "Riesgos de activos intercambiables", + "swappableAssetRisk1": "Dado que los activos del fondo de liquidez pueden ser propiedad del usuario", + "swappableAssetRisk2": "Si intenta intercambiar activos que excedan los activos intercambiables disponibles, el precio del intercambio se verá muy afectado. ", + "swappableAssetRisk3": "El valor de los activos intercambiables en sí puede fluctuar en función de factores externos (volumen cex externo), así como de factores internos (emisor de activos).", + "exchange": "Intercambio", + "sendAsset": "Seleccione un activo.." +} diff --git a/src/data/locales/et/Home.json b/src/data/locales/et/Home.json index cb8f30b..195e005 100644 --- a/src/data/locales/et/Home.json +++ b/src/data/locales/et/Home.json @@ -6,6 +6,19 @@ "hover2": "Laenake varasid teie määratud intressimääradega.", "hover3": "Täpsustage aktsepteeritav laenutagatis ja hinnad." }, + "nodes": { + "title": "🌐 Sõlmed", + "subtitle": "Konfigureerige plokiahela ühendus", + "hover1": "Ühendage oma valitud Bitsharesi sõlmega.", + "hover2": "Lisage/eemaldage sõlmed oma ühenduste loendisse." + }, + "swap": { + "title": "🔄 Lihtne vahetus", + "subtitle": "Vahetage varasid basseini kaudu", + "hover1": "Vahetage varad kasutaja loodud likviidsuskogumite kaudu.", + "hover2": "Pooltel on erinevad kauplemispaarid ja tasud.", + "hover3": "Lihtsam, kuid kulukam kui piirtellimus." + }, "pool": { "title": "💱 Basseini vahetus", "subtitle": "Vahetage varasid basseini kaudu", diff --git a/src/data/locales/et/Nodes.json b/src/data/locales/et/Nodes.json new file mode 100644 index 0000000..f241a4b --- /dev/null +++ b/src/data/locales/et/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Seadistage oma plokiahela ühendus", + "cardDescription": "Ühendage oma valitud Bitsharesi sõlmega.", + "add": "Lisa URL", + "reset": "Lähtestage sõlme konfiguratsioon", + "none": "Ühtegi sõlme pole konfigureeritud, jätkamiseks sisestage sõlme URL.", + "addDescription": "Kas lisada selle plokiahela sõlmede loendisse uus sõlme URL?" + } \ No newline at end of file diff --git a/src/data/locales/et/PageHeader.json b/src/data/locales/et/PageHeader.json index 8c502e4..b748e52 100644 --- a/src/data/locales/et/PageHeader.json +++ b/src/data/locales/et/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Vaadake allpool oma praeguseid pakkumisi!", "dex": "Kasutage allolevat vormi, et luua Bitshares DEXis piirtellimus.", "featured": "Vaadake mõnda neist esiletoodud turgudest", - "index": "See avatud lähtekoodiga tööriist võib koostada mitu Bitsharesi toimingut.", + "index": "Tööriist Bitsharesi toimingute tegemiseks!", "ltm": "Kasutage allolevat vormi, et täiendada oma kontot eluaegseks liikmeks!", "offer": "Allolev vorm on mõeldud Bitshares DEXi krediidipakkumise vastuvõtmiseks.", "offereditor": "Kasutage allolevat vormi Bitshares DEXi krediidipakkumiste loomiseks/muutmiseks.", @@ -44,7 +44,8 @@ "smartcoin": "Kasutage tagatisega võla väljastamiseks allolevat vormi", "smartcoins": "Kasutage laenatava vara leidmiseks allolevat liidest", "stake": "Kasutage seda vormi oma varade paigutamiseks likviidsusfondidesse", - "transfer": "Kasutage allolevat vormi varade ülekandmiseks teistele plokiahela kasutajatele" + "transfer": "Kasutage allolevat vormi varade ülekandmiseks teistele plokiahela kasutajatele", + "nodes": "Ühendage plokiahelaga teie valitud sõlme kaudu" }, "back": "Mine tagasi", "usage": "Mõeldud kasutamiseks koos ", diff --git a/src/data/locales/et/SimpleSwap.json b/src/data/locales/et/SimpleSwap.json new file mode 100644 index 0000000..ed9ca51 --- /dev/null +++ b/src/data/locales/et/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Bitsharesi likviidsusfondi börs", + "description": "Vahetage hõlpsalt Bitsharesi varade vahel, kasutades ühte neist kasutaja loodud likviidsuskogumitest.", + "loadingPoolData": "Kogumi andmete laadimine...", + "loadingAssetData": "Varade andmete laadimine...", + "accountLabel": "Konto", + "liquidityPoolLabel": "Likviidsusbassein", + "foundPoolDetails": "See on likviidsuskogum, mille olete oma varade vahetamiseks valinud", + "noPoolDetails": "Varade vahetuse jätkamiseks valige likviidsuskogum", + "selectPoolPlaceholder": "Valige bassein..", + "searchButton": "Otsing", + "searchDialogTitle": "Otsige likviidsusfondi", + "searchDialogDescription": "Soovitud varade vahetamise jätkamiseks valige otsingutulemus.", + "swappableAssetsTab": "Vahetatavad varad", + "poolShareAssetTab": "Pooli aktsia vara", + "idColumnTitle": "ID", + "shareAssetColumnTitle": "Jaga vara", + "assetAColumnTitle": "Vara A", + "assetBColumnTitle": "Vara B", + "takerFeeColumnTitle": "Võtja tasu", + "swappable": "Vahetatav", + "amountToSwap": "Kogus {{symbol}} vahetama", + "enterAmountToSwap": "Sisestage summa {{symbolA}} vastu tahad vahetada {{symbolB}}", + "totalAmount": "Kogu summa", + "totalAmountDescription": "See on summa {{symbolB}} saad vastutasuks {{symbolA}}", + "poolFee": "Basseini tasu", + "poolFeeDescription": "See on hinnanguline tasu, mida maksate selle vahetuse eest basseinile", + "fee": "tasu", + "networkFee": "Võrgutasu", + "networkFeeDescription": "See on teie basseini vahetusoperatsiooni plokiahelasse edastamise kulu", + "feeCurrency": "BTS", + "rebate": "Allahindlus: {{rebate}} {{currency}} (üleandmine)", + "submit": "Esita", + "exchangeHeader": "Vahetades {{sellAmount}} {{symbolA}} jaoks {{buyAmount}} {{symbolB}}", + "swapBuySell": "Vahetus osta/müüa", + "blocksightsPoolExplorer": "Blocksightsi basseiniuurija", + "poolJsonButton": "Pool JSON", + "liquidityPoolJsonTitle": "Likviidsusfondi JSON", + "liquidityPoolJsonDescription": "Vaadake võrgu poolt selle kogumi kohta tagastatud üksikasju", + "swappableAssetJsonButton": "Vahetatava vara JSON", + "swappableAssetJsonTitle": "Vahetatava vara JSON", + "swappableAssetJsonDescription": "Vaadake võrgu poolt selle kogumi vahetatavate varade tagastatud üksikasju", + "quoteAsset": "Pakkumise vara", + "baseAsset": "Põhivara", + "loading": "Laadimine...", + "tradeOnDex": "Kas kaubelda hoopis Dexiga?", + "market": "Turg: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Bitshares DEXis saate käsitsi luua limiitkorraldusi enda valitud kauplemispaaridele", + "purchaseStake": "Kas ostate selle basseini osaluse?", + "shareAsset": "Jaga vara: {{shareAsset}}", + "purchaseStakeDescription": "Saate vahetustasu tulu aja jooksul, omades osalust kogumis turupiiranguga orderi kaudu.", + "stakeAssets": "Kas panustada sellesse basseini vara?", + "stakeAssetsDescription": "Teenige likviidsuskogumitesse paigutatud varadelt vahetustasud, millest on maha arvatud väikese kogumi kindlaksmääratud väljavõtmistasu.", + "borrowAssets": "Kas teil on vaja vara laenata?", + "borrowAssetsDescription": "DEX-i kasutajad laenavad varasid kasutaja määratud intressimääradega. ", + "searchBorrowableAssets": "Otsige laenatavate varade järgi", + "searchAcceptedCollateral": "Otsige aktsepteeritud tagatise järgi", + "poolShareAsset": "Pooli aktsia vara", + "risksTitle": "Likviidsuskogumi börsidega seotud riskid", + "risksDescription": "Enne jätkamist uurige likviidsuskogumeid ja nende vahetatavaid varasid.", + "liquidityPoolRisks": "Likviidsusfondi riskid", + "liquidityPoolRisk1": "Kuna likviidsuskogumid on kasutaja konfigureeritud, on neil väga unikaalsed omadused ja erinevad omanikud; ", + "liquidityPoolRisk2": "Kuna igaüks võib investeerida fonde fondi mõlemale poole, on kogumi likviidsus dünaamiline. ", + "swappableAssetRisks": "Vahetatavate varade riskid", + "swappableAssetRisk1": "Kuna likviidsuskogumi varad võivad kuuluda kasutajale", + "swappableAssetRisk2": "Kui proovite vahetada varasid, mis ületavad saadaolevaid vahetatavaid varasid, kannatab teie vahetushind oluliselt. ", + "swappableAssetRisk3": "Vahetatavate varade endi väärtus võib kõikuda nii välistegurite (välisväärtuse maht) kui ka sisemiste tegurite (vara emitent) tõttu", + "exchange": "Vahetada", + "sendAsset": "Valige vara.." +} diff --git a/src/data/locales/fr/Home.json b/src/data/locales/fr/Home.json index 8f0f91d..5cfb49c 100644 --- a/src/data/locales/fr/Home.json +++ b/src/data/locales/fr/Home.json @@ -6,6 +6,19 @@ "hover2": "Prêtez des actifs à vos taux définis.", "hover3": "Spécifiez les garanties de prêt et les prix acceptables." }, + "nodes": { + "title": "🌐 Nœuds", + "subtitle": "Configurer la connexion blockchain", + "hover1": "Connectez-vous à un nœud Bitshares de votre choix.", + "hover2": "Ajoutez/supprimez des nœuds à votre liste de connexions." + }, + "swap": { + "title": "🔄 Échange simple", + "subtitle": "Échanger des actifs via un pool", + "hover1": "Échangez des actifs via des pools de liquidités créés par l'utilisateur.", + "hover2": "Les pools ont des paires de trading et des frais différents.", + "hover3": "Plus simple mais plus coûteux qu’un ordre limité." + }, "pool": { "title": "💱 Échange de piscine", "subtitle": "Échanger des actifs via un pool", diff --git a/src/data/locales/fr/Nodes.json b/src/data/locales/fr/Nodes.json new file mode 100644 index 0000000..ce4717d --- /dev/null +++ b/src/data/locales/fr/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Configurez votre connexion blockchain", + "cardDescription": "Connectez-vous à un nœud Bitshares de votre choix.", + "add": "Ajouter une URL", + "reset": "Réinitialiser la configuration du nœud", + "none": "Aucun nœud configuré, veuillez fournir une URL de nœud pour continuer.", + "addDescription": "Ajouter une nouvelle URL de nœud à la liste de nœuds de cette blockchain ?" + } \ No newline at end of file diff --git a/src/data/locales/fr/PageHeader.json b/src/data/locales/fr/PageHeader.json index 10646a4..3d670c0 100644 --- a/src/data/locales/fr/PageHeader.json +++ b/src/data/locales/fr/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Découvrez vos offres actuelles ci-dessous !", "dex": "Utilisez le formulaire ci-dessous pour créer un ordre limité sur le Bitshares DEX.", "featured": "Découvrez certains de ces marchés en vedette", - "index": "Cet outil open source peut créer plusieurs opérations Bitshares.", + "index": "Un outil pour créer des opérations Bitshares !", "ltm": "Utilisez le formulaire ci-dessous pour mettre à niveau votre compte vers un abonnement à vie !", "offer": "Le formulaire ci-dessous permet d'accepter une offre de crédit sur le Bitshares DEX.", "offereditor": "Utilisez le formulaire ci-dessous pour créer/modifier des offres de crédit sur Bitshares DEX.", @@ -44,7 +44,8 @@ "smartcoin": "Utilisez le formulaire ci-dessous pour émettre une dette garantie", "smartcoins": "Utilisez l'interface ci-dessous pour localiser un actif à emprunter pour exister", "stake": "Utilisez ce formulaire pour miser vos actifs dans des pools de liquidité", - "transfer": "Utilisez le formulaire ci-dessous pour transférer des actifs à d'autres utilisateurs de la blockchain" + "transfer": "Utilisez le formulaire ci-dessous pour transférer des actifs à d'autres utilisateurs de la blockchain", + "nodes": "Connectez-vous à la blockchain via un nœud de votre choix" }, "back": "Retourner", "usage": "Conçu pour être utilisé avec ", diff --git a/src/data/locales/fr/SimpleSwap.json b/src/data/locales/fr/SimpleSwap.json new file mode 100644 index 0000000..f2c079c --- /dev/null +++ b/src/data/locales/fr/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Échange de pool de liquidité Bitshares", + "description": "Échangez facilement entre les actifs Bitshares en utilisant l'un de ces pools de liquidités créés par les utilisateurs.", + "loadingPoolData": "Chargement des données du pool...", + "loadingAssetData": "Chargement des données d'actif...", + "accountLabel": "Compte", + "liquidityPoolLabel": "Pool de liquidité", + "foundPoolDetails": "Il s'agit du pool de liquidité que vous avez choisi pour votre swap d'actifs", + "noPoolDetails": "Sélectionnez un pool de liquidités pour poursuivre votre échange d'actifs", + "selectPoolPlaceholder": "Sélectionnez une piscine..", + "searchButton": "Recherche", + "searchDialogTitle": "Rechercher un pool de liquidité", + "searchDialogDescription": "Sélectionnez un résultat de recherche pour procéder à l’échange d’actifs souhaité.", + "swappableAssetsTab": "Actifs échangeables", + "poolShareAssetTab": "Actif de partage du pool", + "idColumnTitle": "IDENTIFIANT", + "shareAssetColumnTitle": "Partager l'actif", + "assetAColumnTitle": "Actif A", + "assetBColumnTitle": "Actif B", + "takerFeeColumnTitle": "Frais de preneur", + "swappable": "Échangeable", + "amountToSwap": "Quantité de {{symbol}} à échanger", + "enterAmountToSwap": "Entrez le montant de {{symbolA}} tu veux échanger contre {{symbolB}}", + "totalAmount": "Montant total", + "totalAmountDescription": "C'est le montant de {{symbolB}} vous recevrez en échange de {{symbolA}}", + "poolFee": "Frais de piscine", + "poolFeeDescription": "Il s'agit des frais estimés que vous paierez au pool pour cet échange.", + "fee": "frais", + "networkFee": "Frais de réseau", + "networkFeeDescription": "C'est le coût de diffusion de votre opération d'échange de pool sur la blockchain", + "feeCurrency": "BTS", + "rebate": "Rabais: {{rebate}} {{currency}} (acquisition)", + "submit": "Soumettre", + "exchangeHeader": "Échanger {{sellAmount}} {{symbolA}} pour {{buyAmount}} {{symbolB}}", + "swapBuySell": "Troquer achat/vente", + "blocksightsPoolExplorer": "Explorateur de piscine Blocksights", + "poolJsonButton": "Piscine JSON", + "liquidityPoolJsonTitle": "Pool de liquidité JSON", + "liquidityPoolJsonDescription": "Consultez les détails renvoyés par le réseau pour ce pool", + "swappableAssetJsonButton": "Actif échangeable JSON", + "swappableAssetJsonTitle": "Actif échangeable JSON", + "swappableAssetJsonDescription": "Consultez les détails renvoyés par le réseau des actifs échangeables de ce pool", + "quoteAsset": "Actif de cotation", + "baseAsset": "Actif de base", + "loading": "Chargement...", + "tradeOnDex": "Trader sur le Dex à la place ?", + "market": "Marché: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Vous pouvez créer manuellement des ordres limités pour trader les paires de votre choix sur Bitshares DEX.", + "purchaseStake": "Acheter une participation dans ce pool ?", + "shareAsset": "Partager l'actif : {{shareAsset}}", + "purchaseStakeDescription": "Bénéficiez du rendement des frais de swap au fil du temps en détenant une participation dans le pool via un ordre limité au marché.", + "stakeAssets": "Mettre des actifs dans ce pool ?", + "stakeAssetsDescription": "Gagnez des frais de swap sur les actifs mis en jeu dans des pools de liquidité, moins des frais de retrait définis pour un petit pool.", + "borrowAssets": "Besoin d'emprunter des actifs ?", + "borrowAssetsDescription": "Les utilisateurs DEX prêtent des actifs à des taux définis par l'utilisateur. ", + "searchBorrowableAssets": "Recherche par actifs empruntables", + "searchAcceptedCollateral": "Recherche par garantie acceptée", + "poolShareAsset": "Actif de partage du pool", + "risksTitle": "Risques associés aux échanges de pools de liquidité", + "risksDescription": "Veuillez faire vos propres recherches sur les pools de liquidités et leurs actifs échangeables avant de continuer.", + "liquidityPoolRisks": "Risques liés au pool de liquidité", + "liquidityPoolRisk1": "Comme les pools de liquidités sont configurés par l'utilisateur, ils ont des propriétés très uniques et des propriétaires différents ; ", + "liquidityPoolRisk2": "Comme n’importe qui peut placer des fonds des deux côtés du pool, la liquidité du pool est dynamique. ", + "swappableAssetRisks": "Risques liés aux actifs échangeables", + "swappableAssetRisk1": "Étant donné que les actifs du pool de liquidité peuvent appartenir à l'utilisateur", + "swappableAssetRisk2": "Si vous essayez d'échanger des actifs au-delà des actifs échangeables disponibles, votre prix d'échange en souffrira grandement. ", + "swappableAssetRisk3": "La valeur des actifs échangeables eux-mêmes peut fluctuer en fonction de facteurs externes (volume de cex externe) ainsi que de facteurs internes (émetteur d'actifs", + "exchange": "Échange", + "sendAsset": "Sélectionnez un actif.." +} diff --git a/src/data/locales/it/Home.json b/src/data/locales/it/Home.json index f346729..a0a2d7f 100644 --- a/src/data/locales/it/Home.json +++ b/src/data/locales/it/Home.json @@ -6,6 +6,19 @@ "hover2": "Presta beni ai tassi da te definiti.", "hover3": "Specificare le garanzie e i prezzi del prestito accettabili." }, + "nodes": { + "title": "🌐 Nodi", + "subtitle": "Configura la connessione blockchain", + "hover1": "Connettiti a un nodo Bitshares di tua scelta.", + "hover2": "Aggiungi/rimuovi nodi all'elenco delle connessioni." + }, + "swap": { + "title": "🔄Scambio semplice", + "subtitle": "Scambia asset tramite un pool", + "hover1": "Scambia asset tramite pool di liquidità creati dall'utente.", + "hover2": "I pool hanno coppie di trading e commissioni di trading diverse.", + "hover3": "Più semplice ma più costoso di un ordine limite." + }, "pool": { "title": "💱 Scambio piscina", "subtitle": "Scambia asset tramite un pool", diff --git a/src/data/locales/it/Nodes.json b/src/data/locales/it/Nodes.json new file mode 100644 index 0000000..a8c2f92 --- /dev/null +++ b/src/data/locales/it/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Configura la tua connessione blockchain", + "cardDescription": "Connettiti a un nodo Bitshares di tua scelta.", + "add": "Aggiungi URL", + "reset": "Reimposta la configurazione del nodo", + "none": "Nessun nodo configurato, fornisci un URL del nodo per procedere.", + "addDescription": "Aggiungere un nuovo URL di nodo all'elenco dei nodi di questa blockchain?" + } \ No newline at end of file diff --git a/src/data/locales/it/PageHeader.json b/src/data/locales/it/PageHeader.json index dd62e93..09ea121 100644 --- a/src/data/locales/it/PageHeader.json +++ b/src/data/locales/it/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Controlla le tue offerte attuali qui sotto!", "dex": "Utilizza il modulo sottostante per creare un ordine limite su Bitshares DEX.", "featured": "Dai un'occhiata ad alcuni di questi mercati in primo piano", - "index": "Questo strumento open source può creare più operazioni Bitshares.", + "index": "Uno strumento per creare operazioni Bitshares!", "ltm": "Utilizza il modulo sottostante per aggiornare il tuo account ad un abbonamento a vita!", "offer": "Il modulo sottostante serve per accettare un'offerta di credito su Bitshares DEX.", "offereditor": "Utilizza il modulo sottostante per creare/modificare offerte di credito su Bitshares DEX.", @@ -44,7 +44,8 @@ "smartcoin": "Utilizza il modulo sottostante per emettere debito garantito", "smartcoins": "Utilizza l'interfaccia sottostante per individuare un bene da prendere in prestito", "stake": "Utilizza questo modulo per puntare i tuoi asset in pool di liquidità", - "transfer": "Utilizza il modulo sottostante per trasferire risorse ad altri utenti blockchain" + "transfer": "Utilizza il modulo sottostante per trasferire risorse ad altri utenti blockchain", + "nodes": "Connettiti alla blockchain tramite un nodo a tua scelta" }, "back": "Torna indietro", "usage": "Progettato per l'uso con ", diff --git a/src/data/locales/it/SimpleSwap.json b/src/data/locales/it/SimpleSwap.json new file mode 100644 index 0000000..cffbdec --- /dev/null +++ b/src/data/locales/it/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Scambio di pool di liquidità Bitshares", + "description": "Scambia facilmente tra le risorse Bitshares utilizzando uno di questi pool di liquidità creati dall'utente.", + "loadingPoolData": "Caricamento dati piscina...", + "loadingAssetData": "Caricamento dati risorsa...", + "accountLabel": "Account", + "liquidityPoolLabel": "Riserva di liquidità", + "foundPoolDetails": "Questo è il pool di liquidità che hai scelto per il tuo asset swap", + "noPoolDetails": "Seleziona un pool di liquidità per continuare con lo scambio di asset", + "selectPoolPlaceholder": "Seleziona una piscina..", + "searchButton": "Ricerca", + "searchDialogTitle": "Cerca un pool di liquidità", + "searchDialogDescription": "Seleziona un risultato di ricerca per procedere con lo scambio di asset desiderato.", + "swappableAssetsTab": "Risorse scambiabili", + "poolShareAssetTab": "Risorsa di condivisione del pool", + "idColumnTitle": "ID", + "shareAssetColumnTitle": "Condividi risorsa", + "assetAColumnTitle": "Bene A", + "assetBColumnTitle": "Bene B", + "takerFeeColumnTitle": "Commissione dell'acquirente", + "swappable": "Scambiabile", + "amountToSwap": "Quantità di {{symbol}} scambiare", + "enterAmountToSwap": "Inserisci l'importo di {{symbolA}} vuoi scambiare {{symbolB}}", + "totalAmount": "Importo totale", + "totalAmountDescription": "Questo è l'importo di {{symbolB}} riceverai in cambio {{symbolA}}", + "poolFee": "Tassa della piscina", + "poolFeeDescription": "Questa è la commissione stimata che pagherai al pool per questo scambio", + "fee": "tassa", + "networkFee": "Tariffa di rete", + "networkFeeDescription": "Questo è il costo per trasmettere la tua operazione di scambio di pool sulla blockchain", + "feeCurrency": "BTS", + "rebate": "Sconto: {{rebate}} {{currency}} (veste)", + "submit": "Invia", + "exchangeHeader": "Scambio {{sellAmount}} {{symbolA}} per {{buyAmount}} {{symbolB}}", + "swapBuySell": "Scambio acquisto/vendita", + "blocksightsPoolExplorer": "Esploratore di piscine Blocksights", + "poolJsonButton": "Pool JSON", + "liquidityPoolJsonTitle": "Pool di liquidità JSON", + "liquidityPoolJsonDescription": "Controlla i dettagli restituiti dalla rete per questo pool", + "swappableAssetJsonButton": "Asset scambiabile JSON", + "swappableAssetJsonTitle": "Asset scambiabile JSON", + "swappableAssetJsonDescription": "Controlla i dettagli restituiti dalla rete delle risorse scambiabili di questo pool", + "quoteAsset": "Risorsa preventivo", + "baseAsset": "Bene di base", + "loading": "Caricamento...", + "tradeOnDex": "Fai trading invece sul Dex?", + "market": "Mercato: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Puoi creare manualmente ordini limite per le coppie di trading di tua scelta su Bitshares DEX", + "purchaseStake": "Acquistare una quota in questo pool?", + "shareAsset": "Condividi risorsa: {{shareAsset}}", + "purchaseStakeDescription": "Ricevi il rendimento delle commissioni di swap nel tempo possedendo una partecipazione nel pool tramite un ordine limite di mercato.", + "stakeAssets": "Partecipare alle risorse di questo pool?", + "stakeAssetsDescription": "Guadagna commissioni di swap sugli asset investiti in pool di liquidità meno una piccola commissione di prelievo definita dal pool.", + "borrowAssets": "Hai bisogno di prendere in prestito alcuni beni?", + "borrowAssetsDescription": "Gli utenti DEX prestano risorse a tariffe definite dall'utente. ", + "searchBorrowableAssets": "Ricerca per beni mutuabili", + "searchAcceptedCollateral": "Ricerca per garanzia accettata", + "poolShareAsset": "Risorsa di condivisione del pool", + "risksTitle": "Rischi associati agli scambi di pool di liquidità", + "risksDescription": "Si prega di effettuare le proprie ricerche sui pool di liquidità e sui relativi asset scambiabili prima di procedere.", + "liquidityPoolRisks": "Rischi relativi alle riserve di liquidità", + "liquidityPoolRisk1": "Poiché i pool di liquidità sono configurati dall'utente, hanno proprietà altamente uniche e proprietari diversi; ", + "liquidityPoolRisk2": "Poiché chiunque può investire fondi in entrambi i lati del pool, la liquidità del pool è dinamica. ", + "swappableAssetRisks": "Rischi delle attività scambiabili", + "swappableAssetRisk1": "Poiché le attività del pool di liquidità possono essere di proprietà dell'utente", + "swappableAssetRisk2": "Se provi a scambiare asset in eccesso rispetto agli asset scambiabili disponibili, il tuo prezzo di swap ne risentirà notevolmente. ", + "swappableAssetRisk3": "Il valore degli stessi asset scambiabili può variare in base a fattori esterni (volume cex esterno) così come a fattori interni (emittente dell'asset", + "exchange": "Scambio", + "sendAsset": "Seleziona una risorsa.." +} diff --git a/src/data/locales/ja/Home.json b/src/data/locales/ja/Home.json index 018f225..b370267 100644 --- a/src/data/locales/ja/Home.json +++ b/src/data/locales/ja/Home.json @@ -6,6 +6,19 @@ "hover2": "定義した金利で資産を貸し出します。", "hover3": "許容可能なローン担保と価格を指定します。" }, + "nodes": { + "title": "🌐 ノード", + "subtitle": "ブロックチェーン接続を構成する", + "hover1": "選択した Bitshares ノードに接続します。", + "hover2": "接続リストにノードを追加/削除します。" + }, + "swap": { + "title": "🔄 簡単な交換", + "subtitle": "プールを介して資産を交換する", + "hover1": "ユーザーが作成した流動性プールを介して資産を交換します。", + "hover2": "プールにはさまざまな取引ペアと手数料があります。", + "hover3": "シンプルですが、指値注文よりもコストがかかります。" + }, "pool": { "title": "💱プール交流", "subtitle": "プールを介して資産を交換する", diff --git a/src/data/locales/ja/Nodes.json b/src/data/locales/ja/Nodes.json new file mode 100644 index 0000000..50b6897 --- /dev/null +++ b/src/data/locales/ja/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "ブロックチェーン接続を構成する", + "cardDescription": "選択した Bitshares ノードに接続します。", + "add": "URLを追加", + "reset": "ノード構成をリセットする", + "none": "ノードが構成されていません。続行するにはノード URL を入力してください。", + "addDescription": "新しいノード URL をこのブロックチェーンのノード リストに追加しますか?" + } \ No newline at end of file diff --git a/src/data/locales/ja/PageHeader.json b/src/data/locales/ja/PageHeader.json index 56f9f3b..0b7a98f 100644 --- a/src/data/locales/ja/PageHeader.json +++ b/src/data/locales/ja/PageHeader.json @@ -33,7 +33,7 @@ "deals": "現在のセールを以下でチェックしてください!", "dex": "Bitshares DEX で指値注文を作成するには、以下のフォームを使用してください。", "featured": "これらの注目のマーケットをチェックしてください", - "index": "このオープンソース ツールは、複数の Bitshare 操作を作成できます。", + "index": "Bitshares オペレーションを作成するためのツールです。", "ltm": "アカウントを永久メンバーシップにアップグレードするには、以下のフォームを使用してください。", "offer": "以下のフォームは、Bitshares DEX でのクレジットオファーを受け入れるためのものです。", "offereditor": "Bitshares DEX でクレジット オファーを作成/編集するには、以下のフォームを使用してください。", @@ -44,7 +44,8 @@ "smartcoin": "担保付き債務を発行するには、以下のフォームを使用してください", "smartcoins": "以下のインターフェースを使用して、借用する資産を見つけます。", "stake": "このフォームを使用して流動性プールに資産を賭けます", - "transfer": "他のブロックチェーン ユーザーに資産を転送するには、以下のフォームを使用してください" + "transfer": "他のブロックチェーン ユーザーに資産を転送するには、以下のフォームを使用してください", + "nodes": "選択したノードを介してブロックチェーンに接続します" }, "back": "戻る", "usage": "で使用するように設計されています ", diff --git a/src/data/locales/ja/SimpleSwap.json b/src/data/locales/ja/SimpleSwap.json new file mode 100644 index 0000000..95303be --- /dev/null +++ b/src/data/locales/ja/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "ビットシェアの流動性プール交換", + "description": "これらのユーザー作成の流動性プールのいずれかを使用して、Bitshares 資産間で簡単に交換できます。", + "loadingPoolData": "プールデータをロードしています...", + "loadingAssetData": "アセットデータをロードしています...", + "accountLabel": "アカウント", + "liquidityPoolLabel": "流動性プール", + "foundPoolDetails": "これは、資産スワップのために選択した流動性プールです", + "noPoolDetails": "資産交換を続行するには流動性プールを選択してください", + "selectPoolPlaceholder": "プールを選択してください。", + "searchButton": "検索", + "searchDialogTitle": "流動性プールを検索する", + "searchDialogDescription": "検索結果を選択して、目的の資産交換を続行します。", + "swappableAssetsTab": "交換可能なアセット", + "poolShareAssetTab": "プール共有資産", + "idColumnTitle": "ID", + "shareAssetColumnTitle": "資産を共有する", + "assetAColumnTitle": "資産A", + "assetBColumnTitle": "資産B", + "takerFeeColumnTitle": "テイカー手数料", + "swappable": "交換可能", + "amountToSwap": "数の {{symbol}} 交換します", + "enterAmountToSwap": "の量を入力してください {{symbolA}} 交換したいのは {{symbolB}}", + "totalAmount": "合計金額", + "totalAmountDescription": "この量は、 {{symbolB}} あなたはその代わりに受け取るでしょう {{symbolA}}", + "poolFee": "プール料金", + "poolFeeDescription": "これは、このスワップに対してプールに支払う推定料金です", + "fee": "手数料", + "networkFee": "ネットワーク料金", + "networkFeeDescription": "これは、プール交換操作をブロックチェーンにブロードキャストするためのコストです", + "feeCurrency": "防弾少年団", + "rebate": "リベート: {{rebate}} {{currency}} (権利確定)", + "submit": "提出する", + "exchangeHeader": "交換 {{sellAmount}} {{symbolA}} のために {{buyAmount}} {{symbolB}}", + "swapBuySell": "売買を交換する", + "blocksightsPoolExplorer": "Blocksights プール エクスプローラー", + "poolJsonButton": "プールのJSON", + "liquidityPoolJsonTitle": "流動性プール JSON", + "liquidityPoolJsonDescription": "このプールについてネットワークから返された詳細を確認してください", + "swappableAssetJsonButton": "交換可能なアセット JSON", + "swappableAssetJsonTitle": "交換可能なアセット JSON", + "swappableAssetJsonDescription": "ネットワークから返されたこのプールのスワップ可能な資産の詳細を確認してください", + "quoteAsset": "資産の見積もり", + "baseAsset": "基本資産", + "loading": "読み込み中...", + "tradeOnDex": "代わりにDexで取引しますか?", + "market": "市場: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Bitshares DEX では、選択した取引ペアの指値注文を手動で作成できます。", + "purchaseStake": "このプールの株式を購入しますか?", + "shareAsset": "アセットを共有する: {{shareAsset}}", + "purchaseStakeDescription": "市場指値注文を通じてプールの株式を所有することで、長期にわたってスワップ手数料の利回りを受け取ります。", + "stakeAssets": "このプールに資産を賭けますか?", + "stakeAssetsDescription": "流動性プールに賭けられた資産から少額のプール定義の出金手数料を差し引いたスワップ手数料を獲得します。", + "borrowAssets": "資産を借りる必要がありますか?", + "borrowAssetsDescription": "DEX ユーザーは、ユーザー定義の金利で資産を貸し出します。 ", + "searchBorrowableAssets": "借入可能資産から探す", + "searchAcceptedCollateral": "受け入れられた担保で検索する", + "poolShareAsset": "プール共有資産", + "risksTitle": "流動性プール交換に関連するリスク", + "risksDescription": "続行する前に、流動性プールとその交換可能な資産についてご自身で調査してください。", + "liquidityPoolRisks": "流動性プールのリスク", + "liquidityPoolRisk1": "流動性プールはユーザーが構成するため、非常にユニークなプロパティと異なる所有者を持ちます。", + "liquidityPoolRisk2": "誰でもプールの両側に資金を賭けることができるため、プールの流動性は動的です。", + "swappableAssetRisks": "スワップ可能な資産のリスク", + "swappableAssetRisk1": "流動性プール資産はユーザーが所有できるため", + "swappableAssetRisk2": "利用可能なスワップ可能資産を超えて資産をスワップしようとすると、スワップ価格が大幅に低下します。", + "swappableAssetRisk3": "スワップ可能資産自体の価値は、外部要因(外部 CEX ボリューム)および内部要因(資産発行体)に基づいて変動する可能性があります。", + "exchange": "交換", + "sendAsset": "アセットを選択してください。" +} diff --git a/src/data/locales/ko/Home.json b/src/data/locales/ko/Home.json index a2fb3a2..8e44803 100644 --- a/src/data/locales/ko/Home.json +++ b/src/data/locales/ko/Home.json @@ -6,6 +6,19 @@ "hover2": "귀하가 정의한 금리로 자산을 대출해 보세요.", "hover3": "허용되는 대출 담보 및 가격을 지정하십시오." }, + "nodes": { + "title": "🌐 노드", + "subtitle": "블록체인 연결 구성", + "hover1": "원하는 Bitshares 노드에 연결하세요.", + "hover2": "연결 목록에 노드를 추가/제거합니다." + }, + "swap": { + "title": "🔄 간단한 교환", + "subtitle": "풀을 통해 자산 교환", + "hover1": "사용자가 생성한 유동성 풀을 통해 자산을 교환합니다.", + "hover2": "풀에는 다양한 거래 쌍과 수수료가 있습니다.", + "hover3": "지정가 주문보다 간단하지만 비용이 더 많이 듭니다." + }, "pool": { "title": "💱 풀 교환", "subtitle": "풀을 통해 자산 교환", diff --git a/src/data/locales/ko/Nodes.json b/src/data/locales/ko/Nodes.json new file mode 100644 index 0000000..191caaa --- /dev/null +++ b/src/data/locales/ko/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "블록체인 연결 구성", + "cardDescription": "원하는 Bitshares 노드에 연결하세요.", + "add": "URL 추가", + "reset": "노드 구성 재설정", + "none": "구성된 노드가 없습니다. 계속하려면 노드 URL을 입력하세요.", + "addDescription": "이 블록체인의 노드 목록에 새 노드 URL을 추가하시겠습니까?" + } \ No newline at end of file diff --git a/src/data/locales/ko/PageHeader.json b/src/data/locales/ko/PageHeader.json index 056eb01..7054b65 100644 --- a/src/data/locales/ko/PageHeader.json +++ b/src/data/locales/ko/PageHeader.json @@ -33,7 +33,7 @@ "deals": "아래에서 현재 거래를 확인하세요!", "dex": "아래 양식을 사용하여 Bitshares DEX에 지정가 주문을 생성하세요.", "featured": "주요 시장 중 일부를 확인해 보세요.", - "index": "이 오픈 소스 도구는 여러 Bitshares 작업을 만들 수 있습니다.", + "index": "Bitshares 운영을 위한 도구입니다!", "ltm": "아래 양식을 사용하여 귀하의 계정을 평생 멤버십으로 업그레이드하세요!", "offer": "아래 양식은 Bitshares DEX에 대한 신용 제안을 수락하기 위한 것입니다.", "offereditor": "Bitshares DEX에 대한 크레딧 제안을 생성/편집하려면 아래 양식을 사용하십시오.", @@ -44,7 +44,8 @@ "smartcoin": "담보부 부채를 발행하려면 아래 양식을 사용하십시오.", "smartcoins": "아래 인터페이스를 사용하여 차입할 자산을 찾으세요.", "stake": "유동성 풀에 자산을 스테이킹하려면 이 양식을 사용하세요.", - "transfer": "다른 블록체인 사용자에게 자산을 전송하려면 아래 양식을 사용하세요." + "transfer": "다른 블록체인 사용자에게 자산을 전송하려면 아래 양식을 사용하세요.", + "nodes": "선택한 노드를 통해 블록체인에 연결" }, "back": "돌아가기", "usage": "다음과 함께 사용하도록 설계됨 ", diff --git a/src/data/locales/ko/SimpleSwap.json b/src/data/locales/ko/SimpleSwap.json new file mode 100644 index 0000000..e559fe5 --- /dev/null +++ b/src/data/locales/ko/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Bitshares 유동성 풀 교환", + "description": "사용자가 생성한 유동성 풀 중 하나를 사용하여 Bitshares 자산을 쉽게 교환할 수 있습니다.", + "loadingPoolData": "풀 데이터 로드 중...", + "loadingAssetData": "자산 데이터 로드 중...", + "accountLabel": "계정", + "liquidityPoolLabel": "유동성 풀", + "foundPoolDetails": "자산 스왑을 위해 선택한 유동성 풀입니다.", + "noPoolDetails": "자산 스왑을 계속하려면 유동성 풀을 선택하세요.", + "selectPoolPlaceholder": "풀을 선택하세요..", + "searchButton": "찾다", + "searchDialogTitle": "유동성 풀 검색", + "searchDialogDescription": "원하는 자산 스왑을 진행하려면 검색 결과를 선택하세요.", + "swappableAssetsTab": "교체 가능한 자산", + "poolShareAssetTab": "풀 공유 자산", + "idColumnTitle": "ID", + "shareAssetColumnTitle": "자산 공유", + "assetAColumnTitle": "자산 A", + "assetBColumnTitle": "자산 B", + "takerFeeColumnTitle": "테이커 수수료", + "swappable": "교체 가능", + "amountToSwap": "금액 {{symbol}} 교환하다", + "enterAmountToSwap": "금액을 입력하세요. {{symbolA}} 당신은 교환하고 싶어 {{symbolB}}", + "totalAmount": "총액", + "totalAmountDescription": "이 금액은 {{symbolB}} 당신은 그 대가로 받게 될 것입니다 {{symbolA}}", + "poolFee": "수영장 요금", + "poolFeeDescription": "이 스왑에 대해 풀에 지불할 예상 수수료입니다.", + "fee": "요금", + "networkFee": "네트워크 수수료", + "networkFeeDescription": "이는 풀 교환 작업을 블록체인에 방송하는 데 드는 비용입니다.", + "feeCurrency": "방탄소년단", + "rebate": "할인: {{rebate}} {{currency}} (베스팅)", + "submit": "제출하다", + "exchangeHeader": "교환 {{sellAmount}} {{symbolA}} ~을 위한 {{buyAmount}} {{symbolB}}", + "swapBuySell": "스왑 매수/매도", + "blocksightsPoolExplorer": "Blocksights 풀 탐색기", + "poolJsonButton": "풀 JSON", + "liquidityPoolJsonTitle": "유동성 풀 JSON", + "liquidityPoolJsonDescription": "이 풀에 대해 네트워크에서 반환된 세부 정보를 확인하세요.", + "swappableAssetJsonButton": "교체 가능한 자산 JSON", + "swappableAssetJsonTitle": "교체 가능한 자산 JSON", + "swappableAssetJsonDescription": "이 풀의 교체 가능한 자산이 네트워크에서 반환한 세부 정보를 확인하세요.", + "quoteAsset": "견적 자산", + "baseAsset": "기본자산", + "loading": "로드 중...", + "tradeOnDex": "대신 Dex에서 거래하시겠습니까?", + "market": "시장: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Bitshares DEX에서 선택한 거래 쌍에 대한 지정가 주문을 수동으로 생성할 수 있습니다.", + "purchaseStake": "이 풀의 지분을 구매하시겠습니까?", + "shareAsset": "자산 공유: {{shareAsset}}", + "purchaseStakeDescription": "시장 지정가 주문을 통해 풀에 지분을 보유함으로써 시간이 지남에 따라 스왑 수수료 수익을 얻을 수 있습니다.", + "stakeAssets": "이 풀에 자산을 스테이크하시겠습니까?", + "stakeAssetsDescription": "유동성 풀에 예치된 자산에 대해 스왑 수수료에서 소액 풀로 정의된 출금 수수료를 뺀 수익을 얻으세요.", + "borrowAssets": "일부 자산을 빌려야 합니까?", + "borrowAssetsDescription": "DEX 사용자는 사용자가 정의한 금리로 자산을 빌려줍니다. ", + "searchBorrowableAssets": "차용자산으로 검색", + "searchAcceptedCollateral": "허용된 자료로 검색", + "poolShareAsset": "풀 공유 자산", + "risksTitle": "유동성 풀 교환과 관련된 위험", + "risksDescription": "계속 진행하기 전에 유동성 풀과 스왑 가능 자산에 대해 직접 조사해 보십시오.", + "liquidityPoolRisks": "유동성 풀 위험", + "liquidityPoolRisk1": "유동성 풀은 사용자가 구성하므로 매우 고유한 속성과 다양한 소유자를 갖습니다. ", + "liquidityPoolRisk2": "누구나 풀의 양쪽에 자금을 걸 수 있으므로 풀 유동성은 역동적입니다. ", + "swappableAssetRisks": "교환 가능한 자산 위험", + "swappableAssetRisk1": "유동성 풀 자산은 사용자 소유가 될 수 있으므로", + "swappableAssetRisk2": "사용 가능한 스왑 가능한 자산을 초과하여 자산을 스왑하려고 하면 스왑 가격이 크게 하락할 것입니다. ", + "swappableAssetRisk3": "스왑 가능한 자산 자체의 가치는 외부 요인(외부 거래량)뿐만 아니라 내부 요인(자산 발행사)에 따라 변동될 수 있습니다.", + "exchange": "교환", + "sendAsset": "자산을 선택하세요.." +} diff --git a/src/data/locales/pt/Home.json b/src/data/locales/pt/Home.json index 7ef3cfc..2893365 100644 --- a/src/data/locales/pt/Home.json +++ b/src/data/locales/pt/Home.json @@ -6,6 +6,19 @@ "hover2": "Empreste ativos às taxas definidas.", "hover3": "Especifique garantias e preços de empréstimo aceitáveis." }, + "nodes": { + "title": "🌐 Nós", + "subtitle": "Configurar conexão blockchain", + "hover1": "Conecte-se a um nó Bitshares de sua escolha.", + "hover2": "Adicione/remova nós à sua lista de conexões." + }, + "swap": { + "title": "🔄 Troca simples", + "subtitle": "Trocar ativos por meio de um pool", + "hover1": "Troque ativos por meio de pools de liquidez criados pelo usuário.", + "hover2": "Os pools têm diferentes pares de negociação e taxas.", + "hover3": "Mais simples, mas mais caro do que um pedido com limite." + }, "pool": { "title": "💱 Troca de piscina", "subtitle": "Trocar ativos por meio de um pool", diff --git a/src/data/locales/pt/Nodes.json b/src/data/locales/pt/Nodes.json new file mode 100644 index 0000000..8c16fb8 --- /dev/null +++ b/src/data/locales/pt/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "Configure sua conexão blockchain", + "cardDescription": "Conecte-se a um nó Bitshares de sua escolha.", + "add": "Adicionar URL", + "reset": "Redefinir configuração do nó", + "none": "Nenhum nó configurado. Forneça um URL de nó para continuar.", + "addDescription": "Adicionar um novo URL de nó à lista de nós deste blockchain?" + } \ No newline at end of file diff --git a/src/data/locales/pt/PageHeader.json b/src/data/locales/pt/PageHeader.json index 37fc1f5..88def21 100644 --- a/src/data/locales/pt/PageHeader.json +++ b/src/data/locales/pt/PageHeader.json @@ -33,7 +33,7 @@ "deals": "Confira suas ofertas atuais abaixo!", "dex": "Use o formulário abaixo para criar um pedido com limite no Bitshares DEX.", "featured": "Confira alguns desses mercados em destaque", - "index": "Esta ferramenta de código aberto pode criar várias operações Bitshares.", + "index": "Uma ferramenta para elaborar operações Bitshares!", "ltm": "Use o formulário abaixo para atualizar sua conta para uma assinatura vitalícia!", "offer": "O formulário abaixo é para aceitar uma oferta de crédito no Bitshares DEX.", "offereditor": "Use o formulário abaixo para criar/editar ofertas de crédito no Bitshares DEX.", @@ -44,7 +44,8 @@ "smartcoin": "Use o formulário abaixo para emitir dívida garantida", "smartcoins": "Use a interface abaixo para localizar um ativo para empréstimo", "stake": "Use este formulário para apostar seus ativos em pools de liquidez", - "transfer": "Use o formulário abaixo para transferir ativos para outros usuários do blockchain" + "transfer": "Use o formulário abaixo para transferir ativos para outros usuários do blockchain", + "nodes": "Conecte-se ao blockchain através de um nó de sua escolha" }, "back": "Volte", "usage": "Projetado para uso com ", diff --git a/src/data/locales/pt/SimpleSwap.json b/src/data/locales/pt/SimpleSwap.json new file mode 100644 index 0000000..9c404ea --- /dev/null +++ b/src/data/locales/pt/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "Troca de pool de liquidez Bitshares", + "description": "Troque facilmente entre ativos Bitshares usando um desses pools de liquidez criados pelo usuário.", + "loadingPoolData": "Carregando dados do pool...", + "loadingAssetData": "Carregando dados de ativos...", + "accountLabel": "Conta", + "liquidityPoolLabel": "Reserva de liquidez", + "foundPoolDetails": "Este é o pool de liquidez que você escolheu para sua troca de ativos", + "noPoolDetails": "Selecione um pool de liquidez para continuar com sua troca de ativos", + "selectPoolPlaceholder": "Selecione uma piscina..", + "searchButton": "Procurar", + "searchDialogTitle": "Procure um pool de liquidez", + "searchDialogDescription": "Selecione um resultado de pesquisa para prosseguir com a troca de ativos desejada.", + "swappableAssetsTab": "Ativos trocáveis", + "poolShareAssetTab": "Ativo de compartilhamento de pool", + "idColumnTitle": "EU IA", + "shareAssetColumnTitle": "Compartilhar ativo", + "assetAColumnTitle": "Ativo A", + "assetBColumnTitle": "Ativo B", + "takerFeeColumnTitle": "Taxa do tomador", + "swappable": "Trocável", + "amountToSwap": "Quantidade de {{symbol}} trocar", + "enterAmountToSwap": "Digite o valor de {{symbolA}} você quer trocar por {{symbolB}}", + "totalAmount": "Montante total", + "totalAmountDescription": "Esta é a quantidade {{symbolB}} você receberá em troca {{symbolA}}", + "poolFee": "Taxa de piscina", + "poolFeeDescription": "Esta é a taxa estimada que você pagará ao pool por esta troca", + "fee": "taxa", + "networkFee": "Taxa de rede", + "networkFeeDescription": "Este é o custo para transmitir sua operação de troca de pool no blockchain", + "feeCurrency": "BTS", + "rebate": "Desconto: {{rebate}} {{currency}} (aquisição)", + "submit": "Enviar", + "exchangeHeader": "Troca {{sellAmount}} {{symbolA}} para {{buyAmount}} {{symbolB}}", + "swapBuySell": "Trocar compra/venda", + "blocksightsPoolExplorer": "Explorador de piscina Blocksights", + "poolJsonButton": "Conjunto JSON", + "liquidityPoolJsonTitle": "JSON do pool de liquidez", + "liquidityPoolJsonDescription": "Confira os detalhes retornados pela rede para este pool", + "swappableAssetJsonButton": "JSON de ativo trocável", + "swappableAssetJsonTitle": "JSON de ativo trocável", + "swappableAssetJsonDescription": "Confira os detalhes retornados pela rede dos ativos trocáveis ​​deste pool", + "quoteAsset": "Cotar recurso", + "baseAsset": "Ativo básico", + "loading": "Carregando...", + "tradeOnDex": "Em vez disso, negocie no Dex?", + "market": "Mercado: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "Você pode criar manualmente ordens limitadas para pares de negociação de sua escolha no Bitshares DEX", + "purchaseStake": "Comprar participação neste pool?", + "shareAsset": "Compartilhar ativo: {{shareAsset}}", + "purchaseStakeDescription": "Receba o rendimento da taxa de swap ao longo do tempo ao possuir uma participação no pool por meio de uma ordem de limite de mercado.", + "stakeAssets": "Apostar ativos neste pool?", + "stakeAssetsDescription": "Ganhe taxas de swap sobre ativos apostados em pools de liquidez menos uma taxa de retirada definida para um pequeno pool.", + "borrowAssets": "Precisa emprestar alguns ativos?", + "borrowAssetsDescription": "Os usuários DEX emprestam ativos a taxas definidas pelo usuário. ", + "searchBorrowableAssets": "Pesquise por ativos para empréstimos", + "searchAcceptedCollateral": "Pesquise por material aceito", + "poolShareAsset": "Ativo de compartilhamento de pool", + "risksTitle": "Riscos associados às trocas de pool de liquidez", + "risksDescription": "Faça sua própria pesquisa sobre pools de liquidez e seus ativos trocáveis ​​antes de prosseguir.", + "liquidityPoolRisks": "Riscos do pool de liquidez", + "liquidityPoolRisk1": "Como os pools de liquidez são configurados pelo usuário, eles possuem propriedades altamente exclusivas e proprietários diferentes; ", + "liquidityPoolRisk2": "Como qualquer pessoa pode apostar fundos em ambos os lados do pool, a liquidez do pool é dinâmica. ", + "swappableAssetRisks": "Riscos de ativos trocáveis", + "swappableAssetRisk1": "Como os ativos do pool de liquidez podem ser propriedade do usuário", + "swappableAssetRisk2": "Se você tentar trocar ativos além dos ativos trocáveis ​​disponíveis, seu preço de swap sofrerá muito. ", + "swappableAssetRisk3": "O valor dos próprios ativos trocáveis ​​pode flutuar com base em fatores externos (volume Cex externo), bem como em fatores internos (emitente de ativos", + "exchange": "Intercâmbio", + "sendAsset": "Selecione um ativo.." +} diff --git a/src/data/locales/th/Home.json b/src/data/locales/th/Home.json index 41eaca7..6286bea 100644 --- a/src/data/locales/th/Home.json +++ b/src/data/locales/th/Home.json @@ -6,6 +6,19 @@ "hover2": "ให้ยืมสินทรัพย์ตามอัตราที่คุณกำหนด", "hover3": "ระบุหลักประกันและราคาสินเชื่อที่ยอมรับได้" }, + "nodes": { + "title": "🌐 โหนด", + "subtitle": "กำหนดค่าการเชื่อมต่อบล็อคเชน", + "hover1": "เชื่อมต่อกับโหนด Bitshares ที่คุณเลือก", + "hover2": "เพิ่ม/ลบโหนดในรายการการเชื่อมต่อของคุณ" + }, + "swap": { + "title": "🔄 สลับง่ายๆ", + "subtitle": "สลับสินทรัพย์ผ่านพูล", + "hover1": "สลับสินทรัพย์ผ่านกลุ่มสภาพคล่องที่ผู้ใช้สร้างขึ้น", + "hover2": "พูลมีคู่การซื้อขายและค่าธรรมเนียมที่แตกต่างกัน", + "hover3": "เรียบง่ายแต่มีราคาแพงกว่าคำสั่งจำกัด" + }, "pool": { "title": "💱 แลกสระน้ำ", "subtitle": "สลับสินทรัพย์ผ่านพูล", diff --git a/src/data/locales/th/Nodes.json b/src/data/locales/th/Nodes.json new file mode 100644 index 0000000..113bb03 --- /dev/null +++ b/src/data/locales/th/Nodes.json @@ -0,0 +1,8 @@ +{ + "cardTitle": "กำหนดค่าการเชื่อมต่อบล็อคเชนของคุณ", + "cardDescription": "เชื่อมต่อกับโหนด Bitshares ที่คุณเลือก", + "add": "เพิ่ม URL", + "reset": "รีเซ็ตการกำหนดค่าโหนด", + "none": "ไม่มีการกำหนดค่าโหนด โปรดระบุ URL ของโหนดเพื่อดำเนินการต่อ", + "addDescription": "เพิ่ม URL ของโหนดใหม่ในรายการโหนดของ blockchain นี้หรือไม่" + } \ No newline at end of file diff --git a/src/data/locales/th/PageHeader.json b/src/data/locales/th/PageHeader.json index 37c698a..1bfbf7b 100644 --- a/src/data/locales/th/PageHeader.json +++ b/src/data/locales/th/PageHeader.json @@ -33,7 +33,7 @@ "deals": "ตรวจสอบข้อเสนอปัจจุบันของคุณด้านล่าง!", "dex": "ใช้แบบฟอร์มด้านล่างเพื่อสร้างคำสั่งจำกัดบน Bitshares DEX", "featured": "ตรวจสอบตลาดที่โดดเด่นเหล่านี้", - "index": "เครื่องมือโอเพ่นซอร์สนี้สามารถสร้างการดำเนินการ Bitshares ได้หลายรายการ", + "index": "เครื่องมือสำหรับการสร้างการดำเนินงาน Bitshares!", "ltm": "ใช้แบบฟอร์มด้านล่างเพื่ออัปเกรดบัญชีของคุณเป็นสมาชิกตลอดชีพ!", "offer": "แบบฟอร์มด้านล่างนี้ใช้สำหรับรับข้อเสนอเครดิตใน Bitshares DEX", "offereditor": "ใช้แบบฟอร์มด้านล่างเพื่อสร้าง/แก้ไขข้อเสนอเครดิตใน Bitshares DEX", @@ -44,7 +44,8 @@ "smartcoin": "ใช้แบบฟอร์มด้านล่างเพื่อออกหนี้ที่มีหลักประกันให้เกิดขึ้น", "smartcoins": "ใช้อินเทอร์เฟซด้านล่างเพื่อค้นหาสินทรัพย์ที่จะยืมที่มีอยู่", "stake": "ใช้แบบฟอร์มนี้เพื่อเดิมพันสินทรัพย์ของคุณในกลุ่มสภาพคล่อง", - "transfer": "ใช้แบบฟอร์มด้านล่างเพื่อโอนสินทรัพย์ไปยังผู้ใช้บล็อคเชนรายอื่น" + "transfer": "ใช้แบบฟอร์มด้านล่างเพื่อโอนสินทรัพย์ไปยังผู้ใช้บล็อคเชนรายอื่น", + "nodes": "เชื่อมต่อกับบล็อคเชนผ่านโหนดที่คุณเลือก" }, "back": "กลับไป", "usage": "ออกแบบมาเพื่อใช้กับ ", diff --git a/src/data/locales/th/SimpleSwap.json b/src/data/locales/th/SimpleSwap.json new file mode 100644 index 0000000..f6e0abe --- /dev/null +++ b/src/data/locales/th/SimpleSwap.json @@ -0,0 +1,70 @@ +{ + "title": "การแลกเปลี่ยนสภาพคล่องของ Bitshares", + "description": "สลับระหว่างสินทรัพย์ Bitshares ได้อย่างง่ายดายโดยใช้หนึ่งในกลุ่มสภาพคล่องที่ผู้ใช้สร้างขึ้น", + "loadingPoolData": "กำลังโหลดข้อมูลพูล...", + "loadingAssetData": "กำลังโหลดข้อมูลเนื้อหา...", + "accountLabel": "บัญชี", + "liquidityPoolLabel": "แหล่งรวมสภาพคล่อง", + "foundPoolDetails": "นี่คือกลุ่มสภาพคล่องที่คุณเลือกสำหรับการแลกเปลี่ยนสินทรัพย์ของคุณ", + "noPoolDetails": "เลือกกลุ่มสภาพคล่องเพื่อดำเนินการแลกเปลี่ยนสินทรัพย์ของคุณต่อไป", + "selectPoolPlaceholder": "เลือกสระน้ำ..", + "searchButton": "ค้นหา", + "searchDialogTitle": "ค้นหาแหล่งรวมสภาพคล่อง", + "searchDialogDescription": "เลือกผลการค้นหาเพื่อดำเนินการแลกเปลี่ยนสินทรัพย์ที่คุณต้องการ", + "swappableAssetsTab": "สินทรัพย์ที่สับเปลี่ยนได้", + "poolShareAssetTab": "สินทรัพย์ส่วนแบ่งพูล", + "idColumnTitle": "บัตรประจำตัวประชาชน", + "shareAssetColumnTitle": "แบ่งปันเนื้อหา", + "assetAColumnTitle": "สินทรัพย์ ก", + "assetBColumnTitle": "สินทรัพย์ B", + "takerFeeColumnTitle": "ค่าธรรมเนียมผู้รับ", + "swappable": "ถอดเปลี่ยนได้", + "amountToSwap": "จำนวนของ {{symbol}} เพื่อแลกเปลี่ยน", + "enterAmountToSwap": "ใส่จำนวนเงิน {{symbolA}} คุณต้องการแลกเปลี่ยน {{symbolB}}", + "totalAmount": "จำนวนเงินทั้งหมด", + "totalAmountDescription": "นี่คือปริมาณของ {{symbolB}} คุณจะได้รับเป็นการตอบแทน {{symbolA}}", + "poolFee": "ค่าสระว่ายน้ำ", + "poolFeeDescription": "นี่คือค่าธรรมเนียมโดยประมาณที่คุณจะจ่ายให้กับพูลสำหรับการแลกเปลี่ยนนี้", + "fee": "ค่าธรรมเนียม", + "networkFee": "ค่าธรรมเนียมเครือข่าย", + "networkFeeDescription": "นี่คือค่าใช้จ่ายในการออกอากาศการดำเนินการแลกเปลี่ยนพูลของคุณไปยังบล็อคเชน", + "feeCurrency": "รถไฟฟ้า", + "rebate": "ส่วนลด: {{rebate}} {{currency}} (มอบสิทธิ)", + "submit": "ส่ง", + "exchangeHeader": "แลกเปลี่ยน {{sellAmount}} {{symbolA}} สำหรับ {{buyAmount}} {{symbolB}}", + "swapBuySell": "แลกซื้อ/ขาย", + "blocksightsPoolExplorer": "นักสำรวจสระว่ายน้ำ Blocksights", + "poolJsonButton": "พูล JSON", + "liquidityPoolJsonTitle": "JSON พูลสภาพคล่อง", + "liquidityPoolJsonDescription": "ตรวจสอบรายละเอียดที่เครือข่ายส่งคืนสำหรับพูลนี้", + "swappableAssetJsonButton": "JSON เนื้อหาที่สลับได้", + "swappableAssetJsonTitle": "JSON เนื้อหาที่สลับได้", + "swappableAssetJsonDescription": "ตรวจสอบรายละเอียดที่ส่งคืนโดยเครือข่ายสินทรัพย์ที่สลับได้ของพูลนี้", + "quoteAsset": "อ้างอิงสินทรัพย์", + "baseAsset": "สินทรัพย์ฐาน", + "loading": "กำลังโหลด...", + "tradeOnDex": "ซื้อขาย Dex แทนเหรอ?", + "market": "ตลาด: {{symbolA}}/{{symbolB}}", + "tradeOnDexDescription": "คุณสามารถสร้างคำสั่งจำกัดสำหรับคู่การซื้อขายที่คุณเลือกได้ด้วยตนเองบน Bitshares DEX", + "purchaseStake": "ซื้อหุ้นในกลุ่มนี้หรือไม่?", + "shareAsset": "แบ่งปันเนื้อหา: {{shareAsset}}", + "purchaseStakeDescription": "รับผลตอบแทนค่าธรรมเนียมการแลกเปลี่ยนเมื่อเวลาผ่านไปโดยการเป็นเจ้าของสัดส่วนการถือหุ้นในพูลผ่านคำสั่งที่จำกัดตลาด", + "stakeAssets": "เดิมพันสินทรัพย์ในกลุ่มนี้หรือไม่?", + "stakeAssetsDescription": "รับค่าธรรมเนียมการแลกเปลี่ยนสำหรับสินทรัพย์ที่เดิมพันในกลุ่มสภาพคล่อง ลบด้วยค่าธรรมเนียมการถอนที่กำหนดจำนวนเล็กน้อย", + "borrowAssets": "ต้องการยืมทรัพย์สินบางส่วนหรือไม่?", + "borrowAssetsDescription": "ผู้ใช้ DEX ให้ยืมสินทรัพย์ในอัตราที่ผู้ใช้กำหนด ", + "searchBorrowableAssets": "ค้นหาตามสินทรัพย์ที่ยืมได้", + "searchAcceptedCollateral": "ค้นหาตามหลักประกันที่ยอมรับ", + "poolShareAsset": "สินทรัพย์ส่วนแบ่งพูล", + "risksTitle": "ความเสี่ยงที่เกี่ยวข้องกับการแลกเปลี่ยนสภาพคล่อง", + "risksDescription": "โปรดทำวิจัยของคุณเองเกี่ยวกับกลุ่มสภาพคล่องและสินทรัพย์ที่ถอดเปลี่ยนได้ก่อนดำเนินการต่อ", + "liquidityPoolRisks": "ความเสี่ยงด้านสภาพคล่อง", + "liquidityPoolRisk1": "เนื่องจากกลุ่มสภาพคล่องได้รับการกำหนดค่าโดยผู้ใช้ จึงมีคุณสมบัติเฉพาะตัวสูงและเจ้าของที่แตกต่างกัน ", + "liquidityPoolRisk2": "เนื่องจากใครๆ ก็สามารถเดิมพันเงินลงทั้งสองฝั่งของพูลได้ สภาพคล่องของพูลจึงเป็นแบบไดนามิก ", + "swappableAssetRisks": "ความเสี่ยงด้านสินทรัพย์แบบถอดเปลี่ยนได้", + "swappableAssetRisk1": "เนื่องจากสินทรัพย์รวมสภาพคล่องสามารถเป็นเจ้าของได้", + "swappableAssetRisk2": "หากคุณพยายามที่จะแลกเปลี่ยนสินทรัพย์เกินกว่าสินทรัพย์ที่สามารถแลกเปลี่ยนได้ ราคาสวอปของคุณจะได้รับผลกระทบอย่างมาก ", + "swappableAssetRisk3": "มูลค่าของสินทรัพย์ที่สับเปลี่ยนได้นั้นสามารถผันผวนตามปัจจัยภายนอก (ปริมาณ cex ภายนอก) รวมถึงปัจจัยภายใน (ผู้ออกสินทรัพย์", + "exchange": "แลกเปลี่ยน", + "sendAsset": "เลือกสินทรัพย์.." +} diff --git a/src/lib/i18n.js b/src/lib/i18n.js index 9ea8fae..ef21208 100644 --- a/src/lib/i18n.js +++ b/src/lib/i18n.js @@ -39,21 +39,15 @@ const pages = [ "Smartcoin", "Smartcoins", "Transfer", + "Nodes", + "SimpleSwap" ]; const locale = persistentAtom("locale", "en"); -const storedLocale = persistentAtom("storedLocale", ""); async function fetchTranslations() { - const _stored = storedLocale.get(); - const _parsed = _stored ? JSON.parse(_stored) : null; const _locale = locale.get(); - if (_parsed && _parsed.locale && _parsed.locale === _locale) { - console.log(`Using cached ${locale.get()} translations`); - return _parsed.translations; - } - const translations = {}; const localPages = {}; for (const page of pages) { @@ -71,7 +65,6 @@ async function fetchTranslations() { translations[_locale] = localPages; - storedLocale.set(JSON.stringify({ translations, locale: _locale })); return translations; } diff --git a/src/pages/nodes.astro b/src/pages/nodes.astro new file mode 100644 index 0000000..a19537c --- /dev/null +++ b/src/pages/nodes.astro @@ -0,0 +1,27 @@ +--- +import Layout from '../layouts/Layout.astro'; +import Nodes from '../components/Nodes.jsx'; +import PageHeader from '../components/PageHeader'; +import PageFooter from '../components/PageFooter'; +--- + + +
+ + + +
+
+ + \ No newline at end of file diff --git a/src/pages/swap.astro b/src/pages/swap.astro new file mode 100644 index 0000000..784bf97 --- /dev/null +++ b/src/pages/swap.astro @@ -0,0 +1,27 @@ +--- +import Layout from '../layouts/Layout.astro'; +import SimpleSwap from '../components/SimpleSwap.jsx'; +import PageHeader from '../components/PageHeader'; +import PageFooter from '../components/PageFooter'; +--- + + +
+ + + +
+
+ + \ No newline at end of file diff --git a/src/stores/node.ts b/src/stores/node.ts index b6e7ffd..8510be6 100644 --- a/src/stores/node.ts +++ b/src/stores/node.ts @@ -1,5 +1,6 @@ import { map } from "nanostores"; import { chains } from "@/config/chains"; +import { persistentMap } from "@nanostores/persistent"; type Node = { url: string; @@ -9,10 +10,48 @@ type Node = { const $currentNode = map({ url: "", chain: "" }); function setCurrentNode(chain: string, url?: string) { - if (!(chains as any)[chain] || !(chains as any)[chain].nodeList.find((node: any) => node.url === url)) { + if (!(chains as any)[chain] || url && !(chains as any)[chain].nodeList.find((node: any) => node.url === url)) { return; // block invalid nodes } + $currentNode.set({ chain, url: url ?? (chains as any)[chain].nodeList[0].url }); } -export { $currentNode, setCurrentNode }; +type InitNodes = { + url: string; +} + +type StoredNodes = { + bitshares: InitNodes[]; + bitshares_testnet: InitNodes[]; +} + +const $nodes = persistentMap( + "nodes", + { + bitshares: chains["bitshares"].nodeList, + bitshares_testnet: chains["bitshares_testnet"].nodeList, + }, + { + encode(value) { + return JSON.stringify(value); + }, + decode(value) { + try { + return JSON.parse(value); + } catch (e) { + console.log(e); + return value; + } + }, + } +); + +function updateNodes(chain: string, nodes: InitNodes[]) { + if (!(chains as any)[chain]) { + return; // block invalid chains + } + $nodes.set({ ...$nodes.get(), [chain]: nodes }); +} + +export { $currentNode, $nodes, setCurrentNode, updateNodes }; diff --git a/src/stores/users.ts b/src/stores/users.ts index 6166d94..985f95b 100644 --- a/src/stores/users.ts +++ b/src/stores/users.ts @@ -1,6 +1,8 @@ import { map } from "nanostores"; import { persistentMap } from "@nanostores/persistent"; +import { setCurrentNode } from "@/stores/node"; + type User = { username: string; id: string; @@ -38,6 +40,8 @@ function setCurrentUser(username: string, id: string, referrer: string, chain: s } catch (e) { console.log(e); } + + setCurrentNode(chain); } function eraseCurrentUser() {