From cddca26f81e63e2e1d3c59bbe24e9733956ff186 Mon Sep 17 00:00:00 2001 From: Stan Bondi Date: Mon, 24 Jun 2024 11:10:51 +0200 Subject: [PATCH] chore: run prettier on walletd webui --- .github/workflows/ci.yml | 2 +- .prettierrc => .prettierrc.mjs | 6 +- .../tari_dan_wallet_web_ui/.prettierrc.js | 3 + .../tari_dan_wallet_web_ui/package-lock.json | 22 +- .../tari_dan_wallet_web_ui/package.json | 5 +- .../src/Components/Accordion.tsx | 6 +- .../Components/ConnectorLink/Permissions.tsx | 18 +- .../src/Components/NFTList.tsx | 8 +- .../src/Components/StyledComponents.ts | 4 +- .../src/api/hooks/useAccounts.tsx | 20 +- .../routes/AssetVault/Components/Assets.tsx | 25 +- .../AssetVault/Components/SendMoney.tsx | 26 +- .../Settings/Components/SettingsTabs.tsx | 2 +- .../routes/Transactions/FeeInstructions.tsx | 105 ++- .../Transactions/TransactionDetails.tsx | 610 +++++++++--------- .../tari_dan_wallet_web_ui/src/utils/cbor.ts | 9 +- .../src/utils/helpers.tsx | 7 +- .../src/utils/json_rpc.tsx | 232 ++++--- .../tari_dan_wallet_web_ui/tsconfig.json | 4 +- 19 files changed, 549 insertions(+), 565 deletions(-) rename .prettierrc => .prettierrc.mjs (85%) create mode 100644 applications/tari_dan_wallet_web_ui/.prettierrc.js diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ef10df06d..0819e3f8c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: - name: prettier run: | - npx prettier --check "./applications/{tari_validator_node_web_ui,tari_indexer_web_ui,tari_dan_wallet_web_ui}/src/*.{ts,tsx,css,json}" + npx prettier --check "./applications/{tari_validator_node_web_ui,tari_indexer_web_ui,tari_dan_wallet_web_ui}/src/*.{ts,tsx,json}" clippy: name: clippy diff --git a/.prettierrc b/.prettierrc.mjs similarity index 85% rename from .prettierrc rename to .prettierrc.mjs index ea37ecbea3..1ed427b530 100644 --- a/.prettierrc +++ b/.prettierrc.mjs @@ -1,4 +1,4 @@ -{ +export default { "printWidth": 120, "tabWidth": 2, "useTabs": false, @@ -9,5 +9,5 @@ "bracketSpacing": true, "bracketSameLine": false, "arrowParens": "always", - "endOfLine": "lf" -} + "endOfLine": "lf", +}; diff --git a/applications/tari_dan_wallet_web_ui/.prettierrc.js b/applications/tari_dan_wallet_web_ui/.prettierrc.js new file mode 100644 index 0000000000..e8cd822a47 --- /dev/null +++ b/applications/tari_dan_wallet_web_ui/.prettierrc.js @@ -0,0 +1,3 @@ +import base from "../../.prettierrc.mjs"; + +export default base; \ No newline at end of file diff --git a/applications/tari_dan_wallet_web_ui/package-lock.json b/applications/tari_dan_wallet_web_ui/package-lock.json index 329635f757..dc1e2966fa 100644 --- a/applications/tari_dan_wallet_web_ui/package-lock.json +++ b/applications/tari_dan_wallet_web_ui/package-lock.json @@ -31,13 +31,14 @@ "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react-swc": "^3.0.0", + "prettier": "^3.3.2", "typescript": "^4.9.3", "vite": "^4.5.3" } }, "../../bindings": { "name": "@tariproject/typescript-bindings", - "version": "1.0.0", + "version": "1.0.1", "license": "ISC", "devDependencies": { "shx": "^0.3.4", @@ -46,10 +47,10 @@ }, "../../clients/javascript/wallet_daemon_client": { "name": "@tariproject/wallet_jrpc_client", - "version": "1.0.0", + "version": "1.0.5", "license": "ISC", "dependencies": { - "@tariproject/typescript-bindings": "file:../../../bindings" + "@tariproject/typescript-bindings": "1.0.1" }, "devDependencies": { "typescript": "^5.3.3" @@ -1696,6 +1697,21 @@ "node": "^10 || ^12 || >=14" } }, + "node_modules/prettier": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.2.tgz", + "integrity": "sha512-rAVeHYMcv8ATV5d508CFdn+8/pHPpXeIid1DdrPwXnaAdH7cqjVbpJaT5eq4yRAFU/lsbwYwSF/n5iNrdJHPQA==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/applications/tari_dan_wallet_web_ui/package.json b/applications/tari_dan_wallet_web_ui/package.json index 4acc550ee8..e896cff68f 100644 --- a/applications/tari_dan_wallet_web_ui/package.json +++ b/applications/tari_dan_wallet_web_ui/package.json @@ -16,13 +16,13 @@ "@mui/x-data-grid": "^6.0.2", "@tanstack/react-query": "^4.33.0", "@tanstack/react-query-devtools": "^4.33.0", + "@tariproject/typescript-bindings": "file:../../bindings", + "@tariproject/wallet_daemon_client": "file:../../clients/javascript/wallet_daemon_client", "file-saver": "^2.0.5", "react": "^18.2.0", "react-dom": "^18.2.0", "react-icons": "^4.9.0", "react-router-dom": "^6.9.0", - "@tariproject/typescript-bindings": "file:../../bindings", - "@tariproject/wallet_daemon_client": "file:../../clients/javascript/wallet_daemon_client", "use-react-router-breadcrumbs": "^4.0.1", "zustand": "^4.4.1", "zustand-persist": "^0.1.6" @@ -32,6 +32,7 @@ "@types/react": "^18.0.28", "@types/react-dom": "^18.0.11", "@vitejs/plugin-react-swc": "^3.0.0", + "prettier": "^3.3.2", "typescript": "^4.9.3", "vite": "^4.5.3" } diff --git a/applications/tari_dan_wallet_web_ui/src/Components/Accordion.tsx b/applications/tari_dan_wallet_web_ui/src/Components/Accordion.tsx index 10675d5add..02a841cc4b 100644 --- a/applications/tari_dan_wallet_web_ui/src/Components/Accordion.tsx +++ b/applications/tari_dan_wallet_web_ui/src/Components/Accordion.tsx @@ -29,7 +29,7 @@ import MuiAccordionDetails from "@mui/material/AccordionDetails"; export const Accordion = styled((props: AccordionProps) => ( ))(({ theme }) => ({ - border: `2px solid ${theme.palette.background.paper}`, + "border": `2px solid ${theme.palette.background.paper}`, "&:not(:last-child)": { borderBottom: 0, }, @@ -41,8 +41,8 @@ export const Accordion = styled((props: AccordionProps) => ( export const AccordionSummary = styled((props: AccordionSummaryProps) => ( } {...props} /> ))(({ theme }) => ({ - backgroundColor: theme.palette.divider, - flexDirection: "row-reverse", + "backgroundColor": theme.palette.divider, + "flexDirection": "row-reverse", "& .MuiAccordionSummary-expandIconWrapper.Mui-expanded": { transform: "rotate(90deg)", }, diff --git a/applications/tari_dan_wallet_web_ui/src/Components/ConnectorLink/Permissions.tsx b/applications/tari_dan_wallet_web_ui/src/Components/ConnectorLink/Permissions.tsx index 17d533ed1d..2f798dc716 100644 --- a/applications/tari_dan_wallet_web_ui/src/Components/ConnectorLink/Permissions.tsx +++ b/applications/tari_dan_wallet_web_ui/src/Components/ConnectorLink/Permissions.tsx @@ -36,11 +36,7 @@ export default function Permissions(props: { optionalPermissions: TariPermission[]; setOptionalPermissions: any; }) { - const { - requiredPermissions, - optionalPermissions, - setOptionalPermissions, - } = props; + const { requiredPermissions, optionalPermissions, setOptionalPermissions } = props; const [permissions, setPermissions] = useState( optionalPermissions.map((permission, index) => { return { id: index, name: permission.toString(), checked: true }; @@ -71,7 +67,7 @@ export default function Permissions(props: { - {requiredPermissions.map((permission, i) => + {requiredPermissions.map((permission, i) => ( } @@ -81,11 +77,11 @@ export default function Permissions(props: { className="permissions-switch" /> - , - )} + + ))} - {permissions.map(({ checked, name, id }, i) => + {permissions.map(({ checked, name, id }, i) => ( handleChange(id)} name={name} value={name} />} @@ -95,8 +91,8 @@ export default function Permissions(props: { className="permissions-switch" /> - , - )} + + ))} You may be sharing sensitive information with this site. Approve or deny access above. diff --git a/applications/tari_dan_wallet_web_ui/src/Components/NFTList.tsx b/applications/tari_dan_wallet_web_ui/src/Components/NFTList.tsx index 2a318dbb2a..58ee2b5d91 100644 --- a/applications/tari_dan_wallet_web_ui/src/Components/NFTList.tsx +++ b/applications/tari_dan_wallet_web_ui/src/Components/NFTList.tsx @@ -64,7 +64,6 @@ function displayNftId(nftId: NonFungibleId) { return `String:${nftId.String}`; } - return JSON.stringify(nftId); } @@ -76,12 +75,7 @@ export interface NftListProps { } export default function NFTList(props: NftListProps) { - const { - nftsListIsError, - nftsListIsFetching, - nftsListError, - nftsListData, - } = props; + const { nftsListIsError, nftsListIsFetching, nftsListError, nftsListData } = props; if (nftsListIsError || nftsListIsFetching) { ({ - backgroundColor: theme.palette.divider, - color: theme.palette.primary.main, + "backgroundColor": theme.palette.divider, + "color": theme.palette.primary.main, "&:hover": { backgroundColor: theme.palette.primary.main, color: "#fff", diff --git a/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx b/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx index 5918a8c92d..f3237efbab 100644 --- a/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx +++ b/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx @@ -128,16 +128,15 @@ export const useAccountsTransfer = ( }; export const useAccountsCreateFreeTestCoins = () => { - const createFreeTestCoins = async ( - { - accountName, - amount, - fee, - }: { - accountName: string | null; - amount: number; - fee: number | null; - }) => { + const createFreeTestCoins = async ({ + accountName, + amount, + fee, + }: { + accountName: string | null; + amount: number; + fee: number | null; + }) => { const result = await accountsCreateFreeTestCoins({ account: (accountName && { Name: accountName }) || null, amount, @@ -168,7 +167,6 @@ export const useAccountsList = (offset: number, limit: number) => { }); }; - export const useAccountsGetBalances = (accountName: string, refresh: boolean = false) => { return useQuery({ queryKey: ["accounts_balances"], diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx index ca3bdbfe20..431fd7b487 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx @@ -60,15 +60,8 @@ interface BalanceRowProps { } function BalanceRow(props: BalanceRowProps) { - const { - token_symbol, - resource_address, - resource_type, - balance, - confidential_balance, - vault_address, - onSendClicked, - } = props; + const { token_symbol, resource_address, resource_type, balance, confidential_balance, vault_address, onSendClicked } = + props; const { showBalance } = useAccountStore(); return ( @@ -79,11 +72,7 @@ function BalanceRow(props: BalanceRowProps) { {resource_type} {showBalance ? balance : "*************"} - + - - - - - - - Fee Instructions - - - {data.transaction?.fee_instructions?.length ? ( - - ) : ( - Empty - )} - - - - - Instructions - - - {data.transaction?.instructions?.length ? ( - - ) : ( - Empty - )} - - - {data.result && ( - - - Events - - - - - - )} - {data.result && ( - - - Logs - - - - - - )} - {data.result && ( - - - Substates - - - - - - )} - - - Signers - - - {data.transaction?.signatures?.length ? ( - - - - {data.transaction.signatures.map((item: TransactionSignature, i: number) => { - return {item.public_key} - })} - -
-
- ) : ( - Empty - )} -
-
- - - ); + return "Unknown reason"; + }; + return getReasonString(reason); }; - return ( + if (data.status === "Rejected" || data.status === "InvalidTransaction") { + return ( <> - - Transaction Details - - - {renderContent()} - + + + + + Transaction Hash + {data.transaction.id} + + + Timestamp + {last_update_time.toLocaleString()} + + + Status + + + + + + JSON + + + + + + Reason + {getTransactionFailure(data?.result?.result)} + + +
+
+ ); + } + + return ( + +
+ <> + + + + + Transaction Hash + {data.transaction.id} + + + Timestamp + {last_update_time.toLocaleString()} + + + Total Fees + {data?.result?.fee_receipt.total_fees_paid || 0} + + + Status + + + + + + Result + {renderResult(data?.result)} + + + JSON + + + + + {data?.result?.result ? ( + + Reason + {getTransactionFailure(data?.result?.result)} + + ) : null} + +
+
+
+ More Info +
+ + +
+
+ + + + Fee Instructions + + + {data.transaction?.fee_instructions?.length ? ( + + ) : ( + Empty + )} + + + + + Instructions + + + {data.transaction?.instructions?.length ? ( + + ) : ( + Empty + )} + + + {data.result && ( + + + Events + + + + + + )} + {data.result && ( + + + Logs + + + + + + )} + {data.result && ( + + + Substates + + + + + + )} + + + Signers + + + {data.transaction?.signatures?.length ? ( + + + + {data.transaction.signatures.map((item: TransactionSignature, i: number) => { + return ( + + {item.public_key} + + ); + })} + +
+
+ ) : ( + Empty + )} +
+
+
+
); -} + }; + return ( + <> + + Transaction Details + + + {renderContent()} + + + ); +} diff --git a/applications/tari_dan_wallet_web_ui/src/utils/cbor.ts b/applications/tari_dan_wallet_web_ui/src/utils/cbor.ts index b82c393753..b21dcc0714 100644 --- a/applications/tari_dan_wallet_web_ui/src/utils/cbor.ts +++ b/applications/tari_dan_wallet_web_ui/src/utils/cbor.ts @@ -1,7 +1,6 @@ // Copyright 2024 The Tari Project // SPDX-License-Identifier: BSD-3-Clause - export function getValueByPath(cborRepr: object, path: string): any { let value = cborRepr; for (const part of path.split(".")) { @@ -64,10 +63,9 @@ export function convertCborValue(value: any): any { return value; } - function bytesToAddressString(type: String, tag: ArrayLike): string { - const hex = Array.from(tag, function(byte) { - return ("0" + (byte & 0xFF).toString(16)).slice(-2); + const hex = Array.from(tag, function (byte) { + return ("0" + (byte & 0xff).toString(16)).slice(-2); }).join(""); return `${type}_${hex}`; @@ -86,7 +84,6 @@ export function convertTaggedValueToString(tag: number, value: any): string | an } } - enum BinaryTag { ComponentAddress = 128, Metadata = 129, @@ -95,4 +92,4 @@ enum BinaryTag { VaultId = 132, TransactionReceipt = 134, FeeClaim = 135, -} \ No newline at end of file +} diff --git a/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx b/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx index 77633e8eff..0d05cf52f3 100644 --- a/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx +++ b/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx @@ -121,7 +121,11 @@ export function emptyRows( return page > 0 ? Math.max(0, (1 + page) * rowsPerPage - array.length) : 0; } -export function handleChangePage(event: unknown, newPage: number, setPage: React.Dispatch>) { +export function handleChangePage( + event: unknown, + newPage: number, + setPage: React.Dispatch>, +) { setPage(newPage); } @@ -133,4 +137,3 @@ export function handleChangeRowsPerPage( setRowsPerPage(parseInt(event.target.value, 10)); setPage(0); } - diff --git a/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx b/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx index 01fa7449ec..c66dfa47af 100644 --- a/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx +++ b/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx @@ -21,58 +21,59 @@ // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import type { - AccountGetRequest, - AccountGetResponse, - AccountSetDefaultRequest, - AccountSetDefaultResponse, - AccountsCreateFreeTestCoinsRequest, - AccountsCreateFreeTestCoinsResponse, - AccountsCreateRequest, - AccountsCreateResponse, - AccountsGetBalancesRequest, - AccountsGetBalancesResponse, - AccountsListRequest, - AccountsListResponse, - AuthGetAllJwtRequest, - AuthGetAllJwtResponse, - AuthRevokeTokenRequest, - AuthRevokeTokenResponse, - ClaimBurnRequest, - ClaimBurnResponse, - ClaimValidatorFeesRequest, - ClaimValidatorFeesResponse, - ConfidentialTransferRequest, - ConfidentialTransferResponse, - ConfidentialViewVaultBalanceRequest, - ConfidentialViewVaultBalanceResponse, - KeysCreateRequest, - KeysCreateResponse, - KeysListRequest, - KeysListResponse, - KeysSetActiveRequest, - KeysSetActiveResponse, - ListAccountNftRequest, - ListAccountNftResponse, - RevealFundsRequest, - RevealFundsResponse, - SettingsGetResponse, - SettingsSetRequest, - SettingsSetResponse, - TransactionGetAllRequest, - TransactionGetAllResponse, - TransactionGetRequest, - TransactionGetResponse, - TransactionGetResultRequest, - TransactionGetResultResponse, - TransactionSubmitRequest, - TransactionSubmitResponse, - TransactionWaitResultRequest, - TransactionWaitResultResponse, - WebRtcStartRequest, - WebRtcStartResponse, AccountsTransferRequest, AccountsTransferResponse, + AccountGetRequest, + AccountGetResponse, + AccountSetDefaultRequest, + AccountSetDefaultResponse, + AccountsCreateFreeTestCoinsRequest, + AccountsCreateFreeTestCoinsResponse, + AccountsCreateRequest, + AccountsCreateResponse, + AccountsGetBalancesRequest, + AccountsGetBalancesResponse, + AccountsListRequest, + AccountsListResponse, + AuthGetAllJwtRequest, + AuthGetAllJwtResponse, + AuthRevokeTokenRequest, + AuthRevokeTokenResponse, + ClaimBurnRequest, + ClaimBurnResponse, + ClaimValidatorFeesRequest, + ClaimValidatorFeesResponse, + ConfidentialTransferRequest, + ConfidentialTransferResponse, + ConfidentialViewVaultBalanceRequest, + ConfidentialViewVaultBalanceResponse, + KeysCreateRequest, + KeysCreateResponse, + KeysListRequest, + KeysListResponse, + KeysSetActiveRequest, + KeysSetActiveResponse, + ListAccountNftRequest, + ListAccountNftResponse, + RevealFundsRequest, + RevealFundsResponse, + SettingsGetResponse, + SettingsSetRequest, + SettingsSetResponse, + TransactionGetAllRequest, + TransactionGetAllResponse, + TransactionGetRequest, + TransactionGetResponse, + TransactionGetResultRequest, + TransactionGetResultResponse, + TransactionSubmitRequest, + TransactionSubmitResponse, + TransactionWaitResultRequest, + TransactionWaitResultResponse, + WebRtcStartRequest, + WebRtcStartResponse, + AccountsTransferRequest, + AccountsTransferResponse, } from "@tariproject/typescript-bindings/wallet-daemon-client"; -import {WalletDaemonClient} from "@tariproject/wallet_daemon_client"; - +import { WalletDaemonClient } from "@tariproject/wallet_daemon_client"; let clientInstance: WalletDaemonClient | null = null; let pendingClientInstance: Promise | null = null; @@ -80,127 +81,118 @@ let outerAddress: URL | null = null; const DEFAULT_WALLET_ADDRESS = new URL(import.meta.env.VITE_DAEMON_JRPC_ADDRESS || "http://localhost:9000"); export async function getClientAddress(): Promise { - try { - let resp = await fetch("/json_rpc_address"); - if (resp.status === 200) { - return new URL(await resp.text()); - } - } catch (e) { - console.warn(e); + try { + let resp = await fetch("/json_rpc_address"); + if (resp.status === 200) { + return new URL(await resp.text()); } + } catch (e) { + console.warn(e); + } - return DEFAULT_WALLET_ADDRESS; + return DEFAULT_WALLET_ADDRESS; } async function client() { - if (pendingClientInstance) { - return pendingClientInstance; - } - if (clientInstance) { - if (!clientInstance.isAuthenticated()) { - return authenticateClient(clientInstance).then(() => clientInstance!); - } - return Promise.resolve(clientInstance); - } - - const getAddress = (!outerAddress) ? - getClientAddress() : - Promise.resolve(DEFAULT_WALLET_ADDRESS); - - pendingClientInstance = getAddress - .then(async (addr) => { - const client = WalletDaemonClient.usingFetchTransport(addr.toString()); - await authenticateClient(client); - outerAddress = addr; - clientInstance = client; - pendingClientInstance = null; - return client; - }); + if (pendingClientInstance) { return pendingClientInstance; + } + if (clientInstance) { + if (!clientInstance.isAuthenticated()) { + return authenticateClient(clientInstance).then(() => clientInstance!); + } + return Promise.resolve(clientInstance); + } + + const getAddress = !outerAddress ? getClientAddress() : Promise.resolve(DEFAULT_WALLET_ADDRESS); + + pendingClientInstance = getAddress.then(async (addr) => { + const client = WalletDaemonClient.usingFetchTransport(addr.toString()); + await authenticateClient(client); + outerAddress = addr; + clientInstance = client; + pendingClientInstance = null; + return client; + }); + return pendingClientInstance; } async function authenticateClient(client: WalletDaemonClient) { - const auth_token = await client.authRequest(["Admin"]); - await client.authAccept(auth_token, auth_token); + const auth_token = await client.authRequest(["Admin"]); + await client.authAccept(auth_token, auth_token); } - export const authRevoke = (request: AuthRevokeTokenRequest): Promise => - client().then((c) => c.authRevoke(request)); + client().then((c) => c.authRevoke(request)); export const authGetAllJwt = (request: AuthGetAllJwtRequest): Promise => - client().then((c) => c.authGetAllJwt(request)); + client().then((c) => c.authGetAllJwt(request)); // settings -export const settingsGet = (): Promise => - client().then((c) => c.settingsGet()); +export const settingsGet = (): Promise => client().then((c) => c.settingsGet()); export const settingsSet = (request: SettingsSetRequest): Promise => - client().then((c) => c.settingsSet(request)); + client().then((c) => c.settingsSet(request)); // webrtc export const webrtcStart = (request: WebRtcStartRequest): Promise => - client().then((c) => c.webrtcStart(request)); + client().then((c) => c.webrtcStart(request)); // rpc -export const rpcDiscover = (): Promise => - client().then((c) => c.rpcDiscover()); +export const rpcDiscover = (): Promise => client().then((c) => c.rpcDiscover()); // keys export const keysCreate = (request: KeysCreateRequest): Promise => - client().then((c) => c.createKey(request)); + client().then((c) => c.createKey(request)); export const keysList = (request: KeysListRequest): Promise => - client().then((c) => c.listKeys(request)); + client().then((c) => c.listKeys(request)); export const keysSetActive = (request: KeysSetActiveRequest): Promise => - client().then((c) => c.keysSetActive(request)); + client().then((c) => c.keysSetActive(request)); export const transactionsSubmit = (request: TransactionSubmitRequest): Promise => - client().then((c) => c.submitTransaction(request)); + client().then((c) => c.submitTransaction(request)); export const transactionsGet = (request: TransactionGetRequest): Promise => - client().then((c) => c.transactionsGet(request)); + client().then((c) => c.transactionsGet(request)); export const transactionsGetResult = (request: TransactionGetResultRequest): Promise => - client().then((c) => c.getTransactionResult(request)); + client().then((c) => c.getTransactionResult(request)); export const transactionsWaitResult = (request: TransactionWaitResultRequest): Promise => - client().then((c) => c.waitForTransactionResult(request)); + client().then((c) => c.waitForTransactionResult(request)); export const transactionsGetAll = (request: TransactionGetAllRequest): Promise => - client().then((c) => c.transactionsList(request)); + client().then((c) => c.transactionsList(request)); // accounts export const accountsRevealFunds = (request: RevealFundsRequest): Promise => - client().then((c) => c.accountsRevealFunds(request)); + client().then((c) => c.accountsRevealFunds(request)); export const accountsClaimBurn = (request: ClaimBurnRequest): Promise => - client().then((c) => c.accountsClaimBurn(request)); + client().then((c) => c.accountsClaimBurn(request)); export const accountsCreate = (request: AccountsCreateRequest): Promise => - client().then((c) => c.accountsCreate(request)); + client().then((c) => c.accountsCreate(request)); export const accountsList = (request: AccountsListRequest): Promise => - client().then((c) => c.accountsList(request)); + client().then((c) => c.accountsList(request)); export const accountsGetBalances = (request: AccountsGetBalancesRequest): Promise => - client().then((c) => c.accountsGetBalances(request)); + client().then((c) => c.accountsGetBalances(request)); export const accountsGet = (request: AccountGetRequest): Promise => - client().then((c) => c.accountsGet(request)); + client().then((c) => c.accountsGet(request)); export const accountsTransfer = (request: AccountsTransferRequest): Promise => - client().then((c) => c.accountsTransfer(request)); + client().then((c) => c.accountsTransfer(request)); export const accountsConfidentialTransfer = ( - request: ConfidentialTransferRequest, -): Promise => - client().then((c) => c.confidentialTransfer(request)); + request: ConfidentialTransferRequest, +): Promise => client().then((c) => c.confidentialTransfer(request)); export const accountsSetDefault = (request: AccountSetDefaultRequest): Promise => - client().then((c) => c.accountsSetDefault(request)); + client().then((c) => c.accountsSetDefault(request)); export const accountsCreateFreeTestCoins = ( - request: AccountsCreateFreeTestCoinsRequest, -): Promise => - client().then((c) => c.createFreeTestCoins(request)); + request: AccountsCreateFreeTestCoinsRequest, +): Promise => client().then((c) => c.createFreeTestCoins(request)); // confidential export const confidentialViewVaultBalance = ( - request: ConfidentialViewVaultBalanceRequest, -): Promise => - client().then((c) => c.viewVaultBalance(request)); + request: ConfidentialViewVaultBalanceRequest, +): Promise => client().then((c) => c.viewVaultBalance(request)); // nfts export const nftList = (request: ListAccountNftRequest): Promise => - client().then((c) => c.nftsList(request)); + client().then((c) => c.nftsList(request)); // validators export const validatorsClaimFees = (request: ClaimValidatorFeesRequest): Promise => - client().then((c) => c.validatorsClaimFees(request)); + client().then((c) => c.validatorsClaimFees(request)); diff --git a/applications/tari_dan_wallet_web_ui/tsconfig.json b/applications/tari_dan_wallet_web_ui/tsconfig.json index 6030032894..c7f106ba7e 100644 --- a/applications/tari_dan_wallet_web_ui/tsconfig.json +++ b/applications/tari_dan_wallet_web_ui/tsconfig.json @@ -14,8 +14,8 @@ "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, - "jsx": "react-jsx", + "jsx": "react-jsx" }, "include": ["src", "../../bindings/**/*"], - "references": [{ "path": "./tsconfig.node.json" }], + "references": [{ "path": "./tsconfig.node.json" }] }