Skip to content

Commit

Permalink
Fix token info
Browse files Browse the repository at this point in the history
  • Loading branch information
polarker committed Aug 24, 2023
1 parent 5987fbd commit 13062e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions src/components/Multisig/CreateMultisig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,16 @@ function CreateMultisig() {
ta="left"
{...form.getInputProps(`pubkeys.${index}.pubkey`)}
/>
<Tooltip label="Remove Signer" disabled={form.values.pubkeys.length === 1}>
<Tooltip
label="Remove Signer"
disabled={form.values.pubkeys.length === 1}
>
<IconSquareRoundedMinus
size="1.2rem"
onClick={() => form.values.pubkeys.length!==1 && form.removeListItem('pubkeys', index)}
onClick={() =>
form.values.pubkeys.length !== 1 &&
form.removeListItem('pubkeys', index)
}
/>
</Tooltip>
</Group>
Expand Down
4 changes: 2 additions & 2 deletions src/components/Token/TokenInfo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Center, Stack, TextInput, rem } from '@mantine/core'
import { useCallback, useState } from 'react'
import { connectAlephium, getTokenMetadata } from '../../utils/utils'
import { getTokenMetadata, useAlephium } from '../../utils/utils'
import {
FungibleTokenMetaData,
addressFromTokenId,
Expand All @@ -21,12 +21,12 @@ type TokenInfo = FungibleTokenMetaData & {
function TokenInfo() {
const [value, setValue] = useState('')
const [tokenInfo, setTokenInfo] = useState<TokenInfo>()
const nodeProvider = useAlephium()

const searchToken = useCallback(async (tokenId: string) => {
setValue(tokenId)

if (tokenId) {
const nodeProvider = connectAlephium(network)
const tokenMetadata = await nodeProvider.fetchFungibleTokenMetaData(
tokenId
)
Expand Down

0 comments on commit 13062e0

Please sign in to comment.