Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/tari-project/tari-dan
Browse files Browse the repository at this point in the history
…into walletconnect
  • Loading branch information
mrnaveira committed Jul 25, 2024
1 parent 72d45a1 commit 89878f7
Show file tree
Hide file tree
Showing 65 changed files with 585 additions and 972 deletions.
1,279 changes: 455 additions & 824 deletions applications/tari_dan_wallet_web_ui/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions applications/tari_dan_wallet_web_ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"@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",
"@tari-project/typescript-bindings": "file:../../bindings",
"@tari-project/wallet_daemon_client": "file:../../clients/javascript/wallet_daemon_client",
"@walletconnect/core": "^2.13.3",
"@walletconnect/web3wallet": "^1.12.3",
"file-saver": "^2.0.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
import React from "react";
import FetchStatusCheck from "./FetchStatusCheck";
import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from "@mui/material";
import type { ListAccountNftResponse } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { ListAccountNftResponse } from "@tari-project/typescript-bindings/wallet-daemon-client";
import type { apiError } from "../api/helpers/types";
import { DataTableCell } from "./StyledComponents";
import { renderJson, toHexString } from "../utils/helpers";
import { IoCheckmarkOutline, IoCloseOutline } from "react-icons/io5";
import type { NonFungibleId, NonFungibleToken } from "@tariproject/typescript-bindings";
import type { NonFungibleId, NonFungibleToken } from "@tari-project/typescript-bindings";
import { convertCborValue } from "../utils/cbor";

function NftsList({ nft }: { nft: NonFungibleToken }) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import { Chip, Avatar } from "@mui/material";
import { IoCheckmarkOutline, IoDiamondOutline, IoReload, IoHourglassOutline, IoCloseOutline } from "react-icons/io5";
import { useTheme } from "@mui/material/styles";
import type { TransactionStatus } from "@tariproject/typescript-bindings";
import type { TransactionStatus } from "@tari-project/typescript-bindings";

interface StatusChipProps {
status: TransactionStatus;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import {
} from "../../utils/json_rpc";
import { apiError } from "../helpers/types";
import queryClient from "../queryClient";
import type { ComponentAccessRules, ConfidentialTransferInputSelection } from "@tariproject/typescript-bindings";
import type { ComponentAddressOrName } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { ComponentAccessRules, ConfidentialTransferInputSelection } from "@tari-project/typescript-bindings";
import type { ComponentAddressOrName } from "@tari-project/typescript-bindings/wallet-daemon-client";

// Fees are passed as strings because Amount is tagged
export const useAccountsClaimBurn = (account: string, claimProof: string, fee: number) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useQuery } from "@tanstack/react-query";
import { transactionsGet, transactionsGetAll } from "../../utils/json_rpc";
import { apiError } from "../helpers/types";

import type { TransactionStatus } from "@tariproject/typescript-bindings";
import type { TransactionStatus } from "@tari-project/typescript-bindings";

