mirror of
https://github.com/luxfi/explore.git
synced 2026-09-24 00:28:18 +00:00
* add support for array of implementations * refactor ContainerWithScrollY component * contract source code: allow to choose between all implementations * fix layout of AddressNetWorth component * add scroll container to implementation address on write/read proxy contract tab * update screenshots
35 lines
725 B
TypeScript
35 lines
725 B
TypeScript
import type { AddressParam } from 'types/api/addressParams';
|
|
|
|
export type TxCourseType = 'in' | 'out' | 'self' | 'unspecified';
|
|
|
|
export function getTxCourseType(from: string, to: string | undefined, current?: string): TxCourseType {
|
|
if (current === undefined) {
|
|
return 'unspecified';
|
|
}
|
|
|
|
if (to && from === to && from === current) {
|
|
return 'self';
|
|
}
|
|
|
|
if (from === current) {
|
|
return 'out';
|
|
}
|
|
|
|
if (to && to === current) {
|
|
return 'in';
|
|
}
|
|
|
|
return 'unspecified';
|
|
}
|
|
|
|
export const unknownAddress: Omit<AddressParam, 'hash'> = {
|
|
is_contract: false,
|
|
is_verified: false,
|
|
implementations: null,
|
|
name: '',
|
|
private_tags: [],
|
|
public_tags: [],
|
|
watchlist_names: [],
|
|
ens_domain_name: null,
|
|
};
|