-
Notifications
You must be signed in to change notification settings - Fork 493
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-1213
- Loading branch information
Showing
79 changed files
with
950 additions
and
590 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
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 |
---|---|---|
@@ -1,16 +1,32 @@ | ||
import type { IdenticonType } from 'types/views/address'; | ||
import { IDENTICON_TYPES } from 'types/views/address'; | ||
import type { AddressViewId, IdenticonType } from 'types/views/address'; | ||
import { ADDRESS_VIEWS_IDS, IDENTICON_TYPES } from 'types/views/address'; | ||
|
||
import { getEnvValue } from 'configs/app/utils'; | ||
import { getEnvValue, parseEnvJson } from 'configs/app/utils'; | ||
|
||
const identiconType: IdenticonType = (() => { | ||
const value = getEnvValue('NEXT_PUBLIC_VIEWS_ADDRESS_IDENTICON_TYPE'); | ||
|
||
return IDENTICON_TYPES.find((type) => value === type) || 'jazzicon'; | ||
})(); | ||
|
||
const hiddenViews = (() => { | ||
const parsedValue = parseEnvJson<Array<AddressViewId>>(getEnvValue('NEXT_PUBLIC_VIEWS_ADDRESS_HIDDEN_VIEWS')) || []; | ||
|
||
if (!Array.isArray(parsedValue)) { | ||
return undefined; | ||
} | ||
|
||
const result = ADDRESS_VIEWS_IDS.reduce((result, item) => { | ||
result[item] = parsedValue.includes(item); | ||
return result; | ||
}, {} as Record<AddressViewId, boolean>); | ||
|
||
return result; | ||
})(); | ||
|
||
const config = Object.freeze({ | ||
identiconType: identiconType, | ||
identiconType, | ||
hiddenViews, | ||
}); | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export { default as block } from './block'; | ||
export { default as address } from './address'; | ||
export { default as block } from './block'; | ||
export { default as nft } from './nft'; | ||
export { default as tx } from './tx'; |
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,41 @@ | ||
import type { TxAdditionalFieldsId, TxFieldsId } from 'types/views/tx'; | ||
import { TX_ADDITIONAL_FIELDS_IDS, TX_FIELDS_IDS } from 'types/views/tx'; | ||
|
||
import { getEnvValue, parseEnvJson } from 'configs/app/utils'; | ||
|
||
const hiddenFields = (() => { | ||
const parsedValue = parseEnvJson<Array<TxFieldsId>>(getEnvValue('NEXT_PUBLIC_VIEWS_TX_HIDDEN_FIELDS')) || []; | ||
|
||
if (!Array.isArray(parsedValue)) { | ||
return undefined; | ||
} | ||
|
||
const result = TX_FIELDS_IDS.reduce((result, item) => { | ||
result[item] = parsedValue.includes(item); | ||
return result; | ||
}, {} as Record<TxFieldsId, boolean>); | ||
|
||
return result; | ||
})(); | ||
|
||
const additionalFields = (() => { | ||
const parsedValue = parseEnvJson<Array<TxAdditionalFieldsId>>(getEnvValue('NEXT_PUBLIC_VIEWS_TX_ADDITIONAL_FIELDS')) || []; | ||
|
||
if (!Array.isArray(parsedValue)) { | ||
return undefined; | ||
} | ||
|
||
const result = TX_ADDITIONAL_FIELDS_IDS.reduce((result, item) => { | ||
result[item] = parsedValue.includes(item); | ||
return result; | ||
}, {} as Record<TxAdditionalFieldsId, boolean>); | ||
|
||
return result; | ||
})(); | ||
|
||
const config = Object.freeze({ | ||
hiddenFields, | ||
additionalFields, | ||
}); | ||
|
||
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
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
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.