Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
38a49798
Commit
38a49798
authored
Nov 24, 2022
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change types for to address and created contract in tx
parent
77307d38
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
28 additions
and
12 deletions
+28
-12
internalTransaction.ts
types/api/internalTransaction.ts
+10
-3
transaction.ts
types/api/transaction.ts
+12
-3
LatestTxsItem.tsx
ui/home/LatestTxsItem.tsx
+1
-1
TxDetails.tsx
ui/tx/TxDetails.tsx
+1
-1
TxInternalsListItem.tsx
ui/tx/internals/TxInternalsListItem.tsx
+1
-1
TxInternalsTableItem.tsx
ui/tx/internals/TxInternalsTableItem.tsx
+1
-1
TxsListItem.tsx
ui/txs/TxsListItem.tsx
+1
-1
TxsTableItem.tsx
ui/txs/TxsTableItem.tsx
+1
-1
No files found.
types/api/internalTransaction.ts
View file @
38a49798
...
@@ -2,14 +2,21 @@ import type { AddressParam } from './addressParams';
...
@@ -2,14 +2,21 @@ import type { AddressParam } from './addressParams';
export
type
TxInternalsType
=
'
call
'
|
'
delegatecall
'
|
'
staticcall
'
|
'
create
'
|
'
create2
'
|
'
selfdestruct
'
|
'
reward
'
export
type
TxInternalsType
=
'
call
'
|
'
delegatecall
'
|
'
staticcall
'
|
'
create
'
|
'
create2
'
|
'
selfdestruct
'
|
'
reward
'
export
interface
InternalTransaction
{
export
type
InternalTransaction
=
(
{
to
:
AddressParam
;
created_contract
:
null
;
}
|
{
to
:
null
;
created_contract
:
AddressParam
;
}
)
&
{
error
:
string
|
null
;
error
:
string
|
null
;
success
:
boolean
;
success
:
boolean
;
type
:
TxInternalsType
;
type
:
TxInternalsType
;
transaction_hash
:
string
;
transaction_hash
:
string
;
from
:
AddressParam
;
from
:
AddressParam
;
to
:
AddressParam
;
created_contract
:
AddressParam
;
value
:
string
;
value
:
string
;
index
:
number
;
index
:
number
;
block
:
number
;
block
:
number
;
...
...
types/api/transaction.ts
View file @
38a49798
...
@@ -8,7 +8,16 @@ export type TransactionRevertReason = {
...
@@ -8,7 +8,16 @@ export type TransactionRevertReason = {
decoded
:
string
;
decoded
:
string
;
}
|
DecodedInput
;
}
|
DecodedInput
;
export
interface
Transaction
{
export
type
Transaction
=
(
{
to
:
AddressParam
;
created_contract
:
null
;
}
|
{
to
:
null
;
created_contract
:
AddressParam
;
}
)
&
{
hash
:
string
;
hash
:
string
;
result
:
string
;
result
:
string
;
confirmations
:
number
;
confirmations
:
number
;
...
@@ -17,8 +26,8 @@ export interface Transaction {
...
@@ -17,8 +26,8 @@ export interface Transaction {
timestamp
:
string
|
null
;
timestamp
:
string
|
null
;
confirmation_duration
:
Array
<
number
>
;
confirmation_duration
:
Array
<
number
>
;
from
:
AddressParam
;
from
:
AddressParam
;
to
:
AddressParam
|
null
;
//
to: AddressParam | null;
created_contract
:
AddressParam
;
//
created_contract: AddressParam;
value
:
string
;
value
:
string
;
fee
:
Fee
;
fee
:
Fee
;
gas_price
:
number
;
gas_price
:
number
;
...
...
ui/home/LatestTxsItem.tsx
View file @
38a49798
...
@@ -40,7 +40,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
...
@@ -40,7 +40,7 @@ const LatestBlocksItem = ({ tx }: Props) => {
const
borderColor
=
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
);
const
borderColor
=
useColorModeValue
(
'
gray.200
'
,
'
whiteAlpha.200
'
);
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
dataTo
=
tx
.
to
&&
tx
.
to
.
hash
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
const
timeAgo
=
useTimeAgoIncrement
(
tx
.
timestamp
||
'
0
'
,
true
);
const
isMobile
=
useIsMobile
();
const
isMobile
=
useIsMobile
();
...
...
ui/tx/TxDetails.tsx
View file @
38a49798
...
@@ -58,7 +58,7 @@ const TxDetails = () => {
...
@@ -58,7 +58,7 @@ const TxDetails = () => {
...
data
.
from
.
watchlist_names
||
[],
...
data
.
from
.
watchlist_names
||
[],
].
map
((
tag
)
=>
<
Tag
key=
{
tag
.
label
}
>
{
tag
.
display_name
}
</
Tag
>);
].
map
((
tag
)
=>
<
Tag
key=
{
tag
.
label
}
>
{
tag
.
display_name
}
</
Tag
>);
const
toAddress
=
data
.
to
&&
data
.
to
.
hash
?
data
.
to
:
data
.
created_contract
;
const
toAddress
=
data
.
to
?
data
.
to
:
data
.
created_contract
;
const
addressToTags
=
[
const
addressToTags
=
[
...
toAddress
.
private_tags
||
[],
...
toAddress
.
private_tags
||
[],
...
toAddress
.
public_tags
||
[],
...
toAddress
.
public_tags
||
[],
...
...
ui/tx/internals/TxInternalsListItem.tsx
View file @
38a49798
...
@@ -17,7 +17,7 @@ type Props = InternalTransaction;
...
@@ -17,7 +17,7 @@ type Props = InternalTransaction;
const
TxInternalsListItem
=
({
type
,
from
,
to
,
value
,
success
,
error
,
gas_limit
:
gasLimit
,
created_contract
:
createdContract
}:
Props
)
=>
{
const
TxInternalsListItem
=
({
type
,
from
,
to
,
value
,
success
,
error
,
gas_limit
:
gasLimit
,
created_contract
:
createdContract
}:
Props
)
=>
{
const
typeTitle
=
TX_INTERNALS_ITEMS
.
find
(({
id
})
=>
id
===
type
)?.
title
;
const
typeTitle
=
TX_INTERNALS_ITEMS
.
find
(({
id
})
=>
id
===
type
)?.
title
;
const
toData
=
to
&&
to
.
hash
?
to
:
createdContract
;
const
toData
=
to
?
to
:
createdContract
;
return
(
return
(
<
AccountListItemMobile
rowGap=
{
3
}
>
<
AccountListItemMobile
rowGap=
{
3
}
>
...
...
ui/tx/internals/TxInternalsTableItem.tsx
View file @
38a49798
...
@@ -15,7 +15,7 @@ type Props = InternalTransaction
...
@@ -15,7 +15,7 @@ type Props = InternalTransaction
const
TxInternalTableItem
=
({
type
,
from
,
to
,
value
,
success
,
error
,
gas_limit
:
gasLimit
,
created_contract
:
createdContract
}:
Props
)
=>
{
const
TxInternalTableItem
=
({
type
,
from
,
to
,
value
,
success
,
error
,
gas_limit
:
gasLimit
,
created_contract
:
createdContract
}:
Props
)
=>
{
const
typeTitle
=
TX_INTERNALS_ITEMS
.
find
(({
id
})
=>
id
===
type
)?.
title
;
const
typeTitle
=
TX_INTERNALS_ITEMS
.
find
(({
id
})
=>
id
===
type
)?.
title
;
const
toData
=
to
&&
to
.
hash
?
to
:
createdContract
;
const
toData
=
to
?
to
:
createdContract
;
return
(
return
(
<
Tr
alignItems=
"top"
>
<
Tr
alignItems=
"top"
>
...
...
ui/txs/TxsListItem.tsx
View file @
38a49798
...
@@ -33,7 +33,7 @@ const TxsListItem = ({ tx, showBlockInfo }: {tx: Transaction; showBlockInfo: boo
...
@@ -33,7 +33,7 @@ const TxsListItem = ({ tx, showBlockInfo }: {tx: Transaction; showBlockInfo: boo
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
iconColor
=
useColorModeValue
(
'
blue.600
'
,
'
blue.300
'
);
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
borderColor
=
useColorModeValue
(
'
blackAlpha.200
'
,
'
whiteAlpha.200
'
);
const
dataTo
=
tx
.
to
&&
tx
.
to
.
hash
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
return
(
return
(
<>
<>
...
...
ui/txs/TxsTableItem.tsx
View file @
38a49798
...
@@ -44,7 +44,7 @@ const TxsTableItem = ({ tx, showBlockInfo }: {tx: Transaction; showBlockInfo: bo
...
@@ -44,7 +44,7 @@ const TxsTableItem = ({ tx, showBlockInfo }: {tx: Transaction; showBlockInfo: bo
</
Address
>
</
Address
>
);
);
const
dataTo
=
tx
.
to
&&
tx
.
to
.
hash
?
tx
.
to
:
tx
.
created_contract
;
const
dataTo
=
tx
.
to
?
tx
.
to
:
tx
.
created_contract
;
const
addressTo
=
(
const
addressTo
=
(
<
Address
>
<
Address
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment