Skip to content

Commit 142aa91

Browse files
floatingmholtzman
andauthored
v0.6.7 (#1623)
* Introducing Pylon EVM * Improve OP stack fee estimates * Add Base chain preset * Zod state/migration validation Co-authored-by: Matt Holtzman <matt.holtzman@gmail.com> Co-authored-by: Jordan Muir <jordan@frame.sh>
1 parent 5c76115 commit 142aa91

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

88 files changed

+8770
-5262
lines changed

.github/workflows/canary.yml

-80
This file was deleted.

.github/workflows/compile-and-test.yml

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- 'beta.*'
7+
- 'canary'
78
- 'develop'
89
pull_request:
910

.github/workflows/sync-upstream.yml

-21
This file was deleted.

@types/frame/state.d.ts

-135
Original file line numberDiff line numberDiff line change
@@ -1,128 +1,5 @@
1-
interface Connection {
2-
on: boolean
3-
connected: boolean
4-
current: string
5-
status: string
6-
network: string
7-
custom: string
8-
}
9-
10-
interface Chain {
11-
id: number
12-
type: 'ethereum'
13-
}
14-
15-
interface Network {
16-
id: number
17-
name: string
18-
layer: string
19-
isTestnet: boolean
20-
explorer: string
21-
on: boolean
22-
connection: {
23-
primary: Connection
24-
secondary: Connection
25-
}
26-
}
27-
28-
interface NetworkMetadata {
29-
blockHeight: number
30-
gas: GasData
31-
icon: string
32-
primaryColor: keyof ColorwayPalette
33-
nativeCurrency: NativeCurrency
34-
}
35-
36-
interface Session {
37-
requests: number
38-
startedAt: number
39-
endedAt?: number
40-
lastUpdatedAt: number
41-
}
42-
43-
interface Origin {
44-
chain: Chain
45-
name: string
46-
session: Session
47-
}
48-
49-
interface Permission {
50-
origin: string
51-
provider: boolean // whether or not to grant access
52-
handlerId?: string
53-
}
54-
55-
interface NativeCurrency {
56-
symbol: string
57-
icon: string
58-
name: string
59-
decimals: number
60-
usd?: Rate
61-
}
62-
63-
interface GasData {
64-
fees: GasFees
65-
price: {
66-
selected: string
67-
levels: GasLevels
68-
fees: GasFees | null
69-
}
70-
}
71-
72-
interface GasFees {
73-
nextBaseFee: string
74-
maxBaseFeePerGas: string
75-
maxPriorityFeePerGas: string
76-
maxFeePerGas: string
77-
}
78-
79-
interface GasLevels {
80-
slow?: string
81-
standard: string
82-
fast?: string
83-
asap?: string
84-
custom?: string
85-
}
86-
871
type HexAmount = string
882

89-
type Color = { r: number; g: number; b: number }
90-
type ColorwayPalette = {
91-
accent1: Color
92-
accent2: Color
93-
accent3: Color
94-
accent4: Color
95-
accent5: Color
96-
accent6: Color
97-
accent7: Color
98-
accent8: Color
99-
}
100-
101-
interface WithTokenId {
102-
address: string
103-
chainId: number
104-
}
105-
106-
interface Balance extends WithTokenId {
107-
name: string
108-
symbol: string
109-
balance: HexAmount
110-
decimals: number
111-
displayBalance: string
112-
}
113-
114-
interface Rate {
115-
price: number
116-
change24hr: number
117-
}
118-
119-
interface Token extends WithTokenId {
120-
name: string
121-
symbol: string
122-
decimals: number
123-
logoURI?: string
124-
}
125-
1263
type InventoryAsset = {
1274
name: string
1285
[field: string]: any
@@ -149,18 +26,6 @@ interface Frame {
14926
views: Record<string, ViewMetadata>
15027
}
15128

152-
interface Dapp {
153-
id?: string
154-
ens: string
155-
status?: string
156-
config: Record<string, string>
157-
content?: string // IPFS hash
158-
manifest?: any
159-
current?: any
160-
openWhenReady: boolean
161-
checkStatusRetryCount: number
162-
}
163-
16429
type SignerType = 'ring' | 'seed' | 'trezor' | 'ledger' | 'lattice'
16530
type AccountStatus = 'ok'
16631

app/dash/Chains/Chain/Connection/index.js

+14-7
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ import { capitalize } from '../../../../../resources/utils'
88

99
import link from '../../../../../resources/link'
1010
import svg from '../../../../../resources/svg'
11+
import { NETWORK_PRESETS } from '../../../../../resources/constants'
12+
13+
function mapToPreset(chainId, key) {
14+
return { text: key, value: `ethereum:${chainId}:${key}` }
15+
}
1116

1217
const ConnectionIndicator = ({ className, connection }) => {
1318
const isConnected = connection.status === 'connected'
@@ -122,20 +127,22 @@ class ChainModule extends React.Component {
122127

123128
render() {
124129
const { id, type } = this.props
130+
const toPreset = (key) => mapToPreset(id, key)
125131

126132
const connection = this.store('main.networks', type, id, 'connection')
127133
if (!connection) return null
128134

129135
const networkMeta = this.store('main.networksMeta.ethereum', id)
130-
const networkPresets = this.store('main.networkPresets', type)
131136
const renderStatus = this.renderConnectionStatus.bind(this, type, id)
132137

133-
let presets = networkPresets[id] || {}
134-
presets = Object.keys(presets).map((i) => ({ text: i, value: `${type}:${id}:${i}` }))
135-
presets = presets.concat(
136-
Object.keys(networkPresets.default).map((i) => ({ text: i, value: `${type}:${id}:${i}` }))
137-
)
138-
presets.push({ text: 'Custom', value: `${type}:${id}:custom` })
138+
const networkPresets = NETWORK_PRESETS.ethereum[id] || {}
139+
const defaultPresets = NETWORK_PRESETS.ethereum.default
140+
141+
const presets = [
142+
...Object.keys(networkPresets).map(toPreset),
143+
...Object.keys(defaultPresets).map(toPreset),
144+
toPreset('custom')
145+
]
139146

140147
const customFocusHandler = (inputName) => {
141148
const stateKey = `${inputName}Custom`

app/dash/Chains/index.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from 'react'
22
import Restore from 'react-restore'
3-
import link from '../../../resources/link'
43

54
import Chain from './Chain'
5+
import link from '../../../resources/link'
66

77
class Settings extends React.Component {
88
constructor(props, context) {
@@ -113,15 +113,7 @@ class Settings extends React.Component {
113113
}
114114

115115
renderChains() {
116-
const { type, id } = { type: 'ethereum', id: 1 } // TODO: this.store('main.currentNetwork')
117116
const networks = this.store('main.networks')
118-
const networkPresets = this.store('main.networkPresets', type)
119-
let presets = networkPresets[id] || {}
120-
presets = Object.keys(presets).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
121-
presets = presets.concat(
122-
Object.keys(networkPresets.default).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
123-
)
124-
presets.push({ text: 'Custom', value: type + ':' + id + ':' + 'custom' })
125117
const networkOptions = []
126118
Object.keys(networks).forEach((type) => {
127119
Object.keys(networks[type]).forEach((id) => {

app/dash/Main/index.js

+1-10
Original file line numberDiff line numberDiff line change
@@ -241,18 +241,9 @@ class Settings extends React.Component {
241241
}
242242

243243
render() {
244-
const { type, id } = { type: 'ethereum', id: 1 } // TODO
245244
const networks = this.store('main.networks')
246-
// const connection = networks[type][id].connection
247-
const networkPresets = this.store('main.networkPresets', type)
248-
let presets = networkPresets[id] || {}
249-
presets = Object.keys(presets).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
250-
presets = presets.concat(
251-
Object.keys(networkPresets.default).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
252-
)
253-
presets.push({ text: 'Custom', value: type + ':' + id + ':' + 'custom' })
254-
255245
const networkOptions = []
246+
256247
Object.keys(networks).forEach((type) => {
257248
Object.keys(networks[type]).forEach((id) => {
258249
networkOptions.push({ text: networks[type][id].name, value: type + ':' + id })

app/dash/Main/style/index.styl

-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,6 @@
285285
border 1px solid var(--outerspace05)
286286
color var(--outerspace)
287287
height 30px
288-
289288

290289
.nodeProviderStatus
291290
display flex

0 commit comments

Comments
 (0)