-
Notifications
You must be signed in to change notification settings - Fork 505
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:blockscout/frontend into tom2drum/i…
…ssue-1035
- Loading branch information
Showing
64 changed files
with
702 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import type { Feature } from './types'; | ||
import type { Provider } from 'types/client/txInterpretation'; | ||
import { PROVIDERS } from 'types/client/txInterpretation'; | ||
|
||
import { getEnvValue } from '../utils'; | ||
|
||
const title = 'Transaction interpretation'; | ||
|
||
const provider: Provider = (() => { | ||
const value = getEnvValue('NEXT_PUBLIC_TRANSACTION_INTERPRETATION_PROVIDER'); | ||
|
||
if (value && PROVIDERS.includes(value as Provider)) { | ||
return value as Provider; | ||
} | ||
|
||
return 'none'; | ||
})(); | ||
|
||
const config: Feature<{ provider: Provider }> = (() => { | ||
if (provider !== 'none') { | ||
return Object.freeze({ | ||
title, | ||
provider, | ||
isEnabled: true, | ||
}); | ||
} | ||
|
||
return Object.freeze({ | ||
title, | ||
isEnabled: false, | ||
}); | ||
})(); | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import type { TxInterpretationResponse } from 'types/api/txInterpretation'; | ||
|
||
export const txInterpretation: TxInterpretationResponse = { | ||
data: { | ||
summaries: [ { | ||
summary_template: `{action_type} {amount} {token} to {to_address} on {timestamp}`, | ||
summary_template_variables: { | ||
action_type: { type: 'string', value: 'Transfer' }, | ||
amount: { type: 'currency', value: '100' }, | ||
token: { | ||
type: 'token', | ||
value: { | ||
name: 'Duck', | ||
type: 'ERC-20', | ||
symbol: 'DUCK', | ||
address: '0x486a3c5f34cDc4EF133f248f1C81168D78da52e8', | ||
holders: '1152', | ||
decimals: '18', | ||
icon_url: null, | ||
total_supply: '210000000000000000000000000', | ||
exchange_rate: null, | ||
circulating_market_cap: null, | ||
}, | ||
}, | ||
to_address: { | ||
type: 'address', | ||
value: { | ||
hash: '0x48c04ed5691981C42154C6167398f95e8f38a7fF', | ||
implementation_name: null, | ||
is_contract: false, | ||
is_verified: false, | ||
name: null, | ||
private_tags: [], | ||
public_tags: [], | ||
watchlist_names: [], | ||
}, | ||
}, | ||
timestamp: { | ||
type: 'timestamp', | ||
value: '1687005431', | ||
}, | ||
}, | ||
} ], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,6 +52,7 @@ | |
| "graphQL" | ||
| "info" | ||
| "key" | ||
| "lightning" | ||
| "link" | ||
| "lock" | ||
| "minus" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import type { TxInterpretationResponse } from 'types/api/txInterpretation'; | ||
|
||
import { TOKEN_INFO_ERC_20 } from './token'; | ||
|
||
export const TX_INTERPRETATION: TxInterpretationResponse = { | ||
data: { | ||
summaries: [ | ||
{ | ||
summary_template: '{action_type} {source_amount} Ether into {destination_amount} {destination_token}', | ||
summary_template_variables: { | ||
action_type: { type: 'string', value: 'Wrap' }, | ||
source_amount: { type: 'currency', value: '0.7' }, | ||
destination_amount: { type: 'currency', value: '0.7' }, | ||
destination_token: { | ||
type: 'token', | ||
value: TOKEN_INFO_ERC_20, | ||
}, | ||
}, | ||
}, | ||
{ | ||
summary_template: '{action_type} {source_amount} Ether into {destination_amount} {destination_token}', | ||
summary_template_variables: { | ||
action_type: { type: 'string', value: 'Wrap' }, | ||
source_amount: { type: 'currency', value: '0.7' }, | ||
destination_amount: { type: 'currency', value: '0.7' }, | ||
destination_token: { | ||
type: 'token', | ||
value: TOKEN_INFO_ERC_20, | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.