Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rootstock #1715

Open
wants to merge 1 commit into
base: canary
Choose a base branch
from
Open
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
12 changes: 11 additions & 1 deletion app/dash/Chains/Chain/Components/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,17 @@ export const ChainHeader = ({ type, id, primaryColor, icon, svgName, name, on, s
)
}

const accents = ['accent1', 'accent2', 'accent3', 'accent4', 'accent5', 'accent6', 'accent7', 'accent8']
const accents = [
'accent1',
'accent2',
'accent3',
'accent4',
'accent5',
'accent6',
'accent7',
'accent8',
'accent9'
]

export const EditChainColor = ({ currentColor, onChange }) => {
return (
Expand Down
50 changes: 50 additions & 0 deletions main/store/state/types/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,56 @@ export const chainDefaults = {
}
}
},
30: {
id: 30,
type,
layer: 'sidechain' as const,
isTestnet: false,
name: 'Rootstock',
explorer: 'https://explorer.rootstock.io',
on: false,
connection: {
primary: {
on: false,
current: 'custom' as const,
status: 'loading' as const,
connected: false,
custom: 'https://public-node.rsk.co'
},
secondary: {
on: false,
current: 'custom' as const,
status: 'loading' as const,
connected: false,
custom: ''
}
}
},
31: {
id: 30,
type,
layer: 'testnet' as const,
isTestnet: true,
name: 'Rootstock Testnet',
explorer: 'https://explorer.testnet.rootstock.io/',
on: false,
connection: {
primary: {
on: false,
current: 'custom' as const,
status: 'loading' as const,
connected: false,
custom: 'https://public-node.testnet.rsk.co'
},
secondary: {
on: false,
current: 'custom' as const,
status: 'loading' as const,
connected: false,
custom: ''
}
}
},
100: {
id: 100,
type,
Expand Down
46 changes: 46 additions & 0 deletions main/store/state/types/chainMeta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,52 @@ export const chainMetaDefaults = {
icon: 'https://frame.nyc3.cdn.digitaloceanspaces.com/icons/optimism.svg',
primaryColor: 'accent4' // Optimism
},
30: {
blockHeight: 0,
gas: {
fees: {},
samples: [],
price: {
selected: 'standard',
levels: { slow: '', standard: '', fast: '', asap: '', custom: '' }
}
},
nativeCurrency: {
symbol: 'RBTC',
usd: {
price: 0,
change24hr: 0
},
icon: 'https://s2.coinmarketcap.com/static/img/coins/64x64/3626.png',
name: 'Rootstock Smart Bitcoin',
decimals: 18
},
icon: 'https://icons.llamao.fi/icons/chains/rsz_rootstock?w=150&h=150',
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to know how to this image to https://frame.nyc3.cdn.digitaloceanspaces.com/

primaryColor: 'accent9' //Rootstock
},
31: {
blockHeight: 0,
gas: {
fees: {},
samples: [],
price: {
selected: 'standard',
levels: { slow: '', standard: '', fast: '', asap: '', custom: '' }
}
},
nativeCurrency: {
symbol: 'tRBTC',
usd: {
price: 0,
change24hr: 0
},
icon: 'https://s2.coinmarketcap.com/static/img/coins/64x64/3626.png',
name: 'Rootstock Smart Bitcoin',
decimals: 18
},
icon: 'https://icons.llamao.fi/icons/chains/rsz_rootstock?w=150&h=150',
primaryColor: 'accent2' //Testnet
},
100: {
blockHeight: 0,
gas: {
Expand Down
3 changes: 2 additions & 1 deletion main/store/state/types/colors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ export const ColorwayPaletteSchema = z.object({
accent5: ColorSchema,
accent6: ColorSchema,
accent7: ColorSchema,
accent8: ColorSchema
accent8: ColorSchema,
accent9: ColorSchema
})

export type ColorwayPalette = z.infer<typeof ColorwayPaletteSchema>
2 changes: 2 additions & 0 deletions resources/base.styl
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ body
--accent6 rgb(152, 120, 221) // Polygon
--accent7 rgb(62, 173, 241) // Arbitrum
--accent8 rgb(106, 131, 255) // Other
--accent9 rgb(90, 181, 178) // Rootstock

// // Shadows
// --cardDrop 0px 1px 1px rgba(0, 34, 32, 0.1)
Expand Down Expand Up @@ -402,6 +403,7 @@ body
--accent6 rgb(140, 97, 232) // Polygon
--accent7 rgb(31, 144, 214) // Arbitrum
--accent8 rgb(44, 78, 249) // Other
--accent9 rgb(45, 155, 152) // Rootstock

--mint rgb(70, 85, 100)
--mintOver rgba(15, 55, 55, 1)
Expand Down
6 changes: 4 additions & 2 deletions resources/colors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const light: ColorwayPalette = {
accent5: { r: 90, g: 181, b: 178 },
accent6: { r: 140, g: 97, b: 232 },
accent7: { r: 62, g: 173, b: 241 },
accent8: { r: 60, g: 40, b: 234 }
accent8: { r: 60, g: 40, b: 234 },
accent9: { r: 90, g: 181, b: 178 }
}

const dark: ColorwayPalette = {
Expand All @@ -21,7 +22,8 @@ const dark: ColorwayPalette = {
accent5: { r: 90, g: 181, b: 178 },
accent6: { r: 140, g: 97, b: 232 },
accent7: { r: 62, g: 173, b: 241 },
accent8: { r: 60, g: 40, b: 234 }
accent8: { r: 60, g: 40, b: 234 },
accent9: { r: 90, g: 181, b: 178 }
Copy link
Author

@jonathansmirnoff jonathansmirnoff Apr 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this color can be changed

}

const colorways: Record<Colorway, ColorwayPalette> = { light, dark }
Expand Down