Skip to content

Commit

Permalink
v0.6.7 (#1623)
Browse files Browse the repository at this point in the history
* Introducing Pylon EVM
* Improve OP stack fee estimates
* Add Base chain preset
* Zod state/migration validation

Co-authored-by: Matt Holtzman <[email protected]>
Co-authored-by: Jordan Muir <[email protected]>
  • Loading branch information
floating and mholtzman authored Aug 3, 2023
1 parent 5c76115 commit 142aa91
Show file tree
Hide file tree
Showing 88 changed files with 8,770 additions and 5,262 deletions.
80 changes: 0 additions & 80 deletions .github/workflows/canary.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/compile-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- 'beta.*'
- 'canary'
- 'develop'
pull_request:

Expand Down
21 changes: 0 additions & 21 deletions .github/workflows/sync-upstream.yml

This file was deleted.

135 changes: 0 additions & 135 deletions @types/frame/state.d.ts
Original file line number Diff line number Diff line change
@@ -1,128 +1,5 @@
interface Connection {
on: boolean
connected: boolean
current: string
status: string
network: string
custom: string
}

interface Chain {
id: number
type: 'ethereum'
}

interface Network {
id: number
name: string
layer: string
isTestnet: boolean
explorer: string
on: boolean
connection: {
primary: Connection
secondary: Connection
}
}

interface NetworkMetadata {
blockHeight: number
gas: GasData
icon: string
primaryColor: keyof ColorwayPalette
nativeCurrency: NativeCurrency
}

interface Session {
requests: number
startedAt: number
endedAt?: number
lastUpdatedAt: number
}

interface Origin {
chain: Chain
name: string
session: Session
}

interface Permission {
origin: string
provider: boolean // whether or not to grant access
handlerId?: string
}

interface NativeCurrency {
symbol: string
icon: string
name: string
decimals: number
usd?: Rate
}

interface GasData {
fees: GasFees
price: {
selected: string
levels: GasLevels
fees: GasFees | null
}
}

interface GasFees {
nextBaseFee: string
maxBaseFeePerGas: string
maxPriorityFeePerGas: string
maxFeePerGas: string
}

interface GasLevels {
slow?: string
standard: string
fast?: string
asap?: string
custom?: string
}

type HexAmount = string

type Color = { r: number; g: number; b: number }
type ColorwayPalette = {
accent1: Color
accent2: Color
accent3: Color
accent4: Color
accent5: Color
accent6: Color
accent7: Color
accent8: Color
}

interface WithTokenId {
address: string
chainId: number
}

interface Balance extends WithTokenId {
name: string
symbol: string
balance: HexAmount
decimals: number
displayBalance: string
}

interface Rate {
price: number
change24hr: number
}

interface Token extends WithTokenId {
name: string
symbol: string
decimals: number
logoURI?: string
}

type InventoryAsset = {
name: string
[field: string]: any
Expand All @@ -149,18 +26,6 @@ interface Frame {
views: Record<string, ViewMetadata>
}

interface Dapp {
id?: string
ens: string
status?: string
config: Record<string, string>
content?: string // IPFS hash
manifest?: any
current?: any
openWhenReady: boolean
checkStatusRetryCount: number
}

type SignerType = 'ring' | 'seed' | 'trezor' | 'ledger' | 'lattice'
type AccountStatus = 'ok'

Expand Down
21 changes: 14 additions & 7 deletions app/dash/Chains/Chain/Connection/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import { capitalize } from '../../../../../resources/utils'

import link from '../../../../../resources/link'
import svg from '../../../../../resources/svg'
import { NETWORK_PRESETS } from '../../../../../resources/constants'

function mapToPreset(chainId, key) {
return { text: key, value: `ethereum:${chainId}:${key}` }
}

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

render() {
const { id, type } = this.props
const toPreset = (key) => mapToPreset(id, key)

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

const networkMeta = this.store('main.networksMeta.ethereum', id)
const networkPresets = this.store('main.networkPresets', type)
const renderStatus = this.renderConnectionStatus.bind(this, type, id)

let presets = networkPresets[id] || {}
presets = Object.keys(presets).map((i) => ({ text: i, value: `${type}:${id}:${i}` }))
presets = presets.concat(
Object.keys(networkPresets.default).map((i) => ({ text: i, value: `${type}:${id}:${i}` }))
)
presets.push({ text: 'Custom', value: `${type}:${id}:custom` })
const networkPresets = NETWORK_PRESETS.ethereum[id] || {}
const defaultPresets = NETWORK_PRESETS.ethereum.default

const presets = [
...Object.keys(networkPresets).map(toPreset),
...Object.keys(defaultPresets).map(toPreset),
toPreset('custom')
]

const customFocusHandler = (inputName) => {
const stateKey = `${inputName}Custom`
Expand Down
10 changes: 1 addition & 9 deletions app/dash/Chains/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react'
import Restore from 'react-restore'
import link from '../../../resources/link'

import Chain from './Chain'
import link from '../../../resources/link'

class Settings extends React.Component {
constructor(props, context) {
Expand Down Expand Up @@ -113,15 +113,7 @@ class Settings extends React.Component {
}

renderChains() {
const { type, id } = { type: 'ethereum', id: 1 } // TODO: this.store('main.currentNetwork')
const networks = this.store('main.networks')
const networkPresets = this.store('main.networkPresets', type)
let presets = networkPresets[id] || {}
presets = Object.keys(presets).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
presets = presets.concat(
Object.keys(networkPresets.default).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
)
presets.push({ text: 'Custom', value: type + ':' + id + ':' + 'custom' })
const networkOptions = []
Object.keys(networks).forEach((type) => {
Object.keys(networks[type]).forEach((id) => {
Expand Down
11 changes: 1 addition & 10 deletions app/dash/Main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,18 +241,9 @@ class Settings extends React.Component {
}

render() {
const { type, id } = { type: 'ethereum', id: 1 } // TODO
const networks = this.store('main.networks')
// const connection = networks[type][id].connection
const networkPresets = this.store('main.networkPresets', type)
let presets = networkPresets[id] || {}
presets = Object.keys(presets).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
presets = presets.concat(
Object.keys(networkPresets.default).map((i) => ({ text: i, value: type + ':' + id + ':' + i }))
)
presets.push({ text: 'Custom', value: type + ':' + id + ':' + 'custom' })

const networkOptions = []

Object.keys(networks).forEach((type) => {
Object.keys(networks[type]).forEach((id) => {
networkOptions.push({ text: networks[type][id].name, value: type + ':' + id })
Expand Down
1 change: 0 additions & 1 deletion app/dash/Main/style/index.styl
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@
border 1px solid var(--outerspace05)
color var(--outerspace)
height 30px


.nodeProviderStatus
display flex
Expand Down
Loading

0 comments on commit 142aa91

Please sign in to comment.