Skip to content
This repository has been archived by the owner on Feb 2, 2025. It is now read-only.

Commit

Permalink
Catching up for petnames
Browse files Browse the repository at this point in the history
  • Loading branch information
tjayrush committed Oct 17, 2022
1 parent b616a1b commit 9bc560b
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 32 deletions.
1 change: 1 addition & 0 deletions src/sdk/generated_ts/paths/blocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export function getBlocks(
trace?: boolean,
apps?: boolean,
uniq?: boolean,
flow?: 'from' | 'to' | 'reward',
logs?: boolean,
emitter?: address[],
topic?: topic[],
Expand Down
1 change: 1 addition & 0 deletions src/sdk/generated_ts/paths/transactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export function getTransactions(
articulate?: boolean,
trace?: boolean,
uniq?: boolean,
flow?: 'from' | 'to',
reconcile?: string,
cache?: boolean,
chain: string,
Expand Down
3 changes: 2 additions & 1 deletion src/sdk/generated_ts/types/log.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { blknum, timestamp, address, topic, bytes, Function } from "../types";
import { blknum, hash, timestamp, address, topic, bytes, Function } from "../types";

export type Log = {
blockNumber: blknum
transactionIndex: blknum
logIndex: blknum
transactionHash: hash
timestamp: timestamp
address: address
topics: topic[]
Expand Down
2 changes: 1 addition & 1 deletion src/sdk/generated_ts/types/name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export type Name = {
symbol: string
source: string
decimals: uint64
description: string
petname: string
deleted: boolean
isCustom: boolean
isPrefund: boolean
Expand Down
3 changes: 2 additions & 1 deletion src/sdk/generated_ts/types/trace.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { hash, blknum, uint64, TraceAction, TraceResult, Function } from "../types";
import { hash, blknum, timestamp, uint64, TraceAction, TraceResult, Function } from "../types";

export type Trace = {
blockHash: hash
blockNumber: blknum
timestamp: timestamp
transactionHash: hash
transactionIndex: blknum
traceAddress: string[]
Expand Down
10 changes: 0 additions & 10 deletions src/ui/components/NameEditModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ export function NamesEditModal({

const [selectedNameName, setSelectedNameName] = useState(namesEditModal.name);
const [selectedNameAddress, setSelectedNameAddress] = useState(namesEditModal.address);
const [selectedNameDescription, setSelectedNameDescription] = useState(namesEditModal.description);
const [selectedNameSource, setSelectedNameSource] = useState(namesEditModal.source);
const [selectedNameTags, setSelectedNameTags] = useState(namesEditModal.tags);

Expand Down Expand Up @@ -80,15 +79,6 @@ export function NamesEditModal({
/>
</Form.Item>
</div>
<div style={{ marginTop: '16px' }}>
<Form.Item label={<div style={{ minWidth: '74px' }}>Description</div>} name='description'>
<Input
placeholder='Description'
value={selectedNameDescription}
onChange={(e) => setSelectedNameDescription(e.target.value)}
/>
</Form.Item>
</div>
<div style={{ marginTop: '16px' }}>
<Form.Item label={<div style={{ minWidth: '74px' }}>Source</div>} name='source'>
<Input
Expand Down
2 changes: 1 addition & 1 deletion src/ui/modules/types/Accountname.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function createEmptyAccountname(): Name {
symbol: '',
source: '',
decimals: 0,
description: '',
petname: '',
isCustom: false,
isPrefund: false,
isContract: false,
Expand Down
3 changes: 0 additions & 3 deletions src/ui/views/Dashboard/Tabs/Monitors.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const Monitors = () => {
} = useGlobalState();
const [selectedNameAddress] = useState('');
const [selectedNameName] = useState('');
const [selectedNameDescription] = useState('');
const [selectedNameSource] = useState('');
const [selectedNameTags] = useState('');
const [loadingEdit, setLoadingEdit] = useState(false);
Expand Down Expand Up @@ -114,7 +113,6 @@ export const Monitors = () => {
referrerPolicy: 'no-referrer',
body: JSON.stringify({
address: selectedNameAddress,
description: selectedNameDescription,
name: selectedNameName,
source: selectedNameSource.length > 0 ? selectedNameSource : 'Etherscan.io',
tags: selectedNameTags,
Expand All @@ -129,7 +127,6 @@ export const Monitors = () => {
newAddresses.data[foundAddress] = {
//@ts-ignore
...newAddresses.data[foundAddress],
description: selectedNameDescription,
name: selectedNameName,
source: selectedNameSource,
tags: selectedNameTags,
Expand Down
17 changes: 2 additions & 15 deletions src/ui/views/Names/Tabs/Names.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export const Names = () => {
const searchInputRef = useRef(null);
const { namesEditModal, setNamesEditModal, setNamesEditModalVisible } = useGlobalState();
const [selectedNameName, setSelectedNameName] = useState(namesEditModal.name);
const [selectedNameDescription, setSelectedNameDescription] = useState(namesEditModal.description);
const [selectedNameSource, setSelectedNameSource] = useState(namesEditModal.source);
const [selectedNameTags, setSelectedNameTags] = useState(namesEditModal.tags);
const [loadingEdit, setLoadingEdit] = useState(false);
Expand Down Expand Up @@ -138,7 +137,6 @@ export const Names = () => {
useEffect(() => {
if (namesEditModal) {
setSelectedNameName(namesEditModal.name);
setSelectedNameDescription(namesEditModal.description);
setSelectedNameSource(namesEditModal.source);
setSelectedNameTags(namesEditModal.tags);
}
Expand All @@ -158,7 +156,6 @@ export const Names = () => {
referrerPolicy: 'no-referrer',
body: JSON.stringify({
address: namesEditModal.address,
description: selectedNameDescription,
name: selectedNameName,
source: selectedNameSource,
tags: selectedNameTags,
Expand All @@ -173,7 +170,6 @@ export const Names = () => {

newAddresses[foundAddressIndex] = {
...newAddresses[foundAddressIndex],
description: selectedNameDescription,
name: selectedNameName,
source: selectedNameSource,
tags: selectedNameTags,
Expand All @@ -192,8 +188,6 @@ export const Names = () => {
loadingEdit={loadingEdit}
selectedNameName={selectedNameName}
setSelectedNameName={setSelectedNameName}
selectedNameDescription={selectedNameDescription}
setSelectedNameDescription={setSelectedNameDescription}
selectedNameSource={selectedNameSource}
setSelectedNameSource={setSelectedNameSource}
selectedNameTags={selectedNameTags}
Expand All @@ -216,8 +210,6 @@ const NameEditModal = ({
loadingEdit,
selectedNameName,
setSelectedNameName,
selectedNameDescription,
setSelectedNameDescription,
selectedNameSource,
setSelectedNameSource,
selectedNameTags,
Expand All @@ -229,8 +221,6 @@ const NameEditModal = ({
loadingEdit: any;
selectedNameName: any;
setSelectedNameName: any;
selectedNameDescription: any;
setSelectedNameDescription: any;
selectedNameSource: any;
setSelectedNameSource: any;
selectedNameTags: any;
Expand All @@ -245,9 +235,6 @@ const NameEditModal = ({
{
name: 'Name', value: selectedNameName, type: '', onChange: setSelectedNameName,
},
{
name: 'Description', value: selectedNameDescription, type: '', onChange: setSelectedNameDescription,
},
{
name: 'Source', value: selectedNameSource, type: '', onChange: setSelectedNameSource,
},
Expand Down Expand Up @@ -324,8 +311,8 @@ const addressSchema: ColumnsType<Name> = [
dataIndex: 'decimals',
}),
addColumn({
title: 'Description',
dataIndex: 'description',
title: 'Petname',
dataIndex: 'petname',
}),
addTagsColumn(
{
Expand Down

0 comments on commit 9bc560b

Please sign in to comment.