Skip to content

Commit

Permalink
Sign message format & delete ledger account
Browse files Browse the repository at this point in the history
  • Loading branch information
h0ngcha0 committed Jan 22, 2024
1 parent 80e93e3 commit 7541338
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 24 deletions.
3 changes: 1 addition & 2 deletions packages/dapp/src/components/TokenDapp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,7 @@ export const TokenDapp: FC<{

<div className="columns">
<label htmlFor="short-text">Short Text</label>
<input
type="text"
<textarea
id="short-text"
name="short-text"
value={shortText}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ import { nip19 } from "nostr-tools"
import { FC, useCallback, useState } from "react"
import { useNavigate, useParams } from "react-router-dom"

import { settingsStore } from "../../../shared/settings"
import { useKeyValueStorage } from "../../../shared/storage/hooks"
import { AddressCopyButton } from "../../components/AddressCopyButton"
import { routes, useReturnTo } from "../../routes"
import { upgradeAccount } from "../../services/backgroundAccounts"
import {
openBlockExplorerAddress,
useBlockExplorerTitle,
} from "../../services/blockExplorer.service"
import { openBlockExplorerAddress } from "../../services/blockExplorer.service"
import { Account } from "../accounts/Account"
import {
getAccountName,
Expand All @@ -32,7 +26,7 @@ import { useCurrentNetwork } from "../networks/useNetworks"
import { AccountEditName } from "./AccountEditName"
import { Button, CopyTooltip } from "@argent/ui"

const { ExpandIcon, HideIcon, PluginIcon, AlertIcon, CopyIcon } = icons
const { ExpandIcon, HideIcon, AlertIcon } = icons

export const AccountEditScreen: FC = () => {
const currentNetwork = useCurrentNetwork()
Expand All @@ -47,7 +41,6 @@ export const AccountEditScreen: FC = () => {
const accountName = account
? getAccountName(account, accountNames)
: "Not found"
const blockExplorerTitle = useBlockExplorerTitle()

const [liveEditingAccountName, setLiveEditingAccountName] =
useState(accountName)
Expand All @@ -60,13 +53,8 @@ export const AccountEditScreen: FC = () => {
}
}, [navigate, returnTo])

const experimentalPluginAccount = useKeyValueStorage(
settingsStore,
"experimentalPluginAccount",
)

const showDelete =
account && (account.networkId === "devnet")
account && (account.networkId === "devnet" || account.signer.type === "ledger")

const handleHideOrDeleteAccount = async (account: Account) => {
if (showDelete) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import { SignMessageParams } from "@alephium/web3"
import { P4, H5, H6, H2 } from "@argent/ui"
import { H6, H2 } from "@argent/ui"
import { FC } from "react"
import styled from "styled-components"

import { usePageTracking } from "../../services/analytics"
import { P } from "../../theme/Typography"
import {
ConfirmPageProps,
DeprecatedConfirmScreen,
} from "./DeprecatedConfirmScreen"
import { ConfirmPageProps } from "./DeprecatedConfirmScreen"
import { Field, FieldGroup, FieldKey, FieldValue, SectionHeader } from "../../components/Fields"
import { AccountAddressField } from "./transaction/fields/AccountAddressField"
import { Box, Flex } from "@chakra-ui/react"
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/ui/services/backgroundAccounts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const discoverAccounts = async (networkId?: string) => {
])
} catch {
const networkMsg = networkId ? ` for ${networkId}` : ""
throw Error(`Could not discover accounts${networkMsg}}.`)
throw Error(`Could not discover active accounts${networkMsg}}.`)
}
}

Expand Down

0 comments on commit 7541338

Please sign in to comment.