const useTransactionDetails = (hash: string) => {
return useQuery({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ import { renderJson, shortenString } from "../../utils/helpers";
import { DataTableCell } from "../../Components/StyledComponents";
import CopyToClipboard from "../../Components/CopyToClipboard";
import FetchStatusCheck from "../../Components/FetchStatusCheck";
import { substateIdToString } from "@tariproject/typescript-bindings";
import type { BalanceEntry } from "@tariproject/typescript-bindings/wallet-daemon-client";
import { substateIdToString } from "@tari-project/typescript-bindings";
import type { BalanceEntry } from "@tari-project/typescript-bindings/wallet-daemon-client";
import { IoCheckmarkOutline, IoCloseOutline } from "react-icons/io5";
import NFTList from "../../Components/NFTList";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { GridHeadCell, GridDataCell } from "../../../Components/StyledComponents
import { useAccountsGet } from "../../../api/hooks/useAccounts";
import { shortenString } from "../../../utils/helpers";
import { styled } from "@mui/material/styles";
import { substateIdToString } from "@tariproject/typescript-bindings";
import { substateIdToString } from "@tari-project/typescript-bindings";

const GridContainer = styled(Box)(({ theme }) => ({
display: "grid",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ import { DataTableCell } from "../../../Components/StyledComponents";
import { useAccountNFTsList, useAccountsGetBalances } from "../../../api/hooks/useAccounts";
import useAccountStore from "../../../store/accountStore";
import { shortenString } from "../../../utils/helpers";
import type { BalanceEntry } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { BalanceEntry } from "@tari-project/typescript-bindings/wallet-daemon-client";
import NFTList from "../../../Components/NFTList";
import { Button } from "@mui/material";
import { SendMoneyDialog } from "./SendMoney";
import { ResourceAddress, ResourceType, VaultId } from "@tariproject/typescript-bindings";
import { ResourceAddress, ResourceType, VaultId } from "@tari-project/typescript-bindings";

interface TabPanelProps {
children?: React.ReactNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { useTheme } from "@mui/material/styles";
import { accountsClaimBurn } from "../../../utils/json_rpc";
import useAccountStore from "../../../store/accountStore";
import { useKeysList } from "../../../api/hooks/useKeys";
import type { AccountInfo } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { AccountInfo } from "@tari-project/typescript-bindings/wallet-daemon-client";

export default function ClaimBurn() {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import useAccountStore from "../../../store/accountStore";
import { FormControl, InputLabel, MenuItem, Select, SelectChangeEvent } from "@mui/material";
import { useKeysList } from "../../../api/hooks/useKeys";
import { validatorsClaimFees } from "../../../utils/json_rpc";
import type { AccountInfo } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { AccountInfo } from "@tari-project/typescript-bindings/wallet-daemon-client";

export default function ClaimFees() {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import Select, { SelectChangeEvent } from "@mui/material/Select";
import Dialog from "./AddAccount";
import useAccountStore from "../../../store/accountStore";
import { useAccountsList } from "../../../api/hooks/useAccounts";
import type { AccountInfo } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { AccountInfo } from "@tari-project/typescript-bindings/wallet-daemon-client";

function SelectAccount() {
const { accountName, setAccountName } = useAccountStore();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {
ResourceType,
ConfidentialTransferInputSelection,
TransactionResult,
} from "@tariproject/typescript-bindings";
} from "@tari-project/typescript-bindings";
import InputLabel from "@mui/material/InputLabel";

const XTR2 = "resource_01010101010101010101010101010101010101010101010101010101";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Box from "@mui/material/Box";
import { useTheme } from "@mui/material/styles";
import { Divider } from "@mui/material";
import { confidentialViewVaultBalance } from "../../../utils/json_rpc";
import { ConfidentialViewVaultBalanceRequest } from "@tariproject/typescript-bindings/wallet-daemon-client";
import { ConfidentialViewVaultBalanceRequest } from "@tari-project/typescript-bindings/wallet-daemon-client";

function ViewVaultBalanceForm() {
const [formState, setFormState] = useState({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
import CodeBlockExpand from "../../Components/CodeBlock";
import { useTheme } from "@mui/material/styles";
import type { Event } from "@tariproject/typescript-bindings";
import type { Event } from "@tari-project/typescript-bindings";

function RowData({ substate_id, template_address, topic, tx_hash, payload }: Event, index: number) {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
import CodeBlockExpand from "../../Components/CodeBlock";
import { useTheme } from "@mui/material/styles";
import type { Instruction, TransactionSignature } from "@tariproject/typescript-bindings";
import type { Instruction, TransactionSignature } from "@tari-project/typescript-bindings";

function RowData({ title, data }: { title: string; data: Instruction }, index: number) {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
import CodeBlockExpand from "../../Components/CodeBlock";
import { useTheme } from "@mui/material/styles";
import type { Instruction } from "@tariproject/typescript-bindings";
import type { Instruction } from "@tari-project/typescript-bindings";

function RowData({ title, data }: { title: string; data: Instruction }, index: number) {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from "@mui/material";
import { DataTableCell } from "../../Components/StyledComponents";
import type { LogEntry } from "@tariproject/typescript-bindings";
import type { LogEntry } from "@tari-project/typescript-bindings";

export default function Logs({ data }: { data: Array<LogEntry> }) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
import { IoArrowDownCircle, IoArrowUpCircle } from "react-icons/io5";
import CodeBlockExpand from "../../Components/CodeBlock";
import { useTheme } from "@mui/material/styles";
import type { Substate, SubstateId, TransactionResult } from "@tariproject/typescript-bindings";
import type { Substate, SubstateId, TransactionResult } from "@tari-project/typescript-bindings";

function RowData({ info, state }: { info: [SubstateId, Substate | number]; state: string }, index: number) {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ import type {
RejectReason,
TransactionResult,
TransactionSignature,
} from "@tariproject/typescript-bindings";
import { getRejectReasonFromTransactionResult, rejectReasonToString } from "@tariproject/typescript-bindings";
} from "@tari-project/typescript-bindings";
import { getRejectReasonFromTransactionResult, rejectReasonToString } from "@tari-project/typescript-bindings";

export default function TransactionDetails() {
const [expandedPanels, setExpandedPanels] = useState<string[]>([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import { DataTableCell } from "../../Components/StyledComponents";
import { useGetAllTransactions } from "../../api/hooks/useTransactions";
import { emptyRows, handleChangePage, handleChangeRowsPerPage } from "../../utils/helpers";
import { useAccountsGet } from "../../api/hooks/useAccounts";
import type { FinalizeResult, Transaction, TransactionStatus } from "@tariproject/typescript-bindings";
import type { FinalizeResult, Transaction, TransactionStatus } from "@tari-project/typescript-bindings";

export default function Transactions({ accountName }: { accountName: string }) {
const { data: accountsData } = useAccountsGet(accountName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import FetchStatusCheck from "../../../Components/FetchStatusCheck";
import { AccordionIconButton, CodeBlock, DataTableCell } from "../../../Components/StyledComponents";
import { useAuthRevokeToken, useGetAllTokens } from "../../../api/hooks/useTokens";
import { shortenString } from "../../../utils/helpers";
import type { Claims, JrpcPermission, JrpcPermissions } from "@tariproject/typescript-bindings";
import { jrpcPermissionToString } from "@tariproject/typescript-bindings";
import type { Claims, JrpcPermission, JrpcPermissions } from "@tari-project/typescript-bindings";
import { jrpcPermissionToString } from "@tari-project/typescript-bindings";

function AlertDialog({ fn, row }: any) {
const [open, setOpen] = useState(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ import {
} from "../../../api/hooks/useAccounts";
import FetchStatusCheck from "../../../Components/FetchStatusCheck";
import queryClient from "../../../api/queryClient";
import type { AccountInfo } from "@tariproject/typescript-bindings/wallet-daemon-client";
import type { AccountInfo } from "@tari-project/typescript-bindings/wallet-daemon-client";

function Account(account: AccountInfo, index: number) {
const { pathname } = useLocation();
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

import { ChangeEvent } from "react";
import type { FinalizeResult, SubstateId, Transaction, TransactionStatus } from "@tariproject/typescript-bindings";
import type { FinalizeResult, SubstateId, Transaction, TransactionStatus } from "@tari-project/typescript-bindings";

export const renderJson = (json: any) => {
if (Array.isArray(json)) {
Expand Down
4 changes: 2 additions & 2 deletions applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ import type {
TemplatesGetResponse,
SubstatesListRequest,
SubstatesListResponse,
} from "@tariproject/typescript-bindings/wallet-daemon-client";
import { AccountGetDefaultRequest, TemplatesGetRequest, WalletDaemonClient } from "@tariproject/wallet_daemon_client";
} from "@tari-project/typescript-bindings/wallet-daemon-client";
import { AccountGetDefaultRequest, TemplatesGetRequest, WalletDaemonClient } from "@tari-project/wallet_daemon_client";

let clientInstance: WalletDaemonClient | null = null;
let pendingClientInstance: Promise<WalletDaemonClient> | null = null;
Expand Down
8 changes: 4 additions & 4 deletions applications/tari_indexer_web_ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion applications/tari_indexer_web_ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"react-dom": "^18.2.0",
"react-icons": "^4.9.0",
"react-router-dom": "^6.9.0",
"@tariproject/typescript-bindings": "file:../../bindings",
"@tari-project/typescript-bindings": "file:../../bindings",
"use-react-router-breadcrumbs": "^4.0.1",
"zustand": "^4.4.1",
"zustand-persist": "^0.1.6"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { TextField } from "@mui/material";
import { Form } from "react-router-dom";
import Fade from "@mui/material/Fade";
import CopyToClipboard from "../../../Components/CopyToClipboard";
import type { Connection } from "@tariproject/typescript-bindings/tari-indexer-client";
import type { Connection } from "@tari-project/typescript-bindings/tari-indexer-client";
import { displayDuration } from "../../../utils/helpers";


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import TableCell from "@mui/material/TableCell";
import TableContainer from "@mui/material/TableContainer";
import TableRow from "@mui/material/TableRow";
import { DataTableCell } from "../../../Components/StyledComponents";
import type { GetIdentityResponse } from "@tariproject/typescript-bindings/tari-indexer-client";
import type { GetIdentityResponse } from "@tari-project/typescript-bindings/tari-indexer-client";

function Info({ identity }: { identity: GetIdentityResponse }) {
return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import { useEffect, useState } from "react";
import { getNonFungibles } from "../../../utils/json_rpc";
import { useParams } from "react-router-dom";
import { ImageList, ImageListItem, ImageListItemBar } from "@mui/material";
import type { NonFungibleSubstate } from "@tariproject/typescript-bindings/tari-indexer-client";
import type { NonFungibleSubstate } from "@tari-project/typescript-bindings/tari-indexer-client";

interface IImageData {
img: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import "./ValidatorNode.css";
import { StyledPaper } from "../../Components/StyledComponents";
import Grid from "@mui/material/Grid";
import SecondaryHeading from "../../Components/SecondaryHeading";
import type { GetIdentityResponse } from "@tariproject/typescript-bindings/tari-indexer-client";
import type { GetIdentityResponse } from "@tari-project/typescript-bindings/tari-indexer-client";

function ValidatorNode() {
const [identity, setIdentity] = useState<GetIdentityResponse>();
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_indexer_web_ui/src/utils/json_rpc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ import type {
InspectSubstateRequest,
InspectSubstateResponse,
SubmitTransactionResponse,
} from "@tariproject/typescript-bindings/tari-indexer-client";
} from "@tari-project/typescript-bindings/tari-indexer-client";

async function jsonRpc(method: string, params: any = null) {
let id = 0;
Expand Down
6 changes: 3 additions & 3 deletions applications/tari_validator_node_web_ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion applications/tari_validator_node_web_ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"react-dom": "^18.2.0",
"react-icons": "^4.9.0",
"react-router-dom": "^6.9.0",
"@tariproject/typescript-bindings": "file:../../bindings",
"@tari-project/typescript-bindings": "file:../../bindings",
"use-react-router-breadcrumbs": "^4.0.1",
"zustand": "^4.4.1",
"zustand-persist": "^0.1.6"
Expand Down
2 changes: 1 addition & 1 deletion applications/tari_validator_node_web_ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import BlockDetails from "./routes/Blocks/BlockDetails";
import type {
GetEpochManagerStatsResponse,
GetIdentityResponse,
} from "@tariproject/typescript-bindings/validator-node-client";
} from "@tari-project/typescript-bindings/validator-node-client";

interface IContext {
epoch?: GetEpochManagerStatsResponse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

import { Chip, Avatar } from "@mui/material";
import { IoCheckmarkOutline, IoHourglassOutline, IoCloseOutline, IoBandageOutline } from "react-icons/io5";
import { Decision } from "@tariproject/typescript-bindings";
import { Decision } from "@tari-project/typescript-bindings";

interface StatusChipProps {
status: Decision | "Loading" | "Dummy";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ import Loading from "../../Components/Loading";
import { getBlock, getIdentity } from "../../utils/json_rpc";
import Transactions from "./Transactions";
import { primitiveDateTimeToDate, primitiveDateTimeToSecs } from "../../utils/helpers";
import type { Block, TransactionAtom } from "@tariproject/typescript-bindings";
import type { GetIdentityResponse } from "@tariproject/typescript-bindings/validator-node-client";
import type { Block, TransactionAtom } from "@tari-project/typescript-bindings";
import type { GetIdentityResponse } from "@tari-project/typescript-bindings/validator-node-client";

export default function BlockDetails() {
const { blockId } = useParams();
Expand Down
Loading

0 comments on commit 89878f7

Please sign in to comment.