-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
203 additions
and
10 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.default = (web3) => { | ||
web3.utils.hexToBytes = new Proxy(web3.utils.hexToBytes, { | ||
apply: (target, _thisArg, argumentsList) => { | ||
let hex = ('' + argumentsList[0] || '').replace(/^0x/, ''); | ||
console.log(hex); | ||
if (hex.length % 2) { | ||
hex = '0' + hex; | ||
} | ||
return target('0x' + hex); | ||
} | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ import Web3 from 'web3' | |
import { Provider } from 'web3/types' | ||
import systems from './systems' | ||
import appchain from './appchain' | ||
import AddHexToBytes from './utils/hexToBytes' | ||
import patchHexToBytes from './utils/patchHexToBytes' | ||
|
||
type CustomWeb3 = typeof Web3 | ||
|
||
|
@@ -12,7 +12,7 @@ const NervosWeb3 = ( | |
) => { | ||
const web3 = new CustomWeb3(provider) | ||
// patch hex to bytes bug of [email protected] | ||
AddHexToBytes(web3) | ||
patchHexToBytes(web3) | ||
|
||
const appchainWeb3 = appchain(web3) | ||
const systemWeb3 = systems(appchainWeb3) | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
export default (web3: any) => { | ||
// web3.utils.hexToBytes = hex2bytes | ||
web3.utils.hexToBytes = new Proxy(web3.utils.hexToBytes, { | ||
apply: (target: Function, _thisArg: any, argumentsList: string[]) => { | ||
let hex = ('' + argumentsList[0] || '').replace(/^0x/, '') | ||
console.log(hex) | ||
if (hex.length % 2) { | ||
hex = '0' + hex | ||
} | ||
return target('0x' + hex) | ||
} | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
REACT_APP_MICROSCOPE=https://microscope.cryptape.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"main.css": "static/css/main.29266132.css", | ||
"main.css.map": "static/css/main.29266132.css.map", | ||
"main.js": "static/js/main.c4d448fb.js", | ||
"main.js.map": "static/js/main.c4d448fb.js.map", | ||
"static/media/logo.svg": "static/media/logo.5d5d9eef.svg" | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"short_name": "NeuronWeb", | ||
"name": "Neuron Web", | ||
"start_url": "./index.html", | ||
"display": "standalone", | ||
"theme_color": "#000", | ||
"background_color": "#fff", | ||
"browser_action": { | ||
"default_popup": "./index.html", | ||
"default_title": "NervosWeb" | ||
}, | ||
"manifest_version": 2, | ||
"version": "1.0", | ||
"permissions": [ | ||
"tabs", | ||
"activeTab", | ||
"clipboardWrite", | ||
"http://**/*", | ||
"https://**/*" | ||
], | ||
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'" | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
.title-1 { | ||
color: #6c7184; | ||
font-size: 18px; | ||
font-family: PingFangSC; | ||
font-weight: 300; | ||
} | ||
|
||
.subtitle-1 { | ||
font-size: 18px; | ||
font-family: PingFangSC; | ||
color: #2e313e; | ||
} | ||
|
||
.button-1 { | ||
padding: 8px 13px; | ||
font-size: 14px; | ||
border-radius: 2px; | ||
color: #FFF; | ||
} | ||
|
||
.primary { | ||
background: #456cff; | ||
} |
41 changes: 41 additions & 0 deletions
41
packages/neuron-web/src/containers/Transactions/transactions.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
:root { | ||
--bg-color: #f8f8fa; | ||
--bg-border-color: #e9ebf0; | ||
--text-color: #6c7184; | ||
--a-color: #456cff; | ||
} | ||
|
||
.transactions__container { | ||
text-align: center; | ||
} | ||
|
||
.transaction__list--board { | ||
background: var(--bg-color, #f8f8fa); | ||
border: 1px solid var(--bg-border-color, #e9ebf0); | ||
border-radius: 2px; | ||
margin: 0 15px; | ||
padding: 15px; | ||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | ||
font-weight: 100; | ||
} | ||
|
||
.transactions__list--item { | ||
display: flex; | ||
font-size: 14px; | ||
color: var(--text-color); | ||
} | ||
|
||
.transactions__list--item a { | ||
color: var(--a-color); | ||
font-family: Cousine, monospace; | ||
} | ||
|
||
.transactions__list--time { | ||
flex-basis: 200px; | ||
} | ||
|
||
.transactions__list--hash { | ||
overflow: hidden; | ||
text-overflow: ellipsis; | ||
white-space: nowrap; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
.logo { | ||
/* margin: 0 auto; */ | ||
position: relative; | ||
top: 0; | ||
right: 50vw; | ||
transform: translateX(-50%); | ||
width: 90px; | ||
filter: drop-shadow(100vw 0 blue); | ||
margin: 24px 0; | ||
animation: neon 10s linear 0s infinite; | ||
/* transition: all linear; */ | ||
} | ||
|
||
@keyframes neon { | ||
0% { | ||
filter: drop-shadow(100vw 0 blue), blur(10px); | ||
} | ||
20% { | ||
filter: drop-shadow(100vw 0 green); | ||
} | ||
40% { | ||
filter: drop-shadow(100vw 0 yellow); | ||
} | ||
60% { | ||
filter: drop-shadow(100vw 0 orange); | ||
} | ||
80% { | ||
filter: drop-shadow(100vw 0 red); | ||
} | ||
100% { | ||
filter: drop-shadow(100vw 0 blue); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react' | ||
import './brand.css' | ||
|
||
export interface IBrandAndErrorHandler { | ||
handleError: (errorMsg: string) => void | ||
} | ||
|
||
const withBrandAndErrorHandler = (Comp: typeof React.Component) => | ||
class extends React.Component { | ||
public readonly state = { | ||
errorMsg: '', | ||
} | ||
|
||
public handleError = (errorMsg: string) => { | ||
this.setState({ | ||
errorMsg, | ||
}) | ||
} | ||
public render() { | ||
return ( | ||
<div> | ||
<img className="logo" src="https://cdn.cryptape.com/images/neuron-logo.png" alt="logo" /> | ||
<span>{this.state.errorMsg}</span> | ||
<Comp {...this.props} handleError={this.handleError} /> | ||
</div> | ||
) | ||
} | ||
} | ||
|
||
export default withBrandAndErrorHandler |