Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion packages/plugin-infra/src/web3-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ export enum TokenType {
NonFungible = 'NonFungible',
}

type ColorRGB = `rgb(${number}, ${number}, ${number})`
type ColorRGBA = `rgba(${number}, ${number}, ${number}, ${number})`
type ColorHEX = `#${string}${string}${string}${string}${string}${string}` | `#${string}${string}${string}`
type ColorHSL = `hsl(${number}, ${number}%, ${number}%)`
type Color = ColorRGB | ColorRGBA | ColorHEX | ColorHSL

export declare namespace Web3Plugin {
/**
* Plugin can declare what chain it supports to trigger side effects (e.g. create a new transaction).
Expand All @@ -47,7 +53,7 @@ export declare namespace Web3Plugin {
/** The network icon */
icon: URL
/** The network icon in fixed color */
iconColor: string
iconColor: Color
/** The network name */
name: string
/** Is a mainnet network */
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/Flow/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const PLUGIN_NETWORKS: Web3Plugin.NetworkDescriptor[] = [
type: NetworkType.Flow,
name: 'Flow',
icon: new URL('./assets/flow.png', import.meta.url),
iconColor: 'rgb(54 173 104)',
iconColor: 'rgb(54, 173, 104)',
isMainnet: true,
},
{
Expand All @@ -24,7 +24,7 @@ export const PLUGIN_NETWORKS: Web3Plugin.NetworkDescriptor[] = [
type: NetworkType.Flow,
name: 'Flow Testnet',
icon: new URL('./assets/flow.png', import.meta.url),
iconColor: 'rgb(54 173 104)',
iconColor: 'rgb(54, 173, 104)',
isMainnet: false,
},
]
Expand Down