Skip to content

Commit

Permalink
Bump @chakra-ui/react to 2.0.0 + nits
Browse files Browse the repository at this point in the history
  • Loading branch information
hariria authored and aptos-bot committed May 13, 2022
1 parent 4a383a9 commit 7a646ab
Show file tree
Hide file tree
Showing 8 changed files with 553 additions and 600 deletions.
4 changes: 2 additions & 2 deletions ecosystem/web-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@chakra-ui/icons": "^1.1.7",
"@chakra-ui/react": "^1.8.8",
"@chakra-ui/icons": "^2.0.0",
"@chakra-ui/react": "^2.0.0",
"@emotion/react": "^11",
"@emotion/styled": "^11",
"@types/jest": "^27.4.1",
Expand Down
3 changes: 3 additions & 0 deletions ecosystem/web-wallet/src/components/CreateNFTModal.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0

import { AddIcon } from '@chakra-ui/icons'
import {
Button,
Expand Down
1 change: 0 additions & 1 deletion ecosystem/web-wallet/src/components/WalletFooter.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

// Copyright (c) Aptos
// SPDX-License-Identifier: Apache-2.0

Expand Down
2 changes: 1 addition & 1 deletion ecosystem/web-wallet/src/components/WalletHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default function WalletHeader () {
whiteSpace="nowrap"
overflow="hidden"
display="block"
isTruncated
noOfLines={1}
maxW={['100px', '120px']}
cursor="pointer"
onClick={onCopy}
Expand Down
4 changes: 2 additions & 2 deletions ecosystem/web-wallet/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ import CreateWallet from './pages/CreateWallet'
import Account from './pages/Account'
import Gallery from './pages/Gallery'

export const queryClient = new QueryClient()

const theme: ThemeConfig = extendTheme({
initialColorMode: 'dark',
useSystemColorMode: false,
Expand All @@ -32,6 +30,8 @@ const theme: ThemeConfig = extendTheme({
}
})

export const queryClient = new QueryClient()

const root = createRoot(document.getElementById('root') as Element)

root.render(
Expand Down
2 changes: 1 addition & 1 deletion ecosystem/web-wallet/src/pages/Account.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export const CredentialRow = ({
</Flex>
<Flex alignItems="flex-end">
<Tooltip label={hasCopied ? 'Copied!' : 'Copy'} closeDelay={300}>
<Text fontSize="xs" cursor="pointer" isTruncated onClick={onCopy}>
<Text fontSize="xs" cursor="pointer" noOfLines={1} onClick={onCopy}>
{body}
</Text>
</Tooltip>
Expand Down
32 changes: 17 additions & 15 deletions ecosystem/web-wallet/src/pages/Wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,35 +66,37 @@ export const getAccountResources = async ({

export type Inputs = Record<string, any>

interface SubmitTransactionProps {
toAddress: string;
fromAddress: AptosAccount;
amount: string;
nodeUrl?: string;
}

interface FundWithFaucetProps {
nodeUrl?: string;
faucetUrl?: string;
address?: string;
}

const TransferResult = Object.freeze({
UndefinedAccount: 'Account does not exist',
AmountOverLimit: 'Amount is over limit',
AmountWithGasOverLimit: 'Amount with gas is over limit',
IncorrectPayload: 'Incorrect transaction payload',
Success: 'Transaction executed successfully'
} as const)

const fundWithFaucet = async ({
nodeUrl = NODE_URL,
faucetUrl = FAUCET_URL,
address
}: FundWithFaucetProps): Promise<void> => {
const faucetClient = new FaucetClient(nodeUrl, FAUCET_URL)
const faucetClient = new FaucetClient(nodeUrl, faucetUrl)
if (address) {
await faucetClient.fundAccount(address, 5000)
}
}

interface SubmitTransactionProps {
toAddress: string;
fromAddress: AptosAccount;
amount: string;
nodeUrl?: string;
}
const TransferResult = Object.freeze({
UndefinedAccount: 'Account does not exist',
AmountOverLimit: 'Amount is over limit',
AmountWithGasOverLimit: 'Amount with gas is over limit',
IncorrectPayload: 'Incorrect transaction payload',
Success: 'Transaction executed successfully'
} as const)

const submitTransaction = async ({
toAddress,
Expand Down
Loading

0 comments on commit 7a646ab

Please sign in to comment